# Code Conversion

The {py:mod}`torii.lib.coding` module provides building blocks for conversion between different encodings of binary numbers.


## One-hot coding

```{eval-rst}
.. autoclass:: torii.lib.coding.Encoder
.. autoclass:: torii.lib.coding.Decoder

```

## Priority coding

```{eval-rst}
.. autoclass:: torii.lib.coding.PriorityEncoder
.. autoclass:: torii.lib.coding.PriorityDecoder

```

## Gray coding

```{eval-rst}
.. autoclass:: torii.lib.coding.GrayEncoder
.. autoclass:: torii.lib.coding.GrayDecoder

```
