Code conversion
###############

.. py:module:: amaranth.lib.coding

The :mod:`amaranth.lib.coding` module provides building blocks for conversion between different encodings of binary numbers.


One-hot coding
==============

.. autoclass:: Encoder()
.. autoclass:: Decoder()


Priority coding
===============

.. autoclass:: PriorityEncoder()
.. autoclass:: PriorityDecoder()


Gray coding
===========

.. autoclass:: GrayEncoder()
.. autoclass:: GrayDecoder()
