gray coding

Bit sequences adjacent differ by exactly one bit.

For instance, the mapping of the first 5 numbers is

Decimal Gray code
0 0
1 01
2 11
3 10
4 110
5 111
Back to index