The first Gray code , now called the binary reflected Gray code, is a trivial code that orders length-\(n\) binary strings such that nearest-neighbor strings differ by only one digit.
A simple example is the case \(n=2\), also known as the Gray map, which produces the ordering \(0\to 00\), \(1\to 01\), \(2\to 11\), and \(3\to 10\). The Gray map differs in the last two numbers from the usual binary expansion of the natural numbers, which maps \(0\to 00\), \(1\to 01\), \(2\to 10\), and \(3\to 11\).
Layout out the Gray-map output strings counterclockwise on the corners of a 1D square, gray codes have been generalized such that nearest-neighbor strings differ by only one digit when the strings are arranged in higher-dimensional hypercubes . Further generalizations called combinatorial Gray codes  refer to methods to generate organize combinatorial objects such that successive objects differ in some particular way. Particular \(q\)-ary extensions  of Gray codes may be useful in digital imaging and signal processing.
- Quadrature-amplitude modulation (QAM) code — 2D Gray codes are often concatenated with \(n=1\) lattice-based QAM codes so that the Hamming distance between the bitstrings encoded into the points is a discretized version of the Euclidean distance between the points.
- Rank-modulation Gray code (RMGC) — The rank-modulation Gray code is an extension of the original binary Gray code to a code on the permutation group .
- Phase-shift keying (PSK) code — 1D Gray codes are often concatenated with PSKs so that the Hamming distance between the bitstrings encoded into the points is a discretized version of the Euclidean distance between the points.
- Gray, Frank. "Pulse code communication." United States Patent Number 2632058 (1953).
- E. N. Gilbert, “Gray Codes and Paths on the n-Cube”, Bell System Technical Journal 37, 815 (1958) DOI
- J. T. Joichi, D. E. White, and S. G. Williamson, “Combinatorial Gray Codes”, SIAM Journal on Computing 9, 130 (1980) DOI
- Yicong Zhou et al., “(n, k, p)-Gray code for image systems”, IEEE Transactions on Cybernetics 43, 515 (2013) DOI
- J. R. Bitner, G. Ehrlich, and E. M. Reingold, “Efficient generation of the binary reflected gray code and its applications”, Communications of the ACM 19, 517 (1976) DOI
- G. Sansoni et al., “Three-dimensional imaging based on Gray-code light projection: characterization of the measuring algorithm and development of a measuring system for industrial applications”, Applied Optics 36, 4463 (1997) DOI
- S. L. Johnsson and C.-T. Ho, “Optimum broadcasting and personalized communication in hypercubes”, IEEE Transactions on Computers 38, 1249 (1989) DOI
- C. Savage, “A Survey of Combinatorial Gray Codes”, SIAM Review 39, 605 (1997) DOI
- L. S. Barasch, S. Lakshmivarahan, and S. K. Dhall, “Generalized Gray Codes and Their Properties”, Mathematics for Large Scale Computing 203 (2020) DOI
- T. Mütze, “Combinatorial Gray codes-an updated survey”, (2022) arXiv:2202.01280
- Anxiao Jiang et al., “Rank Modulation for Flash Memories”, IEEE Transactions on Information Theory 55, 2659 (2009) DOI
Page edit log
- Victor V. Albert (2022-11-07) — most recent
“Gray code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/gray