Expand description
Gray codes (reflected binary codes), in which consecutive values differ in exactly one bit.
See the book entry Entropy, divergence and mutual information.
Functionsยง
- gray_
code - Returns the reflected binary Gray code of
n. - gray_
code_ sequence - Returns the full
bits-bit Gray code sequence of length2^bits(bits <= 32). - gray_
decode - Inverts
gray_code: returns thenwhose Gray code isg.