Gray code
Noun
Meaning
Gray code (plural Gray codes)
A binary coding system in which successive values differ in just one digit position.
Examples
A 1954 patent application refers to "the Bell Telephone Gray code".
A common implementation of an asynchronous FIFO uses a Gray code (or any unit distance code) for the read and write pointers to ensure reliable flag generation.
Adding a clocked register after the circuit that converts the count value to Gray code may introduce a clock cycle of latency, so counting directly in Gray code may be advantageous.
Alternatively, decoding a Gray code into a binary number can be described as a prefix sum of the bits in the Gray code, where each individual summation operation in the prefix sum is performed modulo two.
As the name implies, this type of Gray code uses non-Boolean values in its encodings.
Gray code counters and arithmetic A typical use of Gray code counters is building a FIFO (first-in, first-out) data buffer that has read and write ports that exist in different clock domains.