Gray code#Gray code addressing

{{Short description|Ordering of binary values, used for positioning and error correction}}

{{Use dmy dates|date=May 2019|cs1-dates=y}}

{{Gray code by bit width}}

The reflected binary code (RBC), also known as reflected binary (RB) or Gray code after Frank Gray, is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit).

For example, the representation of the decimal value "1" in binary would normally be "{{mono|001}}", and "2" would be "{{mono|010}}". In Gray code, these values are represented as "{{mono|001}}" and "{{mono|011}}". That way, incrementing a value from 1 to 2 requires only one bit to change, instead of two.

Gray codes are widely used to prevent spurious output from electromechanical switches and to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems. The use of Gray code in these devices helps simplify logic operations and reduce errors in practice.{{Cite web |last=Gray |first=Joel |date=March 2020 |title=Understanding Gray Code: A Reliable Encoding System |url=https://graycode.ie/blog/graycode/ |access-date=2023-06-30 |website=graycode.ie |at=Section: Conclusion |language=en}}

Function

Many devices indicate position by closing and opening switches. If that device uses natural binary codes, positions 3 and 4 are next to each other but all three bits of the binary representation differ:

class="wikitable" style="text-align:center;"
DecimalBinary
......
3{{mono|011}}
4{{mono|100}}
......

The problem with natural binary codes is that physical switches are not ideal: it is very unlikely that physical switches will change states exactly in synchrony. In the transition between the two states shown above, all three switches change state. In the brief period while all are changing, the switches will read some spurious position. Even without keybounce, the transition might look like {{mono|011}} — {{mono|001}} — {{mono|101}} — {{mono|100}}. When the switches appear to be in position {{mono|001}}, the observer cannot tell if that is the "real" position 1, or a transitional state between two other positions. If the output feeds into a sequential system, possibly via combinational logic, then the sequential system may store a false value.

{{anchor|Monostrophic|Unit-distance|Single-distance|Single-step|Syncopic}}This problem can be solved by changing only one switch at a time, so there is never any ambiguity of position, resulting in codes assigning to each of a contiguous set of integers, or to each member of a circular list, a word of symbols such that no two code words are identical and each two adjacent code words differ by exactly one symbol. These codes are also known as unit-distance, single-distance, single-step, monostrophic or syncopic codes, in reference to the Hamming distance of 1 between adjacent codes.

Invention

File:Reflected binary Gray 2632058.png

In principle, there can be more than one such code for a given word length, but the term Gray code was first applied to a particular binary code for non-negative integers, the binary-reflected Gray code, or BRGC. Bell Labs researcher

George R. Stibitz described such a code in a 1941 patent application, granted in 1943. Frank Gray introduced the term reflected binary code in his 1947 patent application, remarking that the code had "as yet no recognized name". He derived the name from the fact that it "may be built up from the conventional binary code by a sort of reflection process".

File:Gray_code_tesseract.svg of a tesseract]]

File:Gray code number line arcs.svg

In the standard encoding of the Gray code the least significant bit follows a repetitive pattern of 2 on, 2 off {{nowrap|(... {{mono|11001100}} ...);}} the next digit a pattern of 4 on, 4 off; the i-th least significant bit a pattern of 2i on 2i off. The most significant digit is an exception to this: for an n-bit Gray code, the most significant digit follows the pattern 2n−1 on, 2n−1 off, which is the same (cyclic) sequence of values as for the second-most significant digit, but shifted forwards 2n−2 places. The four-bit version of this is shown below:

class="wikitable sortable" style="text-align:center;"

! Decimal !! Binary !! Gray

0{{mono|0000}}{{mono|0000}}
1{{mono|0001}}{{mono|0001}}
2{{mono|0010}}{{mono|0011}}
3{{mono|0011}}{{mono|0010}}
4{{mono|0100}}{{mono|0110}}
5{{mono|0101}}{{mono|0111}}
6{{mono|0110}}{{mono|0101}}
7{{mono|0111}}{{mono|0100}}
8{{mono|1000}}{{mono|1100}}
9{{mono|1001}}{{mono|1101}}
10{{mono|1010}}{{mono|1111}}
11{{mono|1011}}{{mono|1110}}
12{{mono|1100}}{{mono|1010}}
13{{mono|1101}}{{mono|1011}}
14{{mono|1110}}{{mono|1001}}
15{{mono|1111}}{{mono|1000}}

For decimal 15 the code rolls over to decimal 0 with only one switch change. This is called the cyclic or adjacency property of the code.

In modern digital communications, Gray codes play an important role in error correction. For example, in a digital modulation scheme such as QAM where data is typically transmitted in symbols of 4 bits or more, the signal's constellation diagram is arranged so that the bit patterns conveyed by adjacent constellation points differ by only one bit. By combining this with forward error correction capable of correcting single-bit errors, it is possible for a receiver to correct any transmission errors that cause a constellation point to deviate into the area of an adjacent point. This makes the transmission system less susceptible to noise.

Despite the fact that Stibitz described this code before Gray, the reflected binary code was later named after Gray by others who used it. Two different 1953 patent applications use "Gray code" as an alternative name for the "reflected binary code"; one of those also lists "minimum error code" and "cyclic permutation code" among the names. A 1954 patent application refers to "the Bell Telephone Gray code". Other names include "cyclic binary code", "cyclic progression code", "cyclic permuting binary" or "cyclic permuted binary" (CPB).

The Gray code is sometimes misattributed to 19th century electrical device inventor Elisha Gray.

History and practical application

= Mathematical puzzles =

Reflected binary codes were applied to mathematical puzzles before they became known to engineers.

The binary-reflected Gray code represents the underlying scheme of the classical Chinese rings puzzle, a sequential mechanical puzzle mechanism described by the French Louis Gros in 1872.

It can serve as a solution guide for the Towers of Hanoi problem, based on a game by the French Édouard Lucas in 1883. Similarly, the so-called Towers of Bucharest and Towers of Klagenfurt game configurations yield ternary and pentary Gray codes.

Martin Gardner wrote a popular account of the Gray code in his August 1972 "Mathematical Games" column in Scientific American.

The code also forms a Hamiltonian cycle on a hypercube, where each bit is seen as one dimension.

= Telegraphy codes =

{{anchor|Baudot|Excess-1 Gray}}When the French engineer Émile Baudot changed from using a 6-unit (6-bit) code to 5-unit code for his printing telegraph system, in 1875 or 1876, he ordered the alphabetic characters on his print wheel using a reflected binary code, and assigned the codes using only three of the bits to vowels. With vowels and consonants sorted in their alphabetical order, and other symbols appropriately placed, the 5-bit character code has been recognized as a reflected binary code. This code became known as Baudot code and, with minor changes, was eventually adopted as International Telegraph Alphabet No. 1 (ITA1, CCITT-1) in 1932.

{{anchor|Schäffler telegraph|Schäffler code}}About the same time, the German-Austrian {{ill|Otto Schäffler|de|Theodor Heinrich Otto Schäffler}} demonstrated another printing telegraph in Vienna using a 5-bit reflected binary code for the same purpose, in 1874.

= Analog-to-digital signal conversion =

Frank Gray, who became famous for inventing the signaling method that came to be used for compatible color television, invented a method to convert analog signals to reflected binary code groups using vacuum tube-based apparatus. Filed in 1947, the method and apparatus were granted a patent in 1953, and the name of Gray stuck to the codes. The "PCM tube" apparatus that Gray patented was made by Raymond W. Sears of Bell Labs, working with Gray and William M. Goodall, who credited Gray for the idea of the reflected binary code.

File:US02632058 Gray.png

Gray was most interested in using the codes to minimize errors in converting analog signals to digital; his codes are still used today for this purpose.

= Position encoders =

File:Encoder Disc (3-Bit).svg for angle-measuring devices marked in 3-bit binary-reflected Gray code (BRGC)]]

File:Gray code rotary encoder 13-track opened.jpg

Gray codes are used in linear and rotary position encoders (absolute encoders and quadrature encoders) in preference to weighted binary encoding. This avoids the possibility that, when multiple bits change in the binary representation of a position, a misread will result from some of the bits changing before others.

For example, some rotary encoders provide a disk which has an electrically conductive Gray code pattern on concentric rings (tracks). Each track has a stationary metal spring contact that provides electrical contact to the conductive code pattern. Together, these contacts produce output signals in the form of a Gray code. Other encoders employ non-contact mechanisms based on optical or magnetic sensors to produce the Gray code output signals.

Regardless of the mechanism or precision of a moving encoder, position measurement error can occur at specific positions (at code boundaries) because the code may be changing at the exact moment it is read (sampled). A binary output code could cause significant position measurement errors because it is impossible to make all bits change at exactly the same time. If, at the moment the position is sampled, some bits have changed and others have not, the sampled position will be incorrect. In the case of absolute encoders, the indicated position may be far away from the actual position and, in the case of incremental encoders, this can corrupt position tracking.

In contrast, the Gray code used by position encoders ensures that the codes for any two consecutive positions will differ by only one bit and, consequently, only one bit can change at a time. In this case, the maximum position error will be small, indicating a position adjacent to the actual position.

= Genetic algorithms =

Due to the Hamming distance properties of Gray codes, they are sometimes used in genetic algorithms. They are very useful in this field, since mutations in the code allow for mostly incremental changes, but occasionally a single bit-change can cause a big leap and lead to new properties.

= Boolean circuit minimization =

Gray codes are also used in labelling the axes of Karnaugh maps since 1953 as well as in Händler circle graphs since 1958, both graphical methods for logic circuit minimization.

= Error correction =

In modern digital communications, 1D- and 2D-Gray codes play an important role in error prevention before applying an error correction. For example, in a digital modulation scheme such as QAM where data is typically transmitted in symbols of 4 bits or more, the signal's constellation diagram is arranged so that the bit patterns conveyed by adjacent constellation points differ by only one bit. By combining this with forward error correction capable of correcting single-bit errors, it is possible for a receiver to correct any transmission errors that cause a constellation point to deviate into the area of an adjacent point. This makes the transmission system less susceptible to noise.

QPSK Gray Coded.svg|Codes 4-PSK

8PSK Gray Coded.svg|Codes 8-PSK

16QAM Gray Coded.svg|Codes 16-QAM

= Communication between clock domains =

{{Main article|Clock domain crossing}}

Digital logic designers use Gray codes extensively for passing multi-bit count information between synchronous logic that operates at different clock frequencies. The logic is considered operating in different "clock domains". It is fundamental to the design of large chips that operate with many different clocking frequencies.

= Cycling through states with minimal effort =

If a system has to cycle sequentially through all possible combinations of on-off states of some set of controls, and the changes of the controls require non-trivial expense (e.g. time, wear, human work), a Gray code minimizes the number of setting changes to just one change for each combination of states. An example would be testing a piping system for all combinations of settings of its manually operated valves.

A balanced Gray code can be constructed, that flips every bit equally often. Since bit-flips are evenly distributed, this is optimal in the following way: balanced Gray codes minimize the maximal count of bit-flips for each digit.

== Gray code counters and arithmetic ==

George R. Stibitz utilized a reflected binary code in a binary pulse counting device in 1941 already.

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. The input and output counters inside such a dual-port FIFO are often stored using Gray code to prevent invalid transient states from being captured when the count crosses clock domains. The updated read and write pointers need to be passed between clock domains when they change, to be able to track FIFO empty and full status in each domain. Each bit of the pointers is sampled non-deterministically for this clock domain transfer. So for each bit, either the old value or the new value is propagated. Therefore, if more than one bit in the multi-bit pointer is changing at the sampling point, a "wrong" binary value (neither new nor old) can be propagated. By guaranteeing only one bit can be changing, Gray codes guarantee that the only possible sampled values are the new or old multi-bit value. Typically Gray codes of power-of-two length are used.

Sometimes digital buses in electronic systems are used to convey quantities that can only increase or decrease by one at a time, for example the output of an event counter which is being passed between clock domains or to a digital-to-analog converter. The advantage of Gray codes in these applications is that differences in the propagation delays of the many wires that represent the bits of the code cannot cause the received value to go through states that are out of the Gray code sequence. This is similar to the advantage of Gray codes in the construction of mechanical encoders, however the source of the Gray code is an electronic counter in this case. The counter itself must count in Gray code, or if the counter runs in binary then the output value from the counter must be reclocked after it has been converted to Gray code, because when a value is converted from binary to Gray code, it is possible that differences in the arrival times of the binary data bits into the binary-to-Gray conversion circuit will mean that the code could go briefly through states that are wildly out of sequence. 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.

To produce the next count value in a Gray-code counter, it is necessary to have some combinational logic that will increment the current count value that is stored. One way to increment a Gray code number is to convert it into ordinary binary code, add one to it with a standard binary adder, and then convert the result back to Gray code. Other methods of counting in Gray code are discussed in a report by Robert W. Doran, including taking the output from the first latches of the master-slave flip flops in a binary ripple counter.

== Gray code addressing<span class="anchor" id="Shifted Gray encoding"></span> ==

As the execution of program code typically causes an instruction memory access pattern of locally consecutive addresses, bus encodings using Gray code addressing instead of binary addressing can reduce the number of state changes of the address bits significantly, thereby reducing the CPU power consumption in some low-power designs.

Constructing an ''n''-bit Gray code

File:Binary-reflected Gray code construction.svg

File:Gray code permutation matrix 16.svg

The binary-reflected Gray code list for n bits can be generated recursively from the list for n − 1 bits by reflecting the list (i.e. listing the entries in reverse order), prefixing the entries in the original list with a binary {{mono|0}}, prefixing the entries in the reflected list with a binary {{mono|1}}, and then concatenating the original list with the reversed list. For example, generating the n = 3 list from the n = 2 list:

cellpadding="5" border="0" style="margin: 1em;"
2-bit list:

| {{mono|00}}, {{mono|01}}, {{mono|11}}, {{mono|10}}

|  

Reflected:

|  

| {{mono|10}}, {{mono|11}}, {{mono|01}}, {{mono|00}}

Prefix old entries with {{mono|0}}:

| {{mono|000}}, {{mono|001}}, {{mono|011}}, {{mono|010}},

|  

Prefix new entries with {{mono|1}}:

|  

| {{mono|110}}, {{mono|111}}, {{mono|101}}, {{mono|100}}

Concatenated:

| {{mono|000}}, {{mono|001}}, {{mono|011}}, {{mono|010}},

| {{mono|110}}, {{mono|111}}, {{mono|101}}, {{mono|100}}

The one-bit Gray code is G1 = ({{mono|0,1}}). This can be thought of as built recursively as above from a zero-bit Gray code G0 = ( Λ ) consisting of a single entry of zero length. This iterative process of generating Gn+1 from Gn makes the following properties of the standard reflecting code clear:

  • Gn is a permutation of the numbers 0, ..., 2n − 1. (Each number appears exactly once in the list.)
  • Gn is embedded as the first half of Gn+1.
  • Therefore, the coding is stable, in the sense that once a binary number appears in Gn it appears in the same position in all longer lists; so it makes sense to talk about the reflective Gray code value of a number: G(m) = the mth reflecting Gray code, counting from 0.
  • Each entry in Gn differs by only one bit from the previous entry. (The Hamming distance is 1.)
  • The last entry in Gn differs by only one bit from the first entry. (The code is cyclic.)

These characteristics suggest a simple and fast method of translating a binary value into the corresponding Gray code. Each bit is inverted if the next higher bit of the input value is set to one. This can be performed in parallel by a bit-shift and exclusive-or operation if they are available: the nth Gray code is obtained by computing n \oplus \left\lfloor \tfrac{n}{2} \right\rfloor. Prepending a {{mono|0}} bit leaves the order of the code words unchanged, prepending a {{mono|1}} bit reverses the order of the code words. If the bits at position i of codewords are inverted, the order of neighbouring blocks of 2^i codewords is reversed. For example, if bit 0 is inverted in a 3 bit codeword sequence, the order of two neighbouring codewords is reversed

{{block indent|{{{mono|000,001,010,011,100,101,110,111}}} → {{{mono|001,000,011,010,101,100,111,110}}} {{pad|2em}}(invert bit 0)}}

If bit 1 is inverted, blocks of 2 codewords change order:

{{block indent| {{{mono|000,001,010,011,100,101,110,111}}} → {{{mono|010,011,000,001,110,111,100,101}}} {{pad|2em}}(invert bit 1)}}

If bit 2 is inverted, blocks of 4 codewords reverse order:

{{block indent| {{{mono|000,001,010,011,100,101,110,111}}} → {{{mono|100,101,110,111,000,001,010,011}}} {{pad|2em}}(invert bit 2)}}

Thus, performing an exclusive or on a bit b_i at position i with the bit b_{i+1} at position i+1 leaves the order of codewords intact if b_{i+1} = \mathtt{0}, and reverses the order of blocks of 2^{i+1} codewords if b_{i+1} = \mathtt{1}. Now, this is exactly the same operation as the reflect-and-prefix method to generate the Gray code.

A similar method can be used to perform the reverse translation, but the computation of each bit depends on the computed value of the next higher bit so it cannot be performed in parallel. Assuming g_i is the ith Gray-coded bit (g_0 being the most significant bit), and b_i is the ith binary-coded bit (b_0 being the most-significant bit), the reverse translation can be given recursively: b_0 = g_0, and b_i=g_i \oplus b_{i-1}. 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.

To construct the binary-reflected Gray code iteratively, at step 0 start with the \mathrm{code}_0 = \mathtt{0}, and at step i > 0 find the bit position of the least significant {{mono|1}} in the binary representation of i and flip the bit at that position in the previous code \mathrm{code}_{i-1} to get the next code \mathrm{code}_i. The bit positions start 0, 1, 0, 2, 0, 1, 0, 3, ... See find first set for efficient algorithms to compute these values.

Converting to and from Gray code

The following functions in C convert between binary numbers and their associated Gray codes. While it may seem that Gray-to-binary conversion requires each bit to be handled one at a time, faster algorithms exist.

typedef unsigned int uint;

// This function converts an unsigned binary number to reflected binary Gray code.

uint BinaryToGray(uint num)

{

return num ^ (num >> 1); // The operator >> is shift right. The operator ^ is exclusive or.

}

// This function converts a reflected binary Gray code number to a binary number.

uint GrayToBinary(uint num)

{

uint mask = num;

while (mask) { // Each Gray code bit is exclusive-ored with all more significant bits.

mask >>= 1;

num ^= mask;

}

return num;

}

// A more efficient version for Gray codes 32 bits or fewer through the use of SWAR (SIMD within a register) techniques.

// It implements a parallel prefix XOR function. The assignment statements can be in any order.

//

// This function can be adapted for longer Gray codes by adding steps.

uint GrayToBinary32(uint num)

{

num ^= num >> 16;

num ^= num >> 8;

num ^= num >> 4;

num ^= num >> 2;

num ^= num >> 1;

return num;

}

// A Four-bit-at-once variant changes a binary number (abcd)2 to (abcd)2 ^ (00ab)2, then to (abcd)2 ^ (00ab)2 ^ (0abc)2 ^ (000a)2.

On newer processors, the number of ALU instructions in the decoding step can be reduced by taking advantage of the CLMUL instruction set. If MASK is the constant binary string of ones ended with a single zero digit, then carryless multiplication of MASK with the grey encoding of x will always give either x or its bitwise negation.

Special types of Gray codes

In practice, "Gray code" almost always refers to a binary-reflected Gray code (BRGC). However, mathematicians have discovered other kinds of Gray codes. Like BRGCs, each consists of a list of words, where each word differs from the next in only one digit (each word has a Hamming distance of 1 from the next word).

= Gray codes with ''n'' bits and of length less than 2<sup>''n''</sup> =

It is possible to construct binary Gray codes with n bits with a length of less than {{math|2n}}, if the length is even. One possibility is to start with a balanced Gray code and remove pairs of values at either the beginning and the end, or in the middle.{{Cite web|url=https://www.eetimes.com/how-to-generate-gray-codes-for-non-power-of-2-sequences/|title=How to generate Gray Codes for non-power-of-2 sequences|date=2007-06-29|access-date=2022-01-29|last=Maxfield|first=Max|archive-url=https://web.archive.org/web/20220129122352/https://www.eetimes.com/how-to-generate-gray-codes-for-non-power-of-2-sequences/|archive-date=2022-01-29 }} OEIS sequence A290772 {{OEIS|A290772}} gives the number of possible Gray sequences of length {{math|2n}} that include zero and use the minimum number of bits.

= ''n''-ary Gray code <span class="anchor" id="n-ary"></span><span class="anchor" id="ternary"></span><span class="anchor" id="pentary"></span> =

border="0" cellpadding="10" align="right"

{| width="150" align="right" cellpadding="5" border="1" style="border-collapse: collapse;"

align="right|Ternary number → ternary Gray code
{{monodiv|1=

0 → 000

1 → 001

2 → 002

10 → 012

11 → 011

12 → 010

20 → 020

21 → 021

22 → 022

100 → 122

101 → 121

102 → 120

110 → 110

111 → 111

112 → 112

120 → 102

121 → 101

122 → 100

200 → 200

201 → 201

202 → 202

210 → 212

211 → 211

212 → 210

220 → 220

221 → 221

222 → 222}}

|}

There are many specialized types of Gray codes other than the binary-reflected Gray code. One such type of Gray code is the n-ary Gray code, also known as a non-Boolean Gray code. As the name implies, this type of Gray code uses non-Boolean values in its encodings.

For example, a 3-ary (ternary) Gray code would use the values {{{mono|0,1,2}}}. The (nk)-Gray code is the n-ary Gray code with k digits.

The sequence of elements in the (3, 2)-Gray code is: {{{mono|00,01,02,12,11,10,20,21,22}}}. The (nk)-Gray code may be constructed recursively, as the BRGC, or may be constructed iteratively. An algorithm to iteratively generate the (Nk)-Gray code is presented (in C):

// inputs: base, digits, value

// output: Gray

// Convert a value to a Gray code with the given base and digits.

// Iterating through a sequence of values would result in a sequence

// of Gray codes in which only one digit changes at a time.

void toGray(unsigned base, unsigned digits, unsigned value, unsigned gray[digits])

{

unsigned baseN[digits]; // Stores the ordinary base-N number, one digit per entry

unsigned i; // The loop variable

// Put the normal baseN number into the baseN array. For base 10, 109

// would be stored as [9,0,1]

for (i = 0; i < digits; i++) {

baseN[i] = value % base;

value = value / base;

}

// Convert the normal baseN number into the Gray code equivalent. Note that

// the loop starts at the most significant digit and goes down.

unsigned shift = 0;

while (i--) {

// The Gray digit gets shifted down by the sum of the higher

// digits.

gray[i] = (baseN[i] + shift) % base;

shift = shift + base - gray[i]; // Subtract from base so shift is positive

}

}

// EXAMPLES

// input: value = 1899, base = 10, digits = 4

// output: baseN[] = [9,9,8,1], gray[] = [0,1,7,1]

// input: value = 1900, base = 10, digits = 4

// output: baseN[] = [0,0,9,1], gray[] = [0,1,8,1]

There are other Gray code algorithms for (n,k)-Gray codes. The (n,k)-Gray code produced by the above algorithm is always cyclical; some algorithms, such as that by Guan, lack this property when k is odd. On the other hand, while only one digit at a time changes with this method, it can change by wrapping (looping from n − 1 to 0). In Guan's algorithm, the count alternately rises and falls, so that the numeric difference between two Gray code digits is always one.

Gray codes are not uniquely defined, because a permutation of the columns of such a code is a Gray code too. The above procedure produces a code in which the lower the significance of a digit, the more often it changes, making it similar to normal counting methods.

See also Skew binary number system, a variant ternary number system where at most two digits change on each increment, as each increment can be done with at most one digit carry operation.

= Balanced Gray code =

Although the binary reflected Gray code is useful in many scenarios, it is not optimal in certain cases because of a lack of "uniformity". In balanced Gray codes, the number of changes in different coordinate positions are as close as possible. To make this more precise, let G be an R-ary complete Gray cycle having transition sequence (\delta_k); the transition counts (spectrum) of G are the collection of integers defined by

\lambda_k = |\{ j \in \mathbb{Z}_{R^n} : \delta_j = k \}| \, , \text { for } k \in \mathbb{Z}_n

A Gray code is uniform or uniformly balanced if its transition counts are all equal, in which case we have \lambda_k = \tfrac{R^n}{n} for all k. Clearly, when R = 2, such codes exist only if n is a power of 2.{{cite journal |first1=D. G. |last1=Wagner |first2=J. |last2=West |title=Construction of Uniform Gray Codes |journal=Congressus Numerantium |volume=80 |year=1991 |pages=217–223}} If n is not a power of 2, it is possible to construct well-balanced binary codes where the difference between two transition counts is at most 2; so that (combining both cases) every transition count is either 2\left\lfloor \tfrac{2^n}{2n} \right\rfloor or 2\left\lceil \tfrac{2^n}{2n} \right\rceil. Gray codes can also be exponentially balanced if all of their transition counts are adjacent powers of two, and such codes exist for every power of two.

For example, a balanced 4-bit Gray code has 16 transitions, which can be evenly distributed among all four positions (four transitions per position), making it uniformly balanced:

{{block indent|1= {{mono|0 {{fontcolor|red|1}} 1 1 1 1 1 {{fontcolor|red|0}} 0 0 0 0 0 {{fontcolor|red|1}} 1 {{fontcolor|red|0}}}} }}

{{block indent|1= {{mono|0 0 {{fontcolor|red|1}} 1 1 1 {{fontcolor|red|0}} 0 {{fontcolor|red|1}} 1 1 1 {{fontcolor|red|0}} 0 0 0}} }}

{{block indent|1= {{mono|0 0 0 0 {{fontcolor|red|1}} 1 1 1 1 {{fontcolor|red|0}} 0 {{fontcolor|red|1}} 1 1 {{fontcolor|red|0}} 0}} }}

{{block indent|1= {{mono|{{fontcolor|red|0}} 0 0 {{fontcolor|red|1}} 1 {{fontcolor|red|0}} 0 0 0 0 {{fontcolor|red|1}} 1 1 1 1 1}}}}

whereas a balanced 5-bit Gray code has a total of 32 transitions, which cannot be evenly distributed among the positions. In this example, four positions have six transitions each, and one has eight:

{{block indent|1= {{mono|{{fontcolor|red|1}} 1 1 1 1 {{fontcolor|red|0}} 0 0 0 {{fontcolor|red|1}} 1 1 1 1 1 {{fontcolor|red|0}} 0 {{fontcolor|red|1}} 1 1 1 1 {{fontcolor|red|0}} 0 0 0 0 0 0 0 0 0}} }}

{{block indent|1= {{mono|0 0 0 {{fontcolor|red|1}} 1 1 1 1 1 1 1 {{fontcolor|red|0}} 0 0 0 0 0 0 {{fontcolor|red|1}} 1 1 1 1 1 {{fontcolor|red|0}} 0 0 {{fontcolor|red|1}} 1 {{fontcolor|red|0}} 0 0}}}}

{{block indent|1= {{mono|1 1 {{fontcolor|red|0}} 0 {{fontcolor|red|1}} 1 1 {{fontcolor|red|0}} 0 0 0 0 0 {{fontcolor|red|1}} 1 1 {{fontcolor|red|0}} 0 0 {{fontcolor|red|1}} 1 1 1 1 1 {{fontcolor|red|0}} 0 0 0 0 {{fontcolor|red|1}} 1}} }}

{{block indent|1= {{mono|1 {{fontcolor|red|0}} 0 0 0 0 0 0 {{fontcolor|red|1}} 1 1 1 1 1 {{fontcolor|red|0}} 0 0 0 0 0 {{fontcolor|red|1}} 1 1 1 1 1 1 1 {{fontcolor|red|0}} 0 0 {{fontcolor|red|1}}}}}}

{{block indent|1= {{mono|1 1 1 1 1 1 {{fontcolor|red|0}} 0 0 0 {{fontcolor|red|1}} 1 {{fontcolor|red|0}} 0 0 0 0 0 0 0 0 {{fontcolor|red|1}} 1 {{fontcolor|red|0}} 0 0 {{fontcolor|red|1}} 1 1 1 1 1}}}}

We will now show a construction and implementation for well-balanced binary Gray codes which allows us to generate an n-digit balanced Gray code for every n. The main principle is to inductively construct an (n + 2)-digit Gray code G' given an n-digit Gray code G in such a way that the balanced property is preserved. To do this, we consider partitions of G = g_0, \ldots, g_{2^n-1} into an even number L of non-empty blocks of the form

\left\{g_0\right\}, \left\{g_1, \ldots, g_{k_2}\right\}, \left\{g_{k_2+1}, \ldots, g_{k_3}\right\}, \ldots, \left\{g_{k_{L-2}+1}, \ldots, g_{-2}\right\}, \left\{g_{-1}\right\}

where k_1 = 0, k_{L-1} = -2, and k_{L} \equiv -1 \pmod{2^n}). This partition induces an (n+2)-digit Gray code given by

{{block indent|1=\begin{align}

&\mathtt{00}g_0,\\

&\mathtt{00}g_1, \ldots, \mathtt{00}g_{k_2}, \mathtt{01}g_{k_2}, \ldots, \mathtt{01}g_1, \mathtt{11}g_1, \ldots, \mathtt{11}g_{k_2}, \\

&\mathtt{11}g_{k_2+1}, \ldots, \mathtt{11}g_{k_3}, \mathtt{01}g_{k_3}, \ldots, \mathtt{01}g_{k_2+1}, \mathtt{00}g_{k_2+1}, \ldots, \mathtt{00}g_{k_3}, \ldots,\\

&\mathtt{00}g_{-2}, \mathtt{00}g_{-1}, \mathtt{10}g_{-1}, \mathtt{10}g_{-2}, \ldots, \mathtt{10}g_0, \mathtt{11}g_0, \mathtt{11}g_{-1}, \mathtt{01}g_{-1}, \mathtt{01}g_0

\end{align}}}

If we define the transition multiplicities

m_i = \left|\left\{ j : \delta_{k_j} = i, 1 \leq j \leq L \right\}\right|

to be the number of times the digit in position i changes between consecutive blocks in a partition, then for the (n + 2)-digit Gray code induced by this partition the transition spectrum \lambda'_i is

\lambda'_i = \begin{cases}

4 \lambda_i - 2 m_i, & \text{if } 0 \leq i < n \\

L, & \text{ otherwise }

\end{cases}

The delicate part of this construction is to find an adequate partitioning of a balanced n-digit Gray code such that the code induced by it remains balanced, but for this only the transition multiplicities matter; joining two consecutive blocks over a digit i transition and splitting another block at another digit i transition produces a different Gray code with exactly the same transition spectrum \lambda'_i, so one may for example designate the first m_i transitions at digit i as those that fall between two blocks. Uniform codes can be found when R \equiv 0 \pmod 4 and R^n \equiv 0 \pmod n, and this construction can be extended to the R-ary case as well.

= Long run Gray codes =

Long run (or maximum gap) Gray codes maximize the distance between consecutive changes of digits in the same position. That is, the minimum run-length of any bit remains unchanged for as long as possible.{{cite journal |author-last=Savage |author-first=Carla Diane |author-link=Carla Diane Savage |title=A Survey of Combinatorial Gray Codes |journal=SIAM Review |publisher=Society for Industrial and Applied Mathematics (SIAM) |volume=39 |issue=4 |pages=605–629 |date=1997 |doi=10.1137/S0036144595295272 |url=http://www4.ncsu.edu/~savage/AVAILABLE_FOR_MAILING/survey.ps|jstor=2132693 |bibcode=1997SIAMR..39..605S |citeseerx=10.1.1.39.1924|s2cid=6375360 }}

= Monotonic Gray codes =

Monotonic codes are useful in the theory of interconnection networks, especially for minimizing dilation for linear arrays of processors.

If we define the weight of a binary string to be the number of 1s in the string, then although we clearly cannot have a Gray code with strictly increasing weight, we may want to approximate this by having the code run through two adjacent weights before reaching the next one.

We can formalize the concept of monotone Gray codes as follows: consider the partition of the hypercube Q_n = (V_n, E_n) into levels of vertices that have equal weight, i.e.

V_n(i) = \{ v \in V_n : v \text{ has weight } i \}

for 0 \leq i \leq n. These levels satisfy |V_n(i)| = \textstyle\binom{n}{i}. Let Q_n(i) be the subgraph of Q_n induced by V_n(i) \cup V_n(i+1), and let E_n(i) be the edges in Q_n(i). A monotonic Gray code is then a Hamiltonian path in Q_n such that whenever \delta_1 \in E_n(i) comes before \delta_2 \in E_n(j) in the path, then i \leq j.

An elegant construction of monotonic n-digit Gray codes for any n is based on the idea of recursively building subpaths P_{n,j} of length 2 \textstyle\binom{n}{j} having edges in E_n(j). We define P_{1,0} = (\mathtt{0}, \mathtt{1}), P_{n,j} = \emptyset whenever j < 0 or j \geq n, and

P_{n+1,j} = \mathtt{1}P^{\pi_n}_{n,j-1}, \mathtt{0}P_{n,j}

otherwise. Here, \pi_n is a suitably defined permutation and P^{\pi} refers to the path P with its coordinates permuted by \pi. These paths give rise to two monotonic n-digit Gray codes G_n^{(1)} and G_n^{(2)} given by

G_n^{(1)} = P_{n,0} P_{n,1}^R P_{n,2} P_{n,3}^R \cdots \text{ and } G_n^{(2)} = P_{n,0}^R P_{n,1} P_{n,2}^R P_{n,3} \cdots

The choice of \pi_n which ensures that these codes are indeed Gray codes turns out to be \pi_n = E^{-1}\left(\pi_{n-1}^2\right). The first few values of P_{n,j} are shown in the table below.

class="wikitable floatright" style="text-align: center;"

|+ Subpaths in the Savage–Winkler algorithm

scope="col" | P_{n,j}

! scope="col" | j = 0

! scope="col" | j = 1

! scope="col" | j = 2

! scope="col" | j = 3

scope="row" | n = 1

| {{mono|0, 1}} || || ||

scope="row" | n = 2

| {{mono|00, 01}} || {{mono|10, 11}} || ||

scope="row" | n = 3

| {{mono|000, 001}} || {{mono|100, 110, 010, 011}} || {{mono|101, 111}} ||

scope="row" | n = 4

| {{mono|0000, 0001}} || {{mono|1000, 1100, 0100, 0110, 0010, 0011}} || {{mono|1010, 1011, 1001, 1101, 0101, 0111}} || {{mono|1110, 1111}}

These monotonic Gray codes can be efficiently implemented in such a way that each subsequent element can be generated in O(n) time. The algorithm is most easily described using coroutines.

Monotonic codes have an interesting connection to the Lovász conjecture, which states that every connected vertex-transitive graph contains a Hamiltonian path. The "middle-level" subgraph Q_{2n+1}(n) is vertex-transitive (that is, its automorphism group is transitive, so that each vertex has the same "local environment" and cannot be differentiated from the others, since we can relabel the coordinates as well as the binary digits to obtain an automorphism) and the problem of finding a Hamiltonian path in this subgraph is called the "middle-levels problem", which can provide insights into the more general conjecture. The question has been answered affirmatively for n \leq 15, and the preceding construction for monotonic codes ensures a Hamiltonian path of length at least 0.839{{px2}}N, where N is the number of vertices in the middle-level subgraph.

= Beckett–Gray code =

Another type of Gray code, the Beckett–Gray code, is named for Irish playwright Samuel Beckett, who was interested in symmetry. His play "Quad" features four actors and is divided into sixteen time periods. Each period ends with one of the four actors entering or leaving the stage. The play begins and ends with an empty stage, and Beckett wanted each subset of actors to appear on stage exactly once. Clearly the set of actors currently on stage can be represented by a 4-bit binary Gray code. Beckett, however, placed an additional restriction on the script: he wished the actors to enter and exit so that the actor who had been on stage the longest would always be the one to exit. The actors could then be represented by a first in, first out queue, so that (of the actors onstage) the actor being dequeued is always the one who was enqueued first. Beckett was unable to find a Beckett–Gray code for his play, and indeed, an exhaustive listing of all possible sequences reveals that no such code exists for n = 4. It is known today that such codes do exist for n = 2, 5, 6, 7, and 8, and do not exist for n = 3 or 4. An example of an 8-bit Beckett–Gray code can be found in Donald Knuth's Art of Computer Programming. According to Sawada and Wong, the search space for n = 6 can be explored in 15 hours, and more than {{val|9,500}} solutions for the case n = 7 have been found.

= Snake-in-the-box codes <span class="anchor" id="Kautz"></span> =

{{snakes_and_coils_in_the_box.svg}}

Snake-in-the-box codes, or snakes, are the sequences of nodes of induced paths in an n-dimensional hypercube graph, and coil-in-the-box codes, or coils, are the sequences of nodes of induced cycles in a hypercube. Viewed as Gray codes, these sequences have the property of being able to detect any single-bit coding error. Codes of this type were first described by William H. Kautz in the late 1950s; since then, there has been much research on finding the code with the largest possible number of codewords for a given hypercube dimension.

= Single-track Gray code <span class="anchor" id="STGC"></span> =

Yet another kind of Gray code is the single-track Gray code (STGC) developed by Norman B. Spedding and refined by Hiltgen, Paterson and Brandestini in Single-track Gray Codes (1996). The STGC is a cyclical list of P unique binary encodings of length n such that two consecutive words differ in exactly one position, and when the list is examined as a P × n matrix, each column is a cyclic shift of the first column.

File:Animated Graycode.gif

The name comes from their use with rotary encoders, where a number of tracks are being sensed by contacts, resulting for each in an output of {{mono|0}} or {{mono|1}}. To reduce noise due to different contacts not switching at exactly the same moment in time, one preferably sets up the tracks so that the data output by the contacts are in Gray code. To get high angular accuracy, one needs lots of contacts; in order to achieve at least 1° accuracy, one needs at least 360 distinct positions per revolution, which requires a minimum of 9 bits of data, and thus the same number of contacts.

If all contacts are placed at the same angular position, then 9 tracks are needed to get a standard BRGC with at least 1° accuracy. However, if the manufacturer moves a contact to a different angular position (but at the same distance from the center shaft), then the corresponding "ring pattern" needs to be rotated the same angle to give the same output. If the most significant bit (the inner ring in Figure 1) is rotated enough, it exactly matches the next ring out. Since both rings are then identical, the inner ring can be cut out, and the sensor for that ring moved to the remaining, identical ring (but offset at that angle from the other sensor on that ring). Those two sensors on a single ring make a quadrature encoder. That reduces the number of tracks for a "1° resolution" angular encoder to 8 tracks. Reducing the number of tracks still further cannot be done with BRGC.

For many years, Torsten Sillke and other mathematicians believed that it was impossible to encode position on a single track such that consecutive positions differed at only a single sensor, except for the 2-sensor, 1-track quadrature encoder. So for applications where 8 tracks were too bulky, people used single-track incremental encoders (quadrature encoders) or 2-track "quadrature encoder + reference notch" encoders.

Norman B. Spedding, however, registered a patent in 1994 with several examples showing that it was possible. Although it is not possible to distinguish 2n positions with n sensors on a single track, it is possible to distinguish close to that many. Etzion and Paterson conjecture that when n is itself a power of 2, n sensors can distinguish at most 2n − 2n positions and that for prime n the limit is 2n − 2 positions. The authors went on to generate a 504-position single track code of length 9 which they believe is optimal. Since this number is larger than 28 = 256, more than 8 sensors are required by any code, although a BRGC could distinguish 512 positions with 9 sensors.

An STGC for P = 30 and n = 5 is reproduced here:

class="wikitable" style="text-align:center; background:#FFFFFF; border-width:0;"

|+ Single-track Gray code for 30 positions

! Angle

Code

|rowspan="7" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="7" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="7" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="7" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code
{{mono|10000}}72°{{mono|01000}}144°{{mono|00100}}216°{{mono|00010}}288°{{mono|00001}}
12°{{mono|10100}}84°{{mono|01010}}156°{{mono|00101}}228°{{mono|10010}}300°{{mono|01001}}
24°{{mono|11100}}96°{{mono|01110}}168°{{mono|00111}}240°{{mono|10011}}312°{{mono|11001}}
36°{{mono|11110}}108°{{mono|01111}}180°{{mono|10111}}252°{{mono|11011}}324°{{mono|11101}}
48°{{mono|11010}}120°{{mono|01101}}192°{{mono|10110}}264°{{mono|01011}}336°{{mono|10101}}
60°{{mono|11000}}132°{{mono|01100}}204°{{mono|00110}}276°{{mono|00011}}348°{{mono|10001}}

Each column is a cyclic shift of the first column, and from any row to the next row only one bit changes.

The single-track nature (like a code chain) is useful in the fabrication of these wheels (compared to BRGC), as only one track is needed, thus reducing their cost and size.

The Gray code nature is useful (compared to chain codes, also called De Bruijn sequences), as only one sensor will change at any one time, so the uncertainty during a transition between two discrete states will only be plus or minus one unit of angular measurement the device is capable of resolving.

File:9-bit, Single-Track Gray Code.gif

Since this 30 degree example was added, there has been a lot of interest in examples with higher angular resolution. In 2008, Gary Williams,{{cite web |last1=Williams |first1=Gary |title='single track gray code' sought for encoding 360 degrees with 9 sensors |url=https://www.experts-exchange.com/questions/23594359/'single-track-gray-code'-sought-for-encoding-360-degrees-with-9-sensors.html#a22127642 |website=Experts Exchange|date=25 July 2008 }}{{ugc|date=January 2025}} based on previous work, discovered a 9-bit single track Gray code that gives a 1 degree resolution. This Gray code was used to design an actual device which was published on the site Thingiverse. This device{{cite web |last1=Bauer |first1=Florian |title=9-Bit Absolute Singletrack Gray Code Rotary Encoder |url=https://www.thingiverse.com/thing:4590077 |website=Thingiverse}} was designed by etzenseep (Florian Bauer) in September 2022.

An STGC for P = 360 and n = 9 is reproduced here:

class="wikitable" style="text-align:center; background:#FFFFFF; border-width:0;"

|+ Single-track Gray code for 360 positions

! Angle

Code

|rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;"|

! Angle

Code

|rowspan="42" style="text-align:center; background:#FFFFFF; border-width:0;"|

{{mono100000001}}

| 40°

{{mono000000011}}

| 80°

{{mono000000110}}

| 120°

{{mono000001100}}

| 160°

{{mono000011000}}

| 200°

{{mono000110000}}

| 240°

{{mono001100000}}

| 280°

{{mono011000000}}

| 320°

{{mono110000000}}
{{mono110000001}}

| 41°

{{mono100000011}}

| 81°

{{mono000000111}}

| 121°

{{mono000001110}}

| 161°

{{mono000011100}}

| 201°

{{mono000111000}}

| 241°

{{mono001110000}}

| 281°

{{mono011100000}}

| 321°

{{mono111000000}}
{{mono111000001}}

| 42°

{{mono110000011}}

| 82°

{{mono100000111}}

| 122°

{{mono000001111}}

| 162°

{{mono000011110}}

| 202°

{{mono000111100}}

| 242°

{{mono001111000}}

| 282°

{{mono011110000}}

| 322°

{{mono111100000}}
{{mono111000011}}

| 43°

{{mono110000111}}

| 83°

{{mono100001111}}

| 123°

{{mono000011111}}

| 163°

{{mono000111110}}

| 203°

{{mono001111100}}

| 243°

{{mono011111000}}

| 283°

{{mono111110000}}

| 323°

{{mono111100001}}
{{mono111000111}}

| 44°

{{mono110001111}}

| 84°

{{mono100011111}}

| 124°

{{mono000111111}}

| 164°

{{mono001111110}}

| 204°

{{mono011111100}}

| 244°

{{mono111111000}}

| 284°

{{mono111110001}}

| 324°

{{mono111100011}}
{{mono111001111}}

| 45°

{{mono110011111}}

| 85°

{{mono100111111}}

| 125°

{{mono001111111}}

| 165°

{{mono011111110}}

| 205°

{{mono111111100}}

| 245°

{{mono111111001}}

| 285°

{{mono111110011}}

| 325°

{{mono111100111}}
{{mono111011111}}

| 46°

{{mono110111111}}

| 86°

{{mono101111111}}

| 126°

{{mono011111111}}

| 166°

{{mono111111110}}

| 206°

{{mono111111101}}

| 246°

{{mono111111011}}

| 286°

{{mono111110111}}

| 326°

{{mono111101111}}
{{mono111011011}}

| 47°

{{mono110110111}}

| 87°

{{mono101101111}}

| 127°

{{mono011011111}}

| 167°

{{mono110111110}}

| 207°

{{mono101111101}}

| 247°

{{mono011111011}}

| 287°

{{mono111110110}}

| 327°

{{mono111101101}}
{{mono101011011}}

| 48°

{{mono010110111}}

| 88°

{{mono101101110}}

| 128°

{{mono011011101}}

| 168°

{{mono110111010}}

| 208°

{{mono101110101}}

| 248°

{{mono011101011}}

| 288°

{{mono111010110}}

| 328°

{{mono110101101}}
{{mono101011111}}

| 49°

{{mono010111111}}

| 89°

{{mono101111110}}

| 129°

{{mono011111101}}

| 169°

{{mono111111010}}

| 209°

{{mono111110101}}

| 249°

{{mono111101011}}

| 289°

{{mono111010111}}

| 329°

{{mono110101111}}
10°{{mono101011101}}

| 50°

{{mono010111011}}

| 90°

{{mono101110110}}

| 130°

{{mono011101101}}

| 170°

{{mono111011010}}

| 210°

{{mono110110101}}

| 250°

{{mono101101011}}

| 290°

{{mono011010111}}

| 330°

{{mono110101110}}
11°{{mono101010101}}

| 51°

{{mono010101011}}

| 91°

{{mono101010110}}

| 131°

{{mono010101101}}

| 171°

{{mono101011010}}

| 211°

{{mono010110101}}

| 251°

{{mono101101010}}

| 291°

{{mono011010101}}

| 331°

{{mono110101010}}
12°{{mono101010111}}

| 52°

{{mono010101111}}

| 92°

{{mono101011110}}

| 132°

{{mono010111101}}

| 172°

{{mono101111010}}

| 212°

{{mono011110101}}

| 252°

{{mono111101010}}

| 292°

{{mono111010101}}

| 332°

{{mono110101011}}
13°{{mono101110111}}

| 53°

{{mono011101111}}

| 93°

{{mono111011110}}

| 133°

{{mono110111101}}

| 173°

{{mono101111011}}

| 213°

{{mono011110111}}

| 253°

{{mono111101110}}

| 293°

{{mono111011101}}

| 333°

{{mono110111011}}
14°{{mono001110111}}

| 54°

{{mono011101110}}

| 94°

{{mono111011100}}

| 134°

{{mono110111001}}

| 174°

{{mono101110011}}

| 214°

{{mono011100111}}

| 254°

{{mono111001110}}

| 294°

{{mono110011101}}

| 334°

{{mono100111011}}
15°{{mono001010111}}

| 55°

{{mono010101110}}

| 95°

{{mono101011100}}

| 135°

{{mono010111001}}

| 175°

{{mono101110010}}

| 215°

{{mono011100101}}

| 255°

{{mono111001010}}

| 295°

{{mono110010101}}

| 335°

{{mono100101011}}
16°{{mono001011111}}

| 56°

{{mono010111110}}

| 96°

{{mono101111100}}

| 136°

{{mono011111001}}

| 176°

{{mono111110010}}

| 216°

{{mono111100101}}

| 256°

{{mono111001011}}

| 296°

{{mono110010111}}

| 336°

{{mono100101111}}
17°{{mono001011011}}

| 57°

{{mono010110110}}

| 97°

{{mono101101100}}

| 137°

{{mono011011001}}

| 177°

{{mono110110010}}

| 217°

{{mono101100101}}

| 257°

{{mono011001011}}

| 297°

{{mono110010110}}

| 337°

{{mono100101101}}
18°{{mono001011001}}

| 58°

{{mono010110010}}

| 98°

{{mono101100100}}

| 138°

{{mono011001001}}

| 178°

{{mono110010010}}

| 218°

{{mono100100101}}

| 258°

{{mono001001011}}

| 298°

{{mono010010110}}

| 338°

{{mono100101100}}
19°{{mono001111001}}

| 59°

{{mono011110010}}

| 99°

{{mono111100100}}

| 139°

{{mono111001001}}

| 179°

{{mono110010011}}

| 219°

{{mono100100111}}

| 259°

{{mono001001111}}

| 299°

{{mono010011110}}

| 339°

{{mono100111100}}
20°{{mono001111101}}

| 60°

{{mono011111010}}

| 100°

{{mono111110100}}

| 140°

{{mono111101001}}

| 180°

{{mono111010011}}

| 220°

{{mono110100111}}

| 260°

{{mono101001111}}

| 300°

{{mono010011111}}

| 340°

{{mono100111110}}
21°{{mono000111101}}

| 61°

{{mono001111010}}

| 101°

{{mono011110100}}

| 141°

{{mono111101000}}

| 181°

{{mono111010001}}

| 221°

{{mono110100011}}

| 261°

{{mono101000111}}

| 301°

{{mono010001111}}

| 341°

{{mono100011110}}
22°{{mono000110101}}

| 62°

{{mono001101010}}

| 102°

{{mono011010100}}

| 142°

{{mono110101000}}

| 182°

{{mono101010001}}

| 222°

{{mono010100011}}

| 262°

{{mono101000110}}

| 302°

{{mono010001101}}

| 342°

{{mono100011010}}
23°{{mono000100101}}

| 63°

{{mono001001010}}

| 103°

{{mono010010100}}

| 143°

{{mono100101000}}

| 183°

{{mono001010001}}

| 223°

{{mono010100010}}

| 263°

{{mono101000100}}

| 303°

{{mono010001001}}

| 343°

{{mono100010010}}
24°{{mono000101101}}

| 64°

{{mono001011010}}

| 104°

{{mono010110100}}

| 144°

{{mono101101000}}

| 184°

{{mono011010001}}

| 224°

{{mono110100010}}

| 264°

{{mono101000101}}

| 304°

{{mono010001011}}

| 344°

{{mono100010110}}
25°{{mono000101001}}

| 65°

{{mono001010010}}

| 105°

{{mono010100100}}

| 145°

{{mono101001000}}

| 185°

{{mono010010001}}

| 225°

{{mono100100010}}

| 265°

{{mono001000101}}

| 305°

{{mono010001010}}

| 345°

{{mono100010100}}
26°{{mono000111001}}

| 66°

{{mono001110010}}

| 106°

{{mono011100100}}

| 146°

{{mono111001000}}

| 186°

{{mono110010001}}

| 226°

{{mono100100011}}

| 266°

{{mono001000111}}

| 306°

{{mono010001110}}

| 346°

{{mono100011100}}
27°{{mono000110001}}

| 67°

{{mono001100010}}

| 107°

{{mono011000100}}

| 147°

{{mono110001000}}

| 187°

{{mono100010001}}

| 227°

{{mono000100011}}

| 267°

{{mono001000110}}

| 307°

{{mono010001100}}

| 347°

{{mono100011000}}
28°{{mono000010001}}

| 68°

{{mono000100010}}

| 108°

{{mono001000100}}

| 148°

{{mono010001000}}

| 188°

{{mono100010000}}

| 228°

{{mono000100001}}

| 268°

{{mono001000010}}

| 308°

{{mono010000100}}

| 348°

{{mono100001000}}
29°{{mono000011001}}

| 69°

{{mono000110010}}

| 109°

{{mono001100100}}

| 149°

{{mono011001000}}

| 189°

{{mono110010000}}

| 229°

{{mono100100001}}

| 269°

{{mono001000011}}

| 309°

{{mono010000110}}

| 349°

{{mono100001100}}
30°{{mono000001001}}

| 70°

{{mono000010010}}

| 110°

{{mono000100100}}

| 150°

{{mono001001000}}

| 190°

{{mono010010000}}

| 230°

{{mono100100000}}

| 270°

{{mono001000001}}

| 310°

{{mono010000010}}

| 350°

{{mono100000100}}
31°{{mono100001001}}

| 71°

{{mono000010011}}

| 111°

{{mono000100110}}

| 151°

{{mono001001100}}

| 191°

{{mono010011000}}

| 231°

{{mono100110000}}

| 271°

{{mono001100001}}

| 311°

{{mono011000010}}

| 351°

{{mono110000100}}
32°{{mono100001101}}

| 72°

{{mono000011011}}

| 112°

{{mono000110110}}

| 152°

{{mono001101100}}

| 192°

{{mono011011000}}

| 232°

{{mono110110000}}

| 272°

{{mono101100001}}

| 312°

{{mono011000011}}

| 352°

{{mono110000110}}
33°{{mono100000101}}

| 73°

{{mono000001011}}

| 113°

{{mono000010110}}

| 153°

{{mono000101100}}

| 193°

{{mono001011000}}

| 233°

{{mono010110000}}

| 273°

{{mono101100000}}

| 313°

{{mono011000001}}

| 353°

{{mono110000010}}
34°{{mono110000101}}

| 74°

{{mono100001011}}

| 114°

{{mono000010111}}

| 154°

{{mono000101110}}

| 194°

{{mono001011100}}

| 234°

{{mono010111000}}

| 274°

{{mono101110000}}

| 314°

{{mono011100001}}

| 354°

{{mono111000010}}
35°{{mono010000101}}

| 75°

{{mono100001010}}

| 115°

{{mono000010101}}

| 155°

{{mono000101010}}

| 195°

{{mono001010100}}

| 235°

{{mono010101000}}

| 275°

{{mono101010000}}

| 315°

{{mono010100001}}

| 355°

{{mono101000010}}
36°{{mono010000111}}

| 76°

{{mono100001110}}

| 116°

{{mono000011101}}

| 156°

{{mono000111010}}

| 196°

{{mono001110100}}

| 236°

{{mono011101000}}

| 276°

{{mono111010000}}

| 316°

{{mono110100001}}

| 356°

{{mono101000011}}
37°{{mono010000011}}

| 77°

{{mono100000110}}

| 117°

{{mono000001101}}

| 157°

{{mono000011010}}

| 197°

{{mono000110100}}

| 237°

{{mono001101000}}

| 277°

{{mono011010000}}

| 317°

{{mono110100000}}

| 357°

{{mono101000001}}
38°{{mono010000001}}

| 78°

{{mono100000010}}

| 118°

{{mono000000101}}

| 158°

{{mono000001010}}

| 198°

{{mono000010100}}

| 238°

{{mono000101000}}

| 278°

{{mono001010000}}

| 318°

{{mono010100000}}

| 358°

{{mono101000000}}
39°{{mono000000001}}

| 79°

{{mono000000010}}

| 119°

{{mono000000100}}

| 159°

{{mono000001000}}

| 199°

{{mono000010000}}

| 239°

{{mono000100000}}

| 279°

{{mono001000000}}

| 319°

{{mono010000000}}

| 359°

{{mono100000000}}

class="wikitable" style="text-align:center; background:#FFFFFF; border-width:0;"

|+ Starting and ending angles for the 20 tracks for a single-track Gray code with 9 sensors separated by 40°

! Starting angle

Ending angleLength

|rowspan="21" style="text-align:center; background:#FFFFFF; border-width:0;"|

342
23286
31377
44485
56605
64718
74763
88914
94963
991046
1101156
1311344
13815417
1731819
1861872
22023819
2422465
2732797
2862894
30736054

= Two-dimensional Gray code =

File:16QAM Gray Coded.svg]]

Two-dimensional Gray codes are used in communication to minimize the number of bit errors in quadrature amplitude modulation (QAM) adjacent points in the constellation. In a typical encoding the horizontal and vertical adjacent constellation points differ by a single bit, and diagonal adjacent points differ by 2 bits.

Two-dimensional Gray codes also have uses in location identifications schemes, where the code would be applied to area maps such as a Mercator projection of the earth's surface and an appropriate cyclic two-dimensional distance function such as the Mannheim metric be used to calculate the distance between two encoded locations, thereby combining the characteristics of the Hamming distance with the cyclic continuation of a Mercator projection.

= Excess Gray code =

If a subsection of a specific codevalue is extracted from that value, for example the last 3 bits of a 4-bit Gray code, the resulting code will be an "excess Gray code". This code shows the property of counting backwards in those extracted bits if the original value is further increased. Reason for this is that Gray-encoded values do not show the behaviour of overflow, known from classic binary encoding, when increasing past the "highest" value.

Example: The highest 3-bit Gray code, 7, is encoded as (0)100. Adding 1 results in number 8, encoded in Gray as 1100. The last 3 bits do not overflow and count backwards if you further increase the original 4 bit code.

When working with sensors that output multiple, Gray-encoded values in a serial fashion, one should therefore pay attention whether the sensor produces those multiple values encoded in 1 single Gray code or as separate ones, as otherwise the values might appear to be counting backwards when an "overflow" is expected.

Gray isometry

The bijective mapping { 0 ↔ {{mono|00}}, 1 ↔ {{mono|01}}, 2 ↔ {{mono|11}}, 3 ↔ {{mono|10}} } establishes an isometry between the metric space over the finite field \mathbb{Z}_2^2 with the metric given by the Hamming distance and the metric space over the finite ring \mathbb{Z}_4 (the usual modular arithmetic) with the metric given by the Lee distance. The mapping is suitably extended to an isometry of the Hamming spaces \mathbb{Z}_2^{2m} and \mathbb{Z}_4^m. Its importance lies in establishing a correspondence between various "good" but not necessarily linear codes as Gray-map images in \mathbb{Z}_2^2 of ring-linear codes from \mathbb{Z}_4.

Related codes

{{Excessive citations|section|date=March 2021|details=Too many references makes the text hard to read}}

There are a number of binary codes similar to Gray codes, including:

  • {{anchor|Datex}}Datex codes or Giannini codes (1954), as described by Carl P. Spaulding, use a variant of O'Brien code II.
  • {{anchor|Varec}} Codes used by Varec (c. 1954), use a variant of O'Brien code I as well as base-12 and base-16 Gray code variants.
  • {{anchor|Lucal|MRB}}Lucal code (1959) aka modified reflected binary code (MRB)
  • {{anchor|Gillham}}Gillham code (1961/1962), uses a variant of Datex code and O'Brien code II.
  • {{anchor|Leslie-Russell}}Leslie and Russell code (1964)
  • {{anchor|RRE}}Royal Radar Establishment code
  • {{anchor|Hoklas}}Hoklas code (1988)

The following binary-coded decimal (BCD) codes are Gray code variants as well:

  • {{anchor|Petherick|RAE}}Petherick code (1953), also known as Royal Aircraft Establishment (RAE) code.
  • {{anchor|Foss|O'Brien|O'Brien I|Watts|O'Brien II}}O'Brien codes I and II (1955) (An O'Brien type-I code was already described by Frederic A. Foss of IBM and used by Varec in 1954. Later, it was also known as Watts code or Watts reflected decimal (WRD) code and is sometimes ambiguously referred to as reflected binary modified Gray code. An O'Brien type-II code was already used by Datex in 1954.)
  • {{anchor|Gray excess|Gray–Stibitz}}Excess-3 Gray code (1956) (aka Gray excess-3 code, Gray 3-excess code, reflex excess-3 code, excess Gray code, Gray excess code, 10-excess-3 Gray code or Gray–Stibitz code), described by Frank P. Turvey Jr. of ITT.
  • {{anchor|Tompkins|Tompkins I|Tompkins II}}Tompkins codes I and II (1956)
  • {{anchor|Glixon}}Glixon code (1957), sometimes ambiguously also called modified Gray code

class="wikitable" style="text-align:center;"

|+ 4-bit unit-distance BCD codes

NameBitstyle="background:lightgray;width:1em"|0style="background:lightgray;width:1em"|1style="background:lightgray;width:1em"|2style="background:lightgray;width:1em"|3style="background:lightgray;width:1em"|4style="background:lightgray;width:1em"|5style="background:lightgray;width:1em"|6style="background:lightgray;width:1em"|7style="background:lightgray;width:1em"|8style="background:lightgray;width:1em"|9WeightsTracksCompl.Cyclic5s Comment
colspan="18"|
rowspan="4"| {{anchor|Gray BCD}}Gray BCDstyle="background:lightgray"|4{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|0–3rowspan="4"|4 (3)rowspan="4"|Norowspan="4"|(2, 4, 8, 16)rowspan="4"|Norowspan="4"|
style="background:lightgray"|3{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}
style="background:lightgray"|2{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}
style="background:lightgray"|1{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}
colspan="18"|
rowspan="4"| {{anchor|Paul}}Paulstyle="background:lightgray"|4style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|1–3rowspan="4"|4 (3)rowspan="4"|Norowspan="4"|2, 10rowspan="4"|Norowspan="4"|
style="background:lightgray"|3{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}
style="background:lightgray"|2{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}
style="background:lightgray"|1style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}
colspan="18"|
rowspan="4"|Glixonstyle="background:lightgray"|4{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|0–3rowspan="4"|4rowspan="4"|Norowspan="4"|2, 4, 8, 10rowspan="4"|(shifted +1)rowspan="4"|
style="background:lightgray"|3{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}
style="background:lightgray"|2{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}
style="background:lightgray"|1{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}
colspan="18"|
rowspan="4"|Tompkins Istyle="background:lightgray"|4{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|0–4rowspan="4"|2rowspan="4"|Norowspan="4"|2, 4, 10rowspan="4"|Yesrowspan="4"|
style="background:lightgray"|3{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}
style="background:lightgray"|2{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}
style="background:lightgray"|1{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}
colspan="18"|
rowspan="4"|O'Brien I (Watts)style="background:lightgray"|4{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|0–3rowspan="4"|4rowspan="4"|9rowspan="4"|2, 4, 10rowspan="4"|Yesrowspan="4"|
style="background:lightgray"|3{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}
style="background:lightgray"|2{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}
style="background:lightgray"|1{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}
colspan="18"|
rowspan="4"|Petherick (RAE)style="background:lightgray"|4{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|1–3rowspan="4"|3rowspan="4"|9rowspan="4"|2, 10rowspan="4"|Yesrowspan="4"|
style="background:lightgray"|3style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}
style="background:lightgray"|2{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}
style="background:lightgray"|1style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}
colspan="18"|
rowspan="4"|O'Brien IIstyle="background:lightgray"|4{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|1–3rowspan="4"|3rowspan="4"|9rowspan="4"|2, 10rowspan="4"|Yesrowspan="4"|
style="background:lightgray"|3{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}
style="background:lightgray"|2{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}
style="background:lightgray"|1style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}
colspan="18"|
rowspan="4"|{{anchor|Susskind}}Susskindstyle="background:lightgray"|4{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|1–4rowspan="4"|3rowspan="4"|9rowspan="4"|2, 10rowspan="4"|Yesrowspan="4"|
style="background:lightgray"|3{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}
style="background:lightgray"|2{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}
style="background:lightgray"|1style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}
colspan="18"|
rowspan="4"|{{anchor|Klar}}Klarstyle="background:lightgray"|4{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|0–4rowspan="4"|4 (3)rowspan="4"|9rowspan="4"|2, 10rowspan="4"|Yesrowspan="4"|
style="background:lightgray"|3{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}
style="background:lightgray"|2{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}
style="background:lightgray"|1{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}
colspan="18"|
rowspan="4"|Tompkins IIstyle="background:lightgray"|4{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|1–3rowspan="4"|2rowspan="4"|9rowspan="4"|2, 10rowspan="4"|Yesrowspan="4"|
style="background:lightgray"|3{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}
style="background:lightgray"|2style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}
style="background:lightgray"|1{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}
colspan="18"|
rowspan="4"|{{nowrap|Excess-3 Gray}}style="background:lightgray"|4{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}rowspan="4"|1–4rowspan="4"|4rowspan="4"|9rowspan="4"|2, 10rowspan="4"|Yesrowspan="4"|
style="background:lightgray"|3{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}
style="background:lightgray"|2style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}
style="background:lightgray"|1{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}style="background:#0FF"|{{mono|1}}style="background:#0FF"|{{mono|1}}{{mono|0}}{{mono|0}}

See also

Notes

{{reflist|group="nb"|refs=

Sequence 0, 1, 0, 2, 0, 1, 0, 3, … {{OEIS|id=A007814}}.

By interchanging and inverting three bit rows, the O'Brien code II and the Petherick code can be transferred into each other.

By swapping two pairs of bit rows, individually shifting four bit rows and inverting one of them, the Glixon code and the O'Brien code I can be transferred into each other.

By applying a simple inversion rule, the Gray code and the O'Brien code I can be translated into the 8421 pure binary code and the 2421 Aiken code, respectively, to ease arithmetic operations.{{citeref|Evans|1961|C}}

There are several Gray code variants which are called "modified" of some sort: The Glixon code is sometimes called modified Gray code.{{citeref|Powell|1968|D|}} The Lucal code is also called modified reflected binary code (MRB).{{citeref|Sellers, Jr.|Hsiao|Bearnson|1968|E}} The O'Brien code I or Watts code is sometimes referred to as reflected binary modified Gray code.{{citeref|Savard|2018|F|}}

For O'Brien codes I and II and Petherick, Susskind, Klar as well as Excess-3 Gray codes, a 9s complement can be derived by inverting the most-significant (fourth) binary digit.

For Tompkins code II, a 9s complement can be derived by inverting the first three digits and swapping the two middle binary digits.

For Gray BCD, Paul and Klar codes, the number of necessary reading tracks can be reduced from 4 to 3 if inversion of one of the middle tracks is acceptable.

Depending on a code's target application, the Hamming weights of a code can be important properties beyond coding-theoretical considerations also for physical reasons. Under some circumstances the all-cleared and/or all-set states must be omitted (f.e. to avoid non-conductive or short-circuit conditions), it may be desirable to keep the highest used weight as low as possible (f.e. to reduce power consumption of the reader circuit) or to keep the variance of used weights small (f.e. to reduce acoustic noise or current fluctuations).

Other unit-distance BCD codes include the non-Gray code related 5-bit Libaw–Craig and the 1-2-1 code.

}}

References

{{reflist|refs=

{{cite magazine |title=The curious properties of the Gray code and how it can be used to solve puzzles |author-first=Martin |author-last=Gardner |author-link=Martin Gardner |date=August 1972 |series=Mathematical Games |magazine=Scientific American |volume=227 |number=2 |page=106}} (1 page)

{{cite book |title=La tour d'Hanoï: Véritable casse tête annamite - Jeu rapporté du Tonkin par le Professeur N. Claus (de Siam) Mandarin du Collège Li Sou Stian! |language=fr |author-first=Édouard |author-last=Lucas |author-link=Édouard Lucas |date=November 1883 |publisher=Imprimerie Paul Bousrez, Tours.}} (NB. N. Claus de Siam is an anagram of Lucas d'Amiens, pseudonym of the author Édouard Lucas.)

{{cite journal |title=La tour d'Hanoï, véritable casse-tête annamite, jeu rapporté du Tonkin par le professeur N. Claus (de Siam), mandarin du collège Li-Sou-Stian. Un vrai casse-tête, en effet, mais intéressant. Nous ne saurions mieux remercier le mandarin de son aimable intention à l'égard d'un profane qu'en signalant la Tour d'Hanoï aux personnes patientes possédées par le démon du jeu. |language=fr |editor-first=Henri |editor-last=de Parville |editor-link=:fr:Henri de Parville |date=1883-12-27 |journal=Journal des Débats Politiques et Littéraires |series=Revue des science |type=Review |edition=Matin |publication-place=Paris, France |id=ark:/12148/bpt6k462461g |pages=1–2 [2] |url=https://gallica.bnf.fr/ark:/12148/bpt6k462461g/f2.item |access-date=2020-12-18 |url-status=live |archive-url=https://web.archive.org/web/20201218125345/https://gallica.bnf.fr/ark:/12148/bpt6k462461g/f2.item |archive-date=2020-12-18}} (1 page)

{{cite journal |title=La Tour d'Hanoï |language=en, fr |editor-first1=Robert Edgar |editor-last1=Allardice |editor-link1=Robert Edgar Allardice |editor-first2=Alexander Yule |editor-last2=Fraser |editor-link2=Alexander Yule Fraser |journal=Proceedings of the Edinburgh Mathematical Society |volume=2 |number=5 |date=February 1883 |pages=50–53 |doi=10.1017/S0013091500037147 |issn=0013-0915 |eissn=1464-3839 |publisher=Edinburgh Mathematical Society |last1=Allardice |first1=R. E. |last2=Fraser |first2=A. Y. |doi-broken-date=1 November 2024 |s2cid=122159381 |doi-access=free }} [https://web.archive.org/web/20201218112132/https://www.cambridge.org/core/services/aop-cambridge-core/content/view/082EFE016BF3313A7BAA9335A9C0BCC1/S0013091500037147a.pdf/la-tour-d-hanoi.pdf] (4 pages)

{{cite book |author-first=Édouard |author-last=Lucas |author-link=Édouard Lucas |title=Récréations mathématiques |language=fr |volume=3 |orig-date=1892 |edition=Librairie Albert Blanchard reissue |date=1979 |page=58}} (The first edition of this book was published post-humously.)

{{cite book |title=Théorie du baguenodier par un clerc de notaire lyonnais |language=fr |author-first=Luc-Agathon-Louis |author-last=Gros |date=1872 |publisher=Aimé Vingtrinier |edition=1 |publication-place=Lyon, France |url=https://books.google.com/books?id=EcoBJRekd-sC&pg=PP1 |access-date=2020-12-17 |url-status=live |archive-url=http://archive.wikiwix.com/cache/20170403080613/https://books.google.fr/books?id=EcoBJRekd-sC&pg=PP1 |archive-date=2017-04-03}} [https://web.archive.org/web/20201217202507/https://books.googleusercontent.com/books/content?req=AKW5Qacg5gq7SW9L1sUUqK7LQ0yJLqaCu90GFZZYzcH7dsoifr-n9hxiB30SJ1mXq3FhDejHQ7fXY2ZdzlhFywe8pQGNTgMHjX0ANYxRohedbG1FmoPTuKibswKOO7qS2X4MUwQP0dBn-vt3dfTIBFRvTBOVoZZA1ROBXTGTMybnA4gGndl8v0qIAeKsRNUuEddqabMqMngisr8fp-iNt7NMFfwq_tPk0we0yXNJWj74AFsFr1JGOlAmdQ6B_OJVTOj33IhoYybhf8LMzfpaHusXsY2BWT2ZwVQulW0mgBaem9xvRZ58TSw](2+16+4 pages and 4 pages foldout) (NB. This booklet was published anonymously, but is known to have been authored by Louis Gros.)

{{cite journal |title=Le télégraphe imprimeur Baudot |language=fr |author-first=Timotheus |author-last=Rothen |date=1884-12-25 |journal=Journal Télégraphique |publisher=Le Bureau International des Administrations Télégraphiques |publication-place=Berne, Switzerland |volume=VIII / #16 |number=12 |id=ark:/12148/bpt6k5725454q |issn=2223-1420 |eissn=2725-738X |pages=241–253 [249] |url=https://gallica.bnf.fr/ark:/12148/bpt6k5725454q/f9.item |access-date=2020-12-20 |archive-date=2020-12-21 |archive-url=https://web.archive.org/web/20201221162054/https://gallica.bnf.fr/ark:/12148/bpt6k5725454q/f9.item.zoom |url-status=live }}

{{cite book |title=The Baudôt Printing Telegraph System |author-first=Henry Walter |author-last=Pendry |edition=2 |location=London, UK |publisher=Sir Isaac Pitman and Sons, Ltd. |publication-place=London, Bath, Melbourne, New York |date=1920 |orig-date=October 1919 |pages=43–44 |lccn=21005277 |oclc=778309351 |ol=OL6633244M |url=https://books.google.com/books?id=CfQKAQAAIAAJ |access-date=2020-12-20}} (vii+184 pages) (NB. A first edition was published in 1913.)

{{cite conference |chapter=Computer prehistory and history in central Europe |author-first=Heinrich "Heinz" Josef |author-last=Zemanek |author-link=Heinrich Josef Zemanek |date=1976-06-07 |conference=AFIPS '76: Proceedings of the June 7–10, 1976, national computer conference and exposition June 1976 |title=International Workshop on Managing Requirements Knowledge |publisher=American Federation of Information Processing Societies, Association for Computing Machinery |publication-place=New York, USA |location=Vienna, Austria |volume=1 |isbn=978-1-4503-7917-5 |doi=10.1145/1499799.1499803 |s2cid=14114959 |pages=15–20 |chapter-url=https://www.computer.org/csdl/pds/api/csdl/proceedings/download-article/12OmNzZEAtH/pdf |access-date=2020-12-17 |url-status=live |archive-url=https://web.archive.org/web/20201217230013/https://www.computer.org/csdl/pds/api/csdl/proceedings/download-article/12OmNzZEAtH/pdf |archive-date=2020-12-17 |quote-page=17 |quote=[…] In 1874, {{ill|Otto Schäffler{{!}}Schaeffler|de|Theodor Heinrich Otto Schäffler}} invented another printing telegraph, a quadruple system like the Baudot, but mechanically more sophisticated. The Hughes telegraph had two synchronously rotating fingers, one in the sender and one in the receiver. By a piano-like keyboard the operator selected a letter and thereby made contact with the rotating finger in the corresponding direction. Since the receiving finger was in the same direction at this moment, the receiver could print the correct letter. The Baudot and the Schaeffler printing telegraphs use a five-bit binary code. ... Schaeffler's code is a reflected binary code! What F. Gray patented in 1953 for PCM, Schaeffler had applied in his telegraph in 1874, and for a similar reason: reliability. He had contact fingers sensing on five cams consecutively all combinations; the right one triggers printing. If the fingers are to make a minimal number of movements, the solution is the reflected binary code. For Schaeffler, this idea was a minor one. More exactly, the code is described in a letter by the Austrian Post employee, J[ohann] N[epomuk] Teufelhart, {{citeref|Rothen|1878|inserted there|style=plain}} as a footnote and telling that Schaeffler found the code by combining wooden bars with the different combinations until he had the best solution. Another Post employee, Alexander Wilhelm Lambert of Linz, claims to have shown this code to Schaeffler as early as 1872, but this claim is not clear and cannot be checked. […]}} (6 pages)

{{cite book |title=Otto Schäffler (1838-1928). Pionier des Telephons, der Telegraphie und der Lochkarte sowie Erbauer der ersten Wiener Telephonzentrale |language=de, en |author-first=Heinrich "Heinz" Josef |author-last=Zemanek |author-link=Heinrich Josef Zemanek |series=Blätter für Technikgeschichte |volume=41–43 (1979–1981) |issn=0067-9127 |edition=1 |pages=81–118 |publication-place=Vienna, Austria |publisher=Technisches Museum für Industrie und Gewerbe, Forschungsinstitut für Technikgeschichte / Springer-Verlag |date=1983-12-01 |isbn=3-21181779-4 |oclc=952698275}}

{{cite web |title=Binary counter |author-first=George Robert |author-last=Stibitz |author-link=George Robert Stibitz |id={{US patent|2307868}}. Serial No. 420537 |orig-date=1941-11-26 |date=1943-01-12 |publisher=Bell Telephone Laboratories, Incorporated |publication-place=New York, USA |url=https://patents.google.com/patent/US2307868?oq=US2307868 |access-date=2020-05-24 |quote-page=2, right column, rows 43–73 |quote=[…] A clearer idea of the position of the balls after each pulse will be obtained if the set of balls is represented by a number having a similar number of digits, each of which may have one of two arbitrary values, for example 0 and 1. If the upper position is called 0 and the lower position […] 1, then the setting of the counter […] may be read from left to right as 0,100,000. […] Following is a translation of the number of pulses received into this form of binary notation for the first sixteen pulses as received on the first five balls […] Pulse number […] Binary notation […]}} [https://web.archive.org/web/20201217181617/https://patentimages.storage.googleapis.com/51/a5/54/f2f6faf23da3fb/US2307868.pdf] (4 pages)

{{cite book |author-first=Frank |author-last=Gray |author-link=Frank Gray (researcher) |title=Pulse Code Communication |date=1953-03-17 |orig-date=1947-11-13 |publisher=Bell Telephone Laboratories, Incorporated |location=New York, USA |id={{US patent|2632058}}. Serial No. 785697 |url=https://patentimages.storage.googleapis.com/a3/d7/f2/0343f5f2c0cf50/US2632058.pdf |access-date=2020-08-05 |url-status=live |archive-url=https://web.archive.org/web/20200805094312/https://patentimages.storage.googleapis.com/a3/d7/f2/0343f5f2c0cf50/US2632058.pdf |archive-date=2020-08-05}} (13 pages)

{{cite book |author-first=Jack |author-last=Breckman |title=Encoding Circuit |date=1956-01-31 |orig-date=1953-12-31 |publisher=US Secretary of the Army |location=Long Branch, New Jersey, USA |id={{US patent|2733432}}. Serial No. 401738 |url=https://patentimages.storage.googleapis.com/46/90/d6/2ed9fb7a77e643/US2733432.pdf |access-date=2020-08-05 |url-status=live |archive-url=https://web.archive.org/web/20200805094857/https://patentimages.storage.googleapis.com/46/90/d6/2ed9fb7a77e643/US2733432.pdf |archive-date=2020-08-05}} (8 pages)

{{cite book |author-first1=Earl Albert |author-last1=Ragland |author-first2=Harry B. |author-last2=Schultheis, Jr. |title=Direction-Sensitive Binary Code Position Control System |date=1958-02-11 |orig-date=1953-10-16 |publisher=Bendix Aviation Corporation |location=North Hollywood, California, USA |id={{US patent|2823345}}. Serial No. 386524 |url=https://patentimages.storage.googleapis.com/ad/74/b1/2b0aa965d0c1df/US2823345.pdf |access-date=2020-08-05 |url-status=live |archive-url=https://web.archive.org/web/20200805095445/https://patentimages.storage.googleapis.com/ad/74/b1/2b0aa965d0c1df/US2823345.pdf |archive-date=2020-08-05}} (10 pages)

{{cite book |author-first1=Sol |author-last1=Domeshek |author-first2=Stewart |author-last2=Reiner |title=Automatic Rectification System |date=1958-06-24 |orig-date=1954-01-08 |publisher=US Secretary of the Navy |id={{US patent|2839974}}. Serial No. 403085 |url=https://patentimages.storage.googleapis.com/9d/bf/65/e676a661e1217e/US2839974.pdf |access-date=2020-08-05 |url-status=live |archive-url=https://web.archive.org/web/20200805100327/https://patentimages.storage.googleapis.com/9d/bf/65/e676a661e1217e/US2839974.pdf |archive-date=2020-08-05}} (8 pages)

{{cite book |title=Reflected binary code counter |author-first=George D. |author-last=Hulst |publisher=International Telephone and Telegraph Corporation (ITT) |location=Nutley, New Jersey, USA |date=1962-02-06 |orig-date=1957-11-15 |id={{US patent|3020481}}. Serial No. 696793 |url=https://patentimages.storage.googleapis.com/a2/e5/21/f5abbb073bf21c/US3020481.pdf |access-date=2020-08-06 |url-status=live |archive-url=https://web.archive.org/web/20200806210248/https://patentimages.storage.googleapis.com/a2/e5/21/f5abbb073bf21c/US3020481.pdf |archive-date=2020-08-06}} (5 pages)

{{cite book |title=The Gray Code |series=CDMTCS Research Report Series |author-first=Robert "Bob" William |author-last=Doran |author-link=Robert William Doran |publisher=Centre for Discrete Mathematics and Theoretical Computer Science, University of Auckland, New Zealand |date=March 2007 |id=CDMTCS-304 |url=https://www.cs.auckland.ac.nz/research/groups/CDMTCS//researchreports/304bob.pdf |access-date=2020-05-23 |url-status=live |archive-url=https://web.archive.org/web/20200522091749/https://www.cs.auckland.ac.nz/research/groups/CDMTCS//researchreports/304bob.pdf |archive-date=2020-05-22}} (25 pages)

{{cite web |title=Pulse-Count Coder |author-first=Frank P. |author-last=Turvey, Jr. |id={{US patent|2845617A}}. Serial No. 585494 |date=1958-07-29 |orig-date=1956-05-17 |publisher=International Telephone and Telegraph Corporation |location=Nutley, New Jersey, USA |url=https://patentimages.storage.googleapis.com/14/07/c6/404dafe27dc829/US2845617.pdf |access-date=2020-05-23 |url-status=live |archive-url=https://web.archive.org/web/20200523115811/https://patentimages.storage.googleapis.com/14/07/c6/404dafe27dc829/US2845617.pdf |archive-date=2020-05-23}} (5 pages)

{{cite journal |title=Shaft Angle Encoders Afford High Accuracy |author-first=C. Farrell |author-last=Winder |journal=Electronic Industries |publisher=Chilton Company |volume=18 |number=10 |date=October 1959 |pages=76–80 |url=https://worldradiohistory.com/Archive-Tele-Tech/50s/Electronic-Industries-1959-10.pdf |access-date=2018-01-14 |archive-url=https://web.archive.org/web/20200928132232/https://worldradiohistory.com/Archive-Tele-Tech/50s/Electronic-Industries-1959-10.pdf |archive-date=2020-09-28 |quote-page=78 |quote=[…] The type of code wheel most popular in optical encoders contains a cyclic binary code pattern designed to give a cyclic sequence of "on-off" outputs. The cyclic binary code is also known as the cyclic progression code, the reflected binary code, and the Gray code. This code was originated by G. R. Stibitz, of Bell Telephone Laboratories, and was first proposed for pulse-code modulation systems by Frank Gray, also of BTL. Thus the name Gray code. The Gray or cyclic code is used mainly to eliminate the possibility of errors at code transition which could result in gross ambiguities. […]}}

{{cite journal |author-last=Karnaugh |author-first=Maurice |author-link=Maurice Karnaugh |title=The Map Method for Synthesis of Combinational Logic Circuits |journal=Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics |volume=72 |issue=5 |pages=593–599 |date=November 1953 |orig-date=1953-04-23, 1953-03-17 |id=Paper 53-217 |doi=10.1109/TCE.1953.6371932 |s2cid=51636736 |url=http://philectrosophy.com/documents/The%20Map%20Method%20For%20Synthesis%20of.pdf |access-date=2017-04-16 |archive-url=https://web.archive.org/web/20170416232229/http://philectrosophy.com/documents/The%20Map%20Method%20For%20Synthesis%20of.pdf |archive-date=2017-04-16}} (NB. Also contains a short review by Samuel H. Caldwell.)

{{cite book |title=Digital Design: Principles & Practices |author-last=Wakerly |author-first=John F. |date=1994 |publisher=Prentice Hall |location=New Jersey, USA |isbn=0-13-211459-3 |pages=48–49, 222}} (NB. The two page sections taken together say that K-maps are labeled with Gray code. The first section says that they are labeled with a code that changes only one bit between entries and the second section says that such a code is called Gray code.)

{{cite book |title=Boolean Reasoning – The Logic of Boolean Equations |chapter=3.9.2 Maps |author-first=Frank Markham |author-last=Brown |edition=reissue of 2nd |publisher=Dover Publications, Inc. |location=Mineola, New York, USA |date=2012 |orig-date=2003, 1990 |isbn=978-0-486-42785-0 |page=49 |quote-page=49 |quote=[…] Karnaugh's map orders the arguments of the discriminants according to the reflected binary code, also called the Gray code. […]}} (xii+291+3 pages) [https://web.archive.org/web/20170416231752/http://www2.fiit.stuba.sk/~kvasnicka/Free%20books/Brown_Boolean%20Reasoning.pdf 1st edition]

{{cite book |title=Ein Minimisierungsverfahren zur Synthese von Schaltkreisen (Minimisierungsgraphen) |language=de |author-first=Wolfgang |author-last=Händler |author-link=Wolfgang Händler |publisher=Technische Hochschule Darmstadt |location=Potsdam, Germany |date=1958 |id=D 17 |type=Dissertation |url=https://books.google.com/books?id=D58TAQAAIAAJ}} (73 pages+app.) [https://www.tib.eu/de/suchen/id/TIBKAT%3A044782241/Ein-Minimisierungsverfahren-zur-Synthese-von-Schaltkreisen/]

{{cite book |title=Taschenbuch der Nachrichtenverarbeitung |language=de |editor-first1=Karl W. |editor-last1=Steinbuch |editor-link1=Karl W. Steinbuch |editor-first2=Siegfried W. |editor-last2=Wagner |author-first1=Erich R. |author-last1=Berger |author-first2=Wolfgang |author-last2=Händler |author-link2=Wolfgang Händler |date=1967 |orig-date=1962 |edition=2 |publisher=Springer-Verlag OHG |location=Berlin, Germany |id=Title No. 1036 |lccn=67-21079 |pages=64, 1034–1035, 1036, 1038 |quote-page=64 |quote=[…] Übersichtlich ist die Darstellung nach Händler, die sämtliche Punkte, numeriert nach dem Gray-Code […], auf dem Umfeld eines Kreises anordnet. Sie erfordert allerdings sehr viel Platz. […] |trans-quote=Händler's diagram, where all points, numbered according to the Gray code, are arranged on the circumference of a circle, is easily comprehensible. It needs, however, a lot of space.}}

{{cite web |title=Informatik Sammlung Erlangen (ISER) |date=2012-03-13 |publisher=Friedrich-Alexander Universität |location=Erlangen, Germany |language=de |url=https://www.rrze.fau.de/wir-ueber-uns/kooperationen/iser.shtml |access-date=2017-04-12 |archive-url=https://web.archive.org/web/20170516154655/https://www.rrze.fau.de/wir-ueber-uns/kooperationen/iser.shtml |archive-date=2017-05-16}}

{{cite web |title=Informatik Sammlung Erlangen (ISER) – Impressum |date=2012-03-13 |publisher=Friedrich-Alexander Universität |location=Erlangen, Germany |language=de |url=http://www.iser.uni-erlangen.de:80/index.php?ort_id=327&tree=0 |access-date=2017-04-15 |url-status=live |archive-url=https://web.archive.org/web/20120226004316/http://www.iser.uni-erlangen.de/index.php?ort_id=327&tree=0 |archive-date=2012-02-26}}

{{cite journal |author-last=Kautz |author-first=William H. |author-link=William H. Kautz |title=Unit-Distance Error-Checking Codes |journal=IRE Transactions on Electronic Computers |issn=0367-9950 |volume=EC-7 |issue=2 |date=June 1958 |doi=10.1109/TEC.1958.5222529 |s2cid=26649532 |pages=179–180}} (2 pages)

{{cite book |author-first=Richard Kohler |author-last=Richards |title=Digital Design |chapter=Snake-in-the-Box Codes |publisher=Wiley-Interscience, John Wiley & Sons, Inc. |location=Ames, Iowa, USA |publication-place=New York, USA |date=January 1971 |isbn=0-471-71945-5 |lccn=73-147235 |pages=206–207}} (12+577+1 pages)

{{cite book |author-first1=Frederick F. |author-last1=Sellers, Jr. |author-first2=Mu-Yue |author-last2=Hsiao |author-first3=Leroy W. |author-last3=Bearnson |title=Error Detecting Logic for Digital Computers |publisher=McGraw-Hill Book Company |location=New York, USA |edition=1st |oclc=439460 |lccn=68-16491 |pages=152–164 |date=November 1968}}

{{cite journal |author-first=Harold M. |author-last=Lucal |title=Arithmetic Operations for Digital Computers Using a Modified Reflected Binary |journal=IRE Transactions on Electronic Computers |volume=EC-8 |number=4 |pages=449–458 |date=December 1959 |issn=0367-9950 |doi=10.1109/TEC.1959.5222057 |s2cid=206673385 |url=https://ieeexplore.ieee.org/document/5222057}} (10 pages)

{{cite web |title=Digital coding and translating system |author-first=Carl P. |author-last=Spaulding |publisher=Datex Corporation |location=Monrovia, California, USA |year=1965a |date=1965-01-12 |orig-date=1954-03-09 |id={{US patent|3165731A}}. Serial No. 415058 |url=https://patentimages.storage.googleapis.com/7f/1d/09/6a9b1fa3e67cb8/US3165731.pdf |access-date=2018-01-21 |url-status=live |archive-url=https://web.archive.org/web/20200805101618/https://patentimages.storage.googleapis.com/7f/1d/09/6a9b1fa3e67cb8/US3165731.pdf |archive-date=2020-08-05}} (28 pages)

{{cite book |title=How to Use Shaft Encoders |author-first=Carl P. |author-last=Spaulding |year=1965b |date=1965-07-12 |publisher=Datex Corporation |location=Monrovia, California, USA}} (85 pages)

{{cite web |title=Control Systems |author-first=Frederic A. |author-last=Foss |date=1960-12-27 |orig-date=1954-12-17 |id={{US patent|2966670A}}. Serial No. 475945 |publisher=International Business Machines Corp |pages=Fig. 7, Fig. 8, Fig. 11 |no-pp=yes |url=https://patentimages.storage.googleapis.com/3d/a8/16/1dc616c432ca95/US2966670.pdf |access-date=2020-08-05 |url-status=live |archive-url=https://web.archive.org/web/20200621145238/https://patentimages.storage.googleapis.com/3d/a8/16/1dc616c432ca95/US2966670.pdf |archive-date=2020-06-21}} (14 pages) (NB. The author called his code 2*-4-2-1 (+9-±7-±3-±1) reflected decimal code.)

{{cite journal |title=The Use of a Reflected Code in Digital Control Systems |author-first=Frederic A. |author-last=Foss |date=December 1954 |journal=IRE Transactions on Electronic Computers |volume=EC-3 |issue=4 |issn=2168-1740 |doi=10.1109/IREPGELC.1954.6499244 |pages=1–6}} (6 pages)

{{cite journal |author-first=Joseph A. |author-last=O'Brien |title=Cyclic Decimal Codes for Analogue to Digital Converters |journal=Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics |location=Bell Telephone Laboratories, Whippany, New Jersey, USA |volume=75 |issue=2 |date=May 1956 |orig-date=1955-11-15, 1955-06-23 |issn=0097-2452 |doi=10.1109/TCE.1956.6372498 |id=Paper 56-21 |s2cid=51657314 |pages=120–122 |url=https://pdfslide.net/documents/cyclic-decimal-codes-for-analogue-to-digital-converters.html |access-date=2020-05-18 |archive-date=2020-05-18 |archive-url=https://web.archive.org/web/20200518075301/https://pdfslide.net/documents/cyclic-decimal-codes-for-analogue-to-digital-converters.html |url-status=dead }} (3 pages) (NB. This paper was prepared for presentation at the AIEE Winter General Meeting, New York, USA, 1956-01-30 to 1956-02-03.)

{{cite journal |author-first=Howard E. |author-last=Tompkins |title=Unit-Distance Binary-Decimal Codes for Two-Track Commutation |date=September 1956 |orig-date=1956-07-16 |journal=IRE Transactions on Electronic Computers |issn=0367-9950 |volume=EC-5 |issue=3 |doi=10.1109/TEC.1956.5219934 |series=Correspondence |location=Moore School of Electrical Engineering, University of Pennsylvania, Philadelphia, Pennsylvania, USA |page=139 |url=https://dokumen.tips/documents/unit-distance-binary-decimal-codes-for-two-track-commutation.html |access-date=2020-05-18 |archive-date=2020-05-18 |archive-url=https://web.archive.org/web/20200518083051/https://dokumen.tips/documents/unit-distance-binary-decimal-codes-for-two-track-commutation.html |url-status=dead }} (1 page)

{{cite journal |date=March 1957 |title=Can You Take Advantage of the Cyclic Binary-Decimal Code? |author-first=Harry Robert |author-last=Glixon |journal=Control Engineering |issn=0010-8049 |publisher=Technical Publishing Company, a division of Dun-Donnelley Publishing Corporation, Dun & Bradstreet Corp. |volume=4 |number=3 |pages=87–91 |url=https://books.google.com/books?id=-_5IAQAAIAAJ}} (5 pages)

{{cite book |title=Taschenbuch der Nachrichtenverarbeitung |language=de |editor-first=Karl W. |editor-last=Steinbuch |editor-link=Karl W. Steinbuch |date=1962 |edition=1 |publisher=Springer-Verlag OHG |location=Karlsruhe, Germany |publication-place=Berlin / Göttingen / New York |lccn=62-14511 |pages=71–74, 97, 761–764, 770, 1080–1081}}

{{cite book |title=Taschenbuch der Informatik – Band II – Struktur und Programmierung von EDV-Systemen |language=de |editor-first1=Karl W. |editor-last1=Steinbuch |editor-link1=Karl W. Steinbuch |editor-first2=Wolfgang |editor-last2=Weber |editor-first3=Traute |editor-last3=Heinemann |date=1974 |orig-date=1967 |edition=3 |volume=2 |series=Taschenbuch der Nachrichtenverarbeitung |publisher=Springer Verlag |location=Berlin, Germany |isbn=3-540-06241-6 |lccn=73-80607 |pages=98–100}}

{{cite book |title=Digital Electronics |author-first1=Folkert |author-last1=Dokter |author-first2=Jürgen |author-last2=Steinhauer |chapter=2.4. Coding numbers in the binary system |date=1973-06-18 |series=Philips Technical Library (PTL) / Macmillan Education |publisher=The Macmillan Press Ltd. / N. V. Philips' Gloeilampenfabrieken |edition=Reprint of 1st English |location=Eindhoven, Netherlands |sbn=333-13360-9 |isbn=978-1-349-01419-4 |doi=10.1007/978-1-349-01417-0 |pages=32, 39, 50–53 |url=https://books.google.com/books?id=hlRdDwAAQBAJ |access-date=2020-05-11 |quote-page=53 |quote=[…] The Datex code […] uses the O'Brien code II within each decade, and reflected decimal numbers for the decimal transitions. For further processing, code conversion to the natural decimal notation is necessary. Since the O'Brien II code forms a 9s complement, this does not give rise to particular difficulties: whenever the code word for the tens represents an odd number, the code words for the decimal units are given as the 9s complements by inversion of the fourth binary digit. […] }}{{Dead link|date=July 2023 |bot=InternetArchiveBot |fix-attempted=yes }} (270 pages)

{{cite book |author-first1=Folkert |author-last1=Dokter |author-first2=Jürgen |author-last2=Steinhauer |title=Digitale Elektronik in der Meßtechnik und Datenverarbeitung: Theoretische Grundlagen und Schaltungstechnik |chapter=2.4.4.6. Einschrittige Kodes |language=de |series=Philips Fachbücher |publisher=Deutsche Philips GmbH |publication-place=Hamburg, Germany |volume=I |date=1975 |orig-date=1969 |edition=improved and extended 5th |isbn=3-87145-272-6 |pages=41, 48, 51, 58, 60–61}} (xii+327+3 pages)

{{cite book |author-first=Edward John |author-last=Petherick |title=A Cyclic Progressive Binary-coded-decimal System of Representing Numbers |date=October 1953 |type=Technical Note MS15 |publisher=Royal Aircraft Establishment (RAE) |location=Farnborough, UK}} (4 pages) (NB. Sometimes referred to as A Cyclic-Coded Binary-Coded-Decimal System of Representing Numbers.)

{{cite book |author-first1=Edward John |author-last1=Petherick |author-first2=A. J. |author-last2=Hopkins |title=Some Recently Developed Digital Devices for Encoding the Rotations of Shafts |date=1958 |type=Technical Note MS21 |publisher=Royal Aircraft Establishment (RAE) |location=Farnborough, UK}}

{{cite periodical |title=Digitizer als Analog-Digital-Wandler in der Steuer-, Meß- und Regeltechnik |periodical=Technische Mitteilungen |series=Relais, elektronische Geräte, Steuerungen |language=de |date=May 1963 |issue=13 |publisher=Franz Baumgartner (FraBa) |location=Cologne-Niehl, Germany |pages=1–2 |url=https://www.posital.com/media/posital_media/documents/TechnischeMitteilung_May1963.pdf |access-date=2020-05-21 |archive-url=https://web.archive.org/web/20200521211656/https://www.posital.com/media/posital_media/documents/TechnischeMitteilung_May1963.pdf |archive-date=2020-05-21 |quote-pages=1–2 |quote=[…] Die Firma Harrison Reproduction Equipment, Farnborough/England […] hat in jahrelanger Entwicklung in Zusammenarbeit mit der Britischen Luftwaffe und britischen Industriebetrieben den mechanischen Digitizer […] zu einer technischen Reife gebracht, die fast allen Anforderungen […] genügt. […] Um bei der dezimalen Entschlüsselung des verwendeten Binärcodes zu eindeutigen und bei der Übergabe von einer Dezimalstelle zur anderen in der Reihenfolge immer richtigen Ergebnissen zu kommen, wurde ein spezieller Code entwickelt, der jede Möglichkeit einer Fehlaussage durch sein Prinzip ausschließt und der außerdem durch seinen Aufbau eine relativ einfache Entschlüsselung erlaubt. Der Code basiert auf dem Petherick-Code. […]}} (4 pages)

{{cite journal |title=The Design of a Pneumatic Position Encoder |author-first1=C. J. |author-last1=Charnley |author-first2=R. E. |author-last2=Bidgood |author-first3=G. E. T. |author-last3=Boardman |journal=IFAC Proceedings Volumes |publisher=The College of Aeronautics, Cranfield, Bedford, England |volume=2 |issue=3 |date=October 1965 |pages=75–88 |id=Chapter 1.5. |doi=10.1016/S1474-6670(17)68955-9 |url=https://ac.els-cdn.com/S1474667017689559/1-s2.0-S1474667017689559-main.pdf?_tid=f0c1e48e-f95b-11e7-ad9a-00000aab0f01&acdnat=1515956073_9006e89e176c6a840b5454c38525240b |access-date=2018-01-14 }}{{Dead link|date=October 2023 |bot=InternetArchiveBot |fix-attempted=yes }}

{{cite book |title=Analog to digital encoder |author-first=Edwin L. |author-last=Wheeler |publisher=Conrac Corporation |location=New York, USA |date=1969-12-30 |orig-date=1968-04-05 |id={{US patent|3487460A}}. Serial No. 719026 (397812) |url=https://patentimages.storage.googleapis.com/f0/c0/60/9c3231f7e8ed44/US3487460.pdf |access-date=2018-01-21 |url-status=live |archive-url=https://web.archive.org/web/20200805102804/https://patentimages.storage.googleapis.com/f0/c0/60/9c3231f7e8ed44/US3487460.pdf |archive-date=2020-08-05 |quote-page=5, left column 9, rows 15–22 |quote=[…] The MOA-GILLHAM code is essentially the combination of the Gray code discussed thereinabove and the well known Datex code; the Datex code is disclosed in U.S. Patent {{citeref|Spaulding|1965a|3,165,731|style=plain}}. The arrangement is such that the Datex code defines the bits for the units count of the encoder and the Gray code defines the bits for each of the higher order decades, the tens, hundreds, etc. […]}} (11 pages)

{{cite web |title=Telemetering and supervisory control system having normally continuous telemetering signals |id=US3397386A |author-first1=Bernard W. |author-last1=Bishup |author-first2=Anthony A. |author-last2=Repeta |author-first3=Frank C. |author-last3=Giarrizzo |publisher=Leeds and Northrup Co. |date=1968-08-13 |orig-date=1963-04-03 |url=https://patents.google.com/patent/US3397386A/en}} [https://patentimages.storage.googleapis.com/c8/f3/cc/936fef75655a2c/US3397386.pdf]

{{cite journal |author-first=Carla Diane |author-last=Savage |author-link=Carla Diane Savage |title=Long cycles in the middle two levels of the Boolean lattice |journal=Ars Combinatoria |issn=0381-7032 |volume=35 |issue=A |date=1997-01-16 |location=North Carolina State University, Raleigh, North Carolina, USA |s2cid=15975960 |citeseerx=10.1.1.39.2249 |pages=97–108 |url=http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=DACA73A3D791549CE05443B7948527EC?doi=10.1.1.39.2249&rep=rep1&type=pdf |access-date=2020-05-13 |url-status=live |archive-url=https://web.archive.org/web/20200513191647/http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=DACA73A3D791549CE05443B7948527EC?doi=10.1.1.39.2249&rep=rep1&type=pdf |archive-date=2020-05-13}} (15 pages)

{{cite web |title=Altitude – MODEC ASCII |author-first=Darryl |author-last=Phillips |date=2012-07-26 |orig-date=1998 |publisher=AirSport Avionics |url=http://www.airsport-corp.com/modecascii.txt |url-status=usurped |archive-url=https://web.archive.org/web/20120726003224/http://www.airsport-corp.com/modecascii.txt |archive-date=2012-07-26}}

{{cite web |title=Aviation Gray Code: Gillham Code Explained |date=2010-12-03 |author-first=K. |author-last=Stewart |publisher=Custom Computer Services (CCS) |url=http://www.ccsinfo.com/forum/viewtopic.php?p=140960#140960 |access-date=2018-01-14 |url-status=live |archive-url=https://web.archive.org/web/20180116184525/http://www.ccsinfo.com/forum/viewtopic.php?p=140960 |archive-date=2018-01-16}}

{{cite book |title=A cyclic progressive decimal code for simple translation to decimal and analogue outputs |author-first1=William "Bill" H. P. |author-last1=Leslie |author-first2=A. |author-last2=Russell |publisher=National Engineering Laboratory |location=East Kilbride, Glasgow, UK |date=1964 |type=Report |id=NEL Report 129}} (17 pages)

{{cite journal |title=Some Binary Codes and a Novel Five-Channel Code |author-first=A. |author-last=Russell |date=August 1964 |journal=Control (Systems, Instrumentation, Data Processing, Automation, Management, incorporating Automation Progress) |volume=8 |number=74 |series=Special Features |publisher=Morgan-Grampain (Publishers) Limited |publication-place=London, UK |pages=399–404 |url=https://books.google.com/books?id=jf4eAAAAMAAJ |access-date=2020-06-22}} (6 pages)

{{cite book |title=Proceedings of the Fourteenth International Machine Tool Design and Research Conference, 12–14 September 1973 |chapter=The work on NC at NEL |author-first=William "Bill" H. P. |author-last=Leslie |editor-first1=Franz |editor-last1=Koenigsberger |editor-first2=Stephen Albert |editor-last2=Tobias |publisher=The Macmillan Press Ltd |date=1974 |sbn=333-14913-0 |isbn=978-1-34901921-2 |lccn=73-16545 |pages=215–224 [215, 217] |doi=10.1007/978-1-349-01921-2_30 |url=https://books.google.com/books?id=bFVdDwAAQBAJ&pg=PA215 |chapter-url=https://link.springer.com/chapter/10.1007/978-1-349-01921-2_30 |access-date=2020-05-21 |archive-date=2022-04-07 |archive-url=https://web.archive.org/web/20220407160744/https://books.google.com/books?id=bFVdDwAAQBAJ&pg=PA215 |url-status=dead }}

{{cite book |author-first=Eric Jeffrey |author-last=Wightman |title=Instrumentation in Process Control |date=1972 |edition=1 |publisher=Butterworth & Co (Publishers) Ltd |publication-place=London, UK |isbn=0-408-70293-1 |chapter=Chapter 6. Displacement measurement |pages=122–123 |chapter-url=https://books.google.com/books?id=8WEhBQAAQBAJ&pg=PA122 |url=https://books.google.com/books?id=8WEhBQAAQBAJ |quote-page=122–123 |quote=[…] Other forms of code are also well known. Among these are the Royal Radar Establishment code; The Excess Three decimal code; Gillham code which is recommended by ICAO for automatic height transmission for air traffic control purposes; the Petherick code, and the Leslie and Russell code of the National Engineering Laboratory. Each has its particular merits and they are offered as options by various encoder manufacturers. […]}} (12+367+5 pages)

{{cite journal |title=…accurate liquid level metering – at ANY DISTANCE! |journal=Petroleum Refiner |volume=33 |number=9 |issn=0096-6517 |publisher=Gulf Publishing Company |date=September 1954 |type=Advertisement |page=368 |quote-page=368 |quote=[…] The complete dispatching operation, gauging, and remote control is integrated into one single unitized system when a "Varec" Pulse Code Telemetering System is installed. […] |url=https://books.google.com/books?id=B2Q7AAAAMAAJ&q=%22Varec+pulse+code%22}}

{{cite book |title=Installation and Operations Manual for the Model 1900 Micro 4-Wire Transmitter |chapter=Encoder Pulse Format |publisher=Whessoe Varec, Inc. |location=Cypress, California, USA |id=33-08461 |date=January 1993 |orig-date=1991-07-01 |pages=04-4–04-8 |url=https://www.varec.com/web/wp-content/uploads/2018/05/IOM016_1900.pdf |access-date=2020-05-16 |url-status=live |archive-url=https://web.archive.org/web/20200516191438/https://www.varec.com/web/wp-content/uploads/2018/05/IOM016_1900.pdf |archive-date=2020-05-16}} (38 pages) (NB. Position 5 for "Inches" on page 04-8 should read "0111" rather than "1111".)

{{cite book |title=Varec Model 1900 – Micro 4-Wire Transmitter (BSAP to Mark / Space Protocol (MSP)) – Application Notes |chapter=2.2.3.3 MSP Level Data Format |publisher=Emerson Electric |pages=11–14 |url=https://www.emerson.com/documents/automation/manuals-guides-application-notes-varec-model-1900-protocol-ras-en-133360.pdf |access-date=2020-05-16 |url-status=live |archive-url=https://web.archive.org/web/20200516183338/https://www.emerson.com/documents/automation/manuals-guides-application-notes-varec-model-1900-protocol-ras-en-133360.pdf |archive-date=2020-05-16}} (vi+33 pages)

{{cite web |title=Abtastvorrichtung zur digitalen Weg- oder Winkelmessung |language=de |author-first=Archibald |author-last=Hoklas |publisher={{ill|VEB Schiffselektronik Johannes Warnke|de}} |via={{ill|DEPATIS|de}} |date=1989-09-06 |orig-date=1988-04-29 |id=GDR Patent DD271603A1. WP H 03 M / 315 194 8 |url=https://depatisnet.dpma.de/DepatisNet/depatisnet/DD000000271603A1_all_pages.pdf?window=1&space=menu&content=download_doc_verify&action=download_doc&docid=DD000000271603A1&so=asc&sf=vn&firstdoc=0&struct=&Cl=2&Bi=1&Ab=1&De=2&Dr=5&Pts=&Pa=&We=&Sr=&Eam=&Cor=&Aa=&NrFaxPages=5&pdfpage=2&pdfmatrix=1x1&origin=pdf_window&verify_str=null |access-date=2018-01-18 |archive-url=https://web.archive.org/web/20180118015239/https://depatisnet.dpma.de/DepatisNet/depatisnet/DD000000271603A1_all_pages.pdf?window=1&space=menu&content=download_doc_verify&action=download_doc&docid=DD000000271603A1&so=asc&sf=vn&firstdoc=0&struct=&Cl=2&Bi=1&Ab=1&De=2&Dr=5&Pts=&Pa=&We=&Sr=&Eam=&Cor=&Aa=&NrFaxPages=5&pdfpage=2&pdfmatrix=1x1&origin=pdf_window&verify_str=null |archive-date=2018-01-18}} [https://depatisnet.dpma.de/DepatisNet/depatisnet?action=bibdat&docid=DD000000271603A1] [https://depatisnet.dpma.de/DepatisNet/depatisnet?action=pdf&docid=DD000000271603A1]

{{cite web |title=Gray code – Unit distance code |author-first=Archibald |author-last=Hoklas |date=2005 |url=http://www.ahok.de/en/hoklas-code.html |access-date=2018-01-15 |url-status=live |archive-url=https://web.archive.org/web/20180115012854/http://www.ahok.de/en/hoklas-code.html |archive-date=2018-01-15}}

{{cite web |title=Gray-Kode – Einschrittiger Abtastkode |language=de |author-first=Archibald |author-last=Hoklas |date=2005 |url=http://www.ahok.de/dt/hoklas-code.html |access-date=2018-01-15 |url-status=live |archive-url=https://web.archive.org/web/20180115012827/http://www.ahok.de/dt/hoklas-code.html |archive-date=2018-01-15}}

{{cite web |title=Electronic Diode Matrix Decoder Circuits |author-first=James J. |author-last=Klinkowski |id={{US patent|3309695A}}. Serial No. 353845 |publisher=Burroughs Corporation |location=Detroit, Michigan, USA |date=1967-03-14 |orig-date=1964-03-23 |url=https://patentimages.storage.googleapis.com/71/6a/f4/044b43b93097e7/US3309695.pdf |access-date=2020-05-23 |url-status=live |archive-url=https://web.archive.org/web/20200523144819/https://patentimages.storage.googleapis.com/71/6a/f4/044b43b93097e7/US3309695.pdf |archive-date=2020-05-23}} (5 pages) [https://web.archive.org/web/20200805103732/https://patentimages.storage.googleapis.com/97/33/74/aec52610026e59/USRE26780.pdf]

{{cite web |title=Binary-coded decimal signal converter |author-first=James J. |author-last=Klinkowski |id={{US patent|3504363A}}. Serial No. 603926 |publisher=Burroughs Corporation |location=Detroit, Michigan, USA |date=1970-03-31 |orig-date=1966-12-22 |url=https://patentimages.storage.googleapis.com/65/d6/45/f7837c143fa3da/US3504363.pdf |access-date=2020-05-23 |url-status=live |archive-url=https://web.archive.org/web/20200523145655/https://patentimages.storage.googleapis.com/65/d6/45/f7837c143fa3da/US3504363.pdf |archive-date=2020-05-23}} (7 pages)

{{cite journal |title=(([title unknown])) |journal=Electrical Design News |issn=0012-7515 |publisher=Rogers Publishing Company |date=1967 |volume=12 |pages=}} [https://books.google.com/books?id=MThAAQAAIAAJ&q=%22Watts+code%22+%22Excess-3+Gray+Code%22][https://books.google.com/books?id=MThAAQAAIAAJ&q=%22Watts+code%22+%22Excess-3+Gray+Code%22]

{{cite journal |title=Some Problems Of Angular Rotational Digital Converters |author-first=Györgyi |author-last=Tóth-Zentai |volume=23 |number=3–4 |journal=Periodica Polytechnica Electrical Engineering |date=1979-10-05 |pages=265–270 [266] |location=Department of Electronics Technology, Technical University, Budapest, Hungary |url=https://pp.bme.hu/ee/article/view/4838 |access-date=2020-05-23}} [https://pp.bme.hu/ee/article/download/4838/3943/] (6 pages) (NB. Shows a 6-digit Watts code.)

{{cite book |author-last=Knuth |author-first=Donald Ervin |author-link=Donald Ervin Knuth |chapter=Enumeration and Backtracking / Generating all n-tuples |title=The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1 |volume=4A |edition=1 |title-link=The Art of Computer Programming |date=2014-09-12 |publisher=Addison-Wesley Professional |isbn=978-0-13348885-2 |pages=442–443 |chapter-url=https://books.google.com/books?id=IkuEBAAAQBAJ}} (912 pages)

{{cite journal |title=Pioneers Of Binary Coding |author-first=F. G. |author-last=Heath |journal=Journal of the Institution of Electrical Engineers |publisher=Institution of Engineering and Technology (IET) |location=Manchester College of Science and Technology, Faculty of Technology of the University of Manchester, Manchester, UK |volume=7 |issue=81 |date=September 1961 |doi=10.1049/jiee-3.1961.0300 |pages=539–541 |url=https://ieeexplore.ieee.org/document/5324416 |archive-url=https://web.archive.org/web/20200328084237/https://ieeexplore.ieee.org/document/5324416/ |url-status=dead |archive-date=28 March 2020 |access-date=2020-06-22}} (3 pages)

{{cite book |author-first=Kenneth W. |author-last=Cattermole |title=Principles of pulse code modulation |edition=1 |publisher=Iliffe Books Ltd. / American Elsevier Publishing Company, Inc. |date=1969 |publication-place=London, UK / New York, USA |location=Harlow, Essex, UK |sbn=444-19747-8 |isbn=978-0-444-19747-4 |lccn=78-80432 |pages=245, 434 |quote-page=245 |quote=[…] There seems to be some confusion about the attributation of this code, because two inventors named Gray have been associated with it. When I first heard the name I took it as referring to Elisha Gray, and {{citeref|Heath|1961|Heath|style=plain}} testifies to his usage of it. Many people take it as referring to Frank Gray of Bell Telephone Laboratories, who in 1947 first proposed its use in coding tubes: his patent is listed in the bibliography. […]}} (2+448+2 pages)

{{cite book |title=Cogwheels of the Mind: The Story of Venn Diagrams |author-first=Anthony William Fairbank |author-last=Edwards |author-link=Anthony William Fairbank Edwards |publisher=Johns Hopkins University Press |date=2004 |isbn=0-8018-7434-3 |location=Baltimore, Maryland, USA |pages=48, 50 |url=https://books.google.com/books?id=7_0Thy4V3JIC&pg=PA65}}

{{cite journal |author-first=William M. |author-last=Goodall |title=Television by Pulse Code Modulation |journal=Bell System Technical Journal |volume=30 |issue=1 |pages=33–49 |date=January 1951 |doi=10.1002/j.1538-7305.1951.tb01365.x}} (NB. Presented orally before the I.R.E. National Convention, New York City, March 1949.)

{{cite journal |author-first1=Girish S. |author-last1=Bhat |author-first2=Carla Diane |author-last2=Savage |author-link2=Carla Diane Savage |title=Balanced Gray Codes |journal=Electronic Journal of Combinatorics |date=1996 |volume=3 |url=https://www.combinatorics.org/ojs/index.php/eljc/article/view/v3i1r25/ |issue=1 |doi=10.37236/1249 |doi-access=free}}

{{cite web |author-first=Ryan |author-last=Donohue |title=Synchronization in Digital Logic Circuits |date=2003 |url=http://www.stanford.edu/class/ee183/handouts_spr2003/synchronization_pres.pdf |access-date=2018-01-15 |url-status=live |archive-url=https://web.archive.org/web/20180115012747/https://web.stanford.edu/class/ee183/handouts_spr2003/synchronization_pres.pdf |archive-date=2018-01-15}}

{{cite book |author-last1=Mehta |author-first1=Huzefa |author-last2=Owens |author-first2=Robert Michael |author-last3=Irwin |author-first3=Mary Jane "Janie" |chapter=Some issues in gray code addressing |title=Proceedings of the Sixth Great Lakes Symposium on VLSI |date=1996-03-22 |issn=1066-1395 |doi=10.1109/GLSV.1996.497616 |chapter-url=https://ieeexplore.ieee.org/document/497616 |publisher=IEEE Computer Society |isbn=978-0-8186-7502-7 |pages=178–181|s2cid=52837310 }}

{{cite report |title=Low Power Architecture Design and Compilation Techniques for High-Performance Processors |author-first1=Ching-Long |author-last1=Su |author-first2=Chi-Ying |author-last2=Tsui |author-first3=Alvin M. |author-last3=Despain |date=1994 |publisher=Advanced Computer Architecture Laboratory |id=ACAL-TR-94-01 |url=http://www.scarpaz.com/2100-papers/Power%20Estimation/su94-low%20power%20architecture%20and%20compilation.pdf |access-date=2020-12-17 |url-status=live |archive-url=https://web.archive.org/web/20200726170626/http://www.scarpaz.com/2100-papers/Power%20Estimation/su94-low%20power%20architecture%20and%20compilation.pdf |archive-date=2020-07-26}}

{{cite journal |author-first1=Hui |author-last1=Guo |author-first2=Sri |author-last2=Parameswaran |doi=10.1016/j.sysarc.2010.03.003 |volume=56 |issue=4–6 |date=April–June 2010 |title=Shifted Gray encoding to reduce instruction memory address bus switching for low-power embedded systems |journal=Journal of Systems Architecture |pages=180–190}}

{{cite web |author-first=Henry Gordon "Hank" |author-last=Dietz |title=The Aggregate Magic Algorithms: Gray Code Conversion |work=The Aggregate |publisher=Electrical and Computer Engineering Department, College of Engineering, University of Kentucky |date=2002 |url=http://aggregate.org/MAGIC/#Gray%20Code%20Conversion |access-date=2020-12-16 |url-status=live |archive-url=https://web.archive.org/web/20201216122620/http://aggregate.org/MAGIC/#Gray%2520Code%2520Conversion |archive-date=2020-12-16}}

{{cite journal |title=Generalized Gray Codes with Applications |author-last=Guan |author-first=Dah-Jyh |journal=Proceedings of the National Scientific Council, Republic of China, Part A |volume=22 |date=1998 |pages=841–848 |citeseerx=10.1.1.119.1344}}

{{cite journal |author-first=I. Nengah |author-last=Suparta |title=A simple proof for the existence of exponentially balanced Gray codes |journal=Electronic Journal of Combinatorics |date=2005 |volume=12 |doi-access=free |doi=10.37236/1986}}

{{cite journal |author-first1=Mary Elizabeth |author-last1=Flahive |author-link1=Mary Elizabeth Flahive |author-first2=Bella |author-last2=Bose |title=Balancing cyclic R-ary Gray codes |journal=Electronic Journal of Combinatorics |date=2007 |volume=14 |doi-access=free |doi=10.37236/949}}

{{cite journal |author-first1=Raoul |author-last1=Strackx |author-first2=Frank |author-last2=Piessens |title=Ariadne: A Minimal Approach to State Continuity |journal=Usenix Security |date=2016 |volume=25 |url=https://distrinet.cs.kuleuven.be/software/sce/ariadne.html}}

{{cite journal |author-first1=Carla Diane |author-last1=Savage |author-link1=Carla Diane Savage |author-first2=Peter |author-last2=Winkler |author-link2=Peter Winkler |title=Monotone Gray codes and the middle levels problem |journal=Journal of Combinatorial Theory | series=Series A |date=1995 |volume=70 |issn=0097-3165 |pages=230–248 |issue=2 |doi=10.1016/0097-3165(95)90091-8|doi-access=free}}

{{cite web |title=MATH 343 Applied Discrete Math Supplementary Materials |author-last=Goddyn |author-first=Luis |date=1999 |publisher=Department of Mathematics, Simon Fraser University |url=http://www.math.sfu.ca/~goddyn/Courses/343/supMaterials.pdf |archive-url=https://web.archive.org/web/20150217160033/http://people.math.sfu.ca/~goddyn/Courses/343/supMaterials.pdf |archive-date=2015-02-17}}

{{cite journal |author-first1=Joseph "Joe" |author-last1=Sawada |author-first2=Dennis Chi-Him |author-last2=Wong |title=A Fast Algorithm to generate Beckett–Gray codes |journal=Electronic Notes in Discrete Mathematics |volume=29 |pages=571–577 |date=2007 |doi=10.1016/j.endm.2007.07.091}}

{{cite patent |inventor-last=Spedding |inventor-first=Norman Bruce |pubdate=1994-10-28 |title=A position encoder |country=NZ |number=264738}}{{failed verification|date=July 2015}}

{{cite web |title=The following is a copy of the provisional patent filed on behalf of Industrial Research Limited on 1994-10-28 – NZ Patent 264738 |author-first=Norman Bruce |author-last=Spedding |publisher=Industrial Research Limited |date=1994-10-28 |id=NZ Patent 264738 |url=http://www.winzurf.co.nz/Single_Track_Grey_Code_Patent/Single_track_Grey_code_encoder_patent.pdf |access-date=2018-01-14 |url-status=live |archive-url=https://web.archive.org/web/20171029205005/http://www.winzurf.co.nz/Single_Track_Grey_Code_Patent/Single_track_Grey_code_encoder_patent.pdf |archive-date=2017-10-29}}

{{cite journal |title=Single-Track Gray Codes |author-last1=Hiltgen |author-first1=Alain P. |author-first2=Kenneth G. |author-last2=Paterson |author-first3=Marco |author-last3=Brandestini |journal=IEEE Transactions on Information Theory |volume=42 |issue=5 |date=September 1996 |pages=1555–1561 |doi=10.1109/18.532900 |zbl=857.94007 |url=https://ieeexplore.ieee.org/document/532900}}

{{cite journal |title=Single-Track Circuit Codes |author-last1=Hiltgen |author-first1=Alain P. |author-first2=Kenneth G. |author-last2=Paterson |journal=IEEE Transactions on Information Theory |volume=47 |issue=6 |date=September 2001 |pages=2587–2595 |doi=10.1109/18.945274 |citeseerx=10.1.1.10.8218 |url=http://www.hpl.hp.com/techreports/2000/HPL-2000-81.pdf |access-date=2018-01-15 |url-status=live |archive-url=https://web.archive.org/web/20180115013155/http://www.hpl.hp.com/techreports/2000/HPL-2000-81.pdf |archive-date=2018-01-15}}

{{cite journal |title=The Structure of Single-Track Gray Codes |author-last1=Etzion |author-first1=Tuvi |author-first2=Moshe |author-last2=Schwartz |journal=IEEE Transactions on Information Theory |volume=IT-45 |issue=7 |date=November 1999 |orig-date=1998-05-17 |pages=2383–2396 |doi=10.1109/18.796379 |citeseerx=10.1.1.14.8333 |url=http://etzion.net.technion.ac.il/files/2016/02/P54.pdf |access-date=2018-01-15 |url-status=live |archive-url=https://web.archive.org/web/20180115022531/http://etzion.net.technion.ac.il/files/2016/02/P54.pdf |archive-date=2018-01-15 }} [https://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-info.cgi?1998/CS/CS0937 Technical Report CS0937 ] {{Webarchive|url=https://web.archive.org/web/20181215171438/http://www.cs.technion.ac.il/users/wwwb/cgi-bin/tr-info.cgi?1998/CS/CS0937 |date=2018-12-15 }}

{{cite web |author-first=Torsten |author-last=Sillke |date=1997 |orig-date=1993-03-01 |title=Gray-Codes with few tracks (a question of Marco Brandestini) |url=http://www.mathematik.uni-bielefeld.de/~sillke/PROBLEMS/gray |access-date=2017-10-29 |url-status=live |archive-url=https://web.archive.org/web/20171029202303/https://www.math.uni-bielefeld.de/~sillke/PROBLEMS/gray |archive-date=2017-10-29}}

{{cite journal |title=Near Optimal Single-Track Gray Codes |author-first1=Tuvi |author-last1=Etzion |author-first2=Kenneth G. |author-last2=Paterson |journal=IEEE Transactions on Information Theory |volume=IT-42 |issue=3 |pages=779–789 |date=May 1996 |doi=10.1109/18.490544 |citeseerx=10.1.1.14.1527 |url=http://etzion.net.technion.ac.il/files/2016/02/P36.pdf |access-date=2018-04-08 |url-status=live |archive-url=https://web.archive.org/web/20161030214251/http://etzion.net.technion.ac.il/files/2016/02/P36.pdf |archive-date=2016-10-30}}

{{cite journal |title=A Survey of Venn Diagrams: Symmetric Diagrams |url=http://www.combinatorics.org/Surveys/ds5/VennSymmEJC.html |journal=Electronic Journal of Combinatorics |date=2005-06-18 |author-first1=Frank |author-last1=Ruskey |author-link1=Frank Ruskey |author-first2=Mark |author-last2=Weston |doi=10.37236/26 |doi-access=free |department=Dynamic Surveys}}

{{cite book |author-last1=Alciatore |author-first1=David G. |author-first2=Michael B. |author-last2=Histand |title=Mechatronics |date=1999 |publisher=McGraw–Hill Education – Europe |isbn=978-0-07-131444-2 |url=http://mechatronics.colostate.edu/}}

{{cite web |author=Krishna |title=Gray code for QAM |date=2008-05-11 |url=http://www.dsprelated.com/showthread/comp.dsp/96917-1.php |access-date=2017-10-29 |url-status=live |archive-url=https://web.archive.org/web/20171029192539/https://www.dsprelated.com/showthread/comp.dsp/96917-1.php |archive-date=2017-10-29}}

{{cite book |editor-first1=Massimiliano |editor-last1=Sala |editor-first2=Teo |editor-last2=Mora |editor-first3=Ludovic |editor-last3=Perret |editor-first4=Shojiro |editor-last4=Sakata |editor-first5=Carlo |editor-last5=Traverso |title=Gröbner Bases, Coding, and Cryptography |url=https://archive.org/details/grbnerbasescodin00sala |url-access=limited |date=2009 |publisher=Springer Science & Business Media |isbn=978-3-540-93806-4 |chapter=An Introduction to Ring-Linear Coding Theory |author-first=Marcus |author-last=Greferath |page=[https://archive.org/details/grbnerbasescodin00sala/page/n226 220]}}

{{cite book |chapter=Kerdock and Preparata codes |author-first=Patrick |author-last=Solé |title=Encyclopedia of Mathematics |editor-first=Michiel |editor-last=Hazewinkel |editor-link=Michiel Hazewinkel |publisher=Springer Science+Business Media |date=2016 |isbn=978-1-4020-0609-8 |chapter-url=https://www.encyclopediaofmath.org/index.php/Kerdock_and_Preparata_codes |url-status=live |archive-url=https://web.archive.org/web/20171029191032/https://www.encyclopediaofmath.org/index.php/Kerdock_and_Preparata_codes |archive-date=2017-10-29}}

{{cite journal |title=(([title unknown])) |author-first=David Silvester |author-last=Evans |volume=10–12 |page=87 |journal=Transactions |publisher=Institute of Measurement and Control |date=1958 |url=https://books.google.com/books?id=mwJvieqKGFsC&q=%22Watts+code%22}} (NB. The Watts code was called W.R.D. code or Watts Reflected Decimal to distinguish it from other codes used at Hilger & Watts Ltd.)

{{cite book |title=Fundamentals of Digital Instrumentation |author-first=David Silvester |author-last=Evans |publisher=Hilger & Watts Ltd |location=London, UK |edition=1 |date=1960 |url=https://books.google.com/books?id=gpVNAAAAYAAJ |access-date=2020-05-24}} (39 pages)

{{cite book |title=Digital Data: Their derivation and reduction for analysis and process control |chapter=Chapter Three: Direct Reading from Coded Scales |author-first=David Silvester |author-last=Evans |edition=1 |publisher=Hilger & Watts Ltd / Interscience Publishers |location=London, UK |date=March 1961 |pages=18–23 |url=https://books.google.com/books?id=WOIJAAAAMAAJ |access-date=2020-05-24 |quote-page=20–23 |quote=[…] Decoding. […] To decode C.P.B. or W.R.D. codes, a simple inversion rule can be applied. The readings of the higher tracks determine the way in which the lower tracks are translated. The inversion rule is applied line by line for the C.P.B. and for the W.R.D. it is applied decade by decade or line by line. Starting therefore with the top or slowest changing track of the C.P.B., if the result is odd (1) the next track value has to be inverted, i.e. 0 for 1 and 1 for 0. If, however, the first track is even (0), the second track is left as read, i.e. 0 for 0 and 1 for 1. Again, if the resultant reading of the second track is odd, the third track reading is inverted and so on. When an odd is changed to an even the line below is not inverted and when an even is changed to an odd the line below is inverted. The result of applying this rule to the pattern […] is the pure binary (P.B.) pattern […] where each track or digit can be given a definite numerical value (in this instance 1, 2, 4, 8, etc.). […] Using the line-by-line inversion rule on the W.R.D. code produces [a] pattern [of 1, 2, 4, 2 code] where again the digits can be given numerical values and summed decade by decade. The summing of the digits can be very useful, for example, in a high-speed scanning system; but in a parallel decoding system […], it is usual to treat each binary quartet or decade as an entity. In other words, if the first or more significant decade is odd, the second decade is rectified or complemented by inverting the D track and so on, the result being the repeating pattern of [rectified W.R.D. code]. This is an extremely easy thing to achieve since the only change required is the inversion of the meaning of the D track or complementing digit. […]}} (8+82 pages) (NB. The author does not mention Gray at all and calls the standard Gray code "Cyclic Permuted Binary Code" (C.P.B.), the book index erroneously lists it as "cyclic pure binary code".)

{{cite book |title=Tables for the Binary Encoding of Angles |author-first=P. A. |author-last=Newson |location=United Kingdom Atomic Energy Authority, Research Group, Atomic Energy Research Establishment, Harwell, UK |date=1965 |edition=1 |publisher=H. M. Stationery Office |url=https://books.google.com/books?id=aUEgAQAAIAAJ |access-date=2020-05-24}} (12 pages)

{{cite book |title=Measurement of Neutron Spectra by Semi-Automatic Scanning of Recoil Protons in Photographic Emulsions |chapter=3.2.2 Electromechanical Digitizers |author-first1=P. W. |author-last1=Benjamin |author-first2=G. S. |author-last2=Nicholls |location=United Kingdom Atomic Energy Authority, Atomic Weapons Research Establishment, UK |id=AWRE Report No. NR 5/63 |publisher=U.S. Department of Energy |date=1963 |pages=8–10, 19 |chapter-url=https://books.google.com/books?id=tD5YAAAAYAAJ&pg=PT4}} [https://web.archive.org/web/20200525193325/https://books.googleusercontent.com/books/content?req=AKW5QadxAC8d1K6TXnjLMOKRt0wxLI2XEnyvs5b7wXlxCaZ4XdYW6qcmagghi7O1TLA4DL5nybOmiY0ue2ljEH9L2NvnP6Z6vN54dNvpxHnCIK79h1xoamtO5-waq-mDh2BPHJE9eJkmkoUl7uyPvrbWd7gNM8gpQKbx82WI_3gYiZHy-aHdQGQAFOkacvI1Kf52lu4i8_cuMNYztfa--t2eGiIk5ku1bP7T7n378Q2rNZRCMz3JCXeT0EzYNMkJzlpYSiP2FiQ8] (23 pages)

{{cite book |title=Applications of Computers |chapter=Session 14. Data Processing |author-first=Stuart H. |author-last=Hollingdale |date=1958-09-19 |series=Atlas – Application of Computers, University of Nottingham 15–19 September 1958 |type=Conference paper |chapter-url=http://www.chilton-computing.org.uk/acl/literature/manuals/nottingham/p014.htm |url=http://www.chilton-computing.org.uk/acl/literature/manuals/nottingham/contents.htm |access-date=2020-05-25 |url-status=live |archive-url=https://web.archive.org/web/20200525151358/http://www.chilton-computing.org.uk/acl/literature/manuals/nottingham/p014.htm |archive-date=2020-05-25}}

{{cite web |author-first=Matthias R. |author-last=Paul |title=Unterbrechungsfreier Schleifencode |language=de |trans-title=Continuous loop code |version=1.02 |url=http://www.uni-bonn.de/~uzs180/download/mpbcd102.zip |date=1995-08-10 |orig-date=1994 |access-date=2008-02-11 }}{{cbignore}} (NB. The author called this code {{lang|de|Schleifencode}} (English: "loop code"). It differs from Gray BCD code only in the encoding of state 0 to make it a cyclic unit-distance code for full-circle rotatory applications. Avoiding the all-zero code pattern allows for loop self-testing and to use the data lines for uninterrupted power distribution.)

{{cite book |title=Digitale Rechenautomaten – Eine Einführung |language=de |trans-title=Digital Computers – An Introduction |author-first=Rainer |author-last=Klar |publisher=Walter de Gruyter & Co. / {{ill|G. J. Göschen'sche Verlagsbuchhandlung|de|G. J. Göschen'sche Verlagsbuchhandlung}} |publication-place=Berlin, Germany |series=Sammlung Göschen |volume=1241/1241a |date=1970-02-01 |isbn=3-11-083160-0 |id=. Archiv-Nr. 7990709. |page=17 |edition=1 |url=https://books.google.com/books?id=QnqVDwAAQBAJ&pg=PA17 |access-date=2020-04-13 |url-status=live |archive-url=https://web.archive.org/web/20200601100645/https://books.google.de/books?id=QnqVDwAAQBAJ&pg=PA17&lpg=PA17&redir_esc=y |archive-date=2020-06-01}} (205 pages) (NB. A 2019 reprint of the first edition is available under {{ISBN|3-11002793-3|978-3-11002793-8}}. A reworked and expanded {{citeref|Klar|1989|4th edition|style=plain}} exists as well.)

{{cite book |title=Digitale Rechenautomaten – Eine Einführung in die Struktur von Computerhardware |language=de |trans-title=Digital Computers – An Introduction into the structure of computer hardware |author-first=Rainer |author-last=Klar |publisher=Walter de Gruyter & Co. |publication-place=Berlin, Germany |series=Sammlung Göschen |volume=2050 |date=1989 |orig-date=1988-10-01 |isbn=3-11011700-2 |page=28 |edition=4th reworked}} (320 pages) (NB. The author called this code {{lang|de|Einheitsabstandscode}} (English: "unit-distance code"). By swapping two bit rows and inverting one of them, it can be transferred into the O'Brien code II, whereas by swapping and inverting two bit rows, it can be transferred into the Petherick code.)

{{cite book |title=Notes on Analog-Digital Conversion Techniques |chapter=III.F. Unit-Distance Codes / VI.E.2. Reflected Binary Codes |editor-first=Alfred Kriss |editor-last=Susskind |author-first1=Alfred Kriss |author-last1=Susskind |author-first2=John Erwin |author-last2=Ward |date=1958-03-28 |orig-date=1957, 1956 |edition=3 |publisher=Technology Press of the Massachusetts Institute of Technology / John Wiley & Sons, Inc. / Chapman & Hall, Ltd. |publication-place=New York, USA |location=Cambridge, Massachusetts, USA |series=Technology Books in Science and Engineering |volume=1 |pages=3-10–3-16 [3-13–3-16], 6-65–6-60 [6-60]}} (x+416+2 pages) (NB. The contents of the book was originally prepared by staff members of the Servomechanisms Laboraratory, Department of Electrical Engineering, MIT, for Special Summer Programs held in 1956 and 1957. Susskind's "reading-type code" is actually a minor variant of the code shown here with the two most significant bit rows swapped to better illustrate symmetries. Also, by swapping two bit rows and inverting one of them, the code can be transferred into the Petherick code, whereas by swapping and inverting two bit rows, the code can be transferred into the O'Brien code II.)

{{cite book |title=Digitale Automaten – Theorie, Struktur, Technik, Programmieren |language=de |author-first=Wilhelm |author-last=Kämmerer |author-link=:de:Wilhelm Kämmerer |editor-first1=Hans |editor-last1=Frühauf |editor-link1=:de:Hans Frühauf |editor-first2=Wilhelm |editor-last2=Kämmerer |editor-first3=Kurz |editor-last3=Schröder |editor-first4=Helmut |editor-last4=Winkler |chapter=II.15. Struktur: Informationsdarstellung im Automaten |edition=1 |date=May 1969 |publisher=Akademie-Verlag GmbH |publication-place=Berlin, Germany |location=Jena, Germany |volume=5 |id=License no. 202-100/416/69. Order no. 4666 ES 20 K 3. |series=Elektronisches Rechnen und Regeln |page=173 }} (NB. A second edition 1973 exists as well. Like {{citeref|Borucki|Dittmann|1971|Borucki and Dittmann|style=plain}}, but without naming it Glixon code, the author creates a 20-cyclic tetradic code from Glixon code and a Glixon code variant with inverted high-order bit.)

{{cite book |title=Digitale Meßtechnik: Eine Einführung |chapter=2.3 Gebräuchliche Codes in der digitalen Meßtechnik |language=de |author-first1=Lorenz |author-last1=Borucki |author-first2=Joachim |author-last2=Dittmann |date=1971 |orig-date=July 1970, 1966, Autumn 1965 |publisher=Springer-Verlag |publication-place=Berlin / Heidelberg, Germany |location=Krefeld / Karlsruhe, Germany |edition=2 |lccn=75-131547 |isbn=3-540-05058-2 |id={{ISBN|978-3-642-80561-5}} |doi=10.1007/978-3-642-80560-8 |pages=10–23 [12–14]}} (viii+252 pages) [https://books.google.com/books?id=NwyCBwAAQBAJ&pg=PA15 1st edition] (NB. Like {{citeref|Kämmerer|1969|Kämmerer|style=plain}}, the authors describe a 6-bit 20-cyclic Glixon code.)

{{cite book |title=Design Methods for Digital Systems |chapter=3.3. Unit Distance Codes |author-first=Jean P. |author-last=Chinal |language=en |publisher=Akademie-Verlag / Springer-Verlag |publication-place=Berlin, Germany |location=Paris, France |translator-first=Alan |translator-last1=Preston |translator-first2=Arthur |translator-last2=Summer |date=January 1973 |edition=1st English |id=License No. 202-100/542/73. Order No. 7617470(6047) ES 19 B 1 / 20 K 3 |isbn=978-0-387-05871-9 |doi=10.1007/978-3-642-86187-1 |page=50 |s2cid=60362404 |url=https://books.google.com/books?id=8FnxCAAAQBAJ |access-date=2020-06-21}} (xviii+506 pages) (NB. The French 1967 original book was named "Techniques Booléennes et Calculateurs Arithmétiques", published by {{ill|Éditions Dunod|fr}}.)

{{cite book |title=Military Handbook: Encoders – Shaft Angle To Digital |publisher=United States Department of Defense |id=MIL-HDBK-231A |date=1991-09-30 |url=http://everyspec.com/MIL-HDBK/MIL-HDBK-0200-0299/download.php?spec=MIL_HDBK_231A.1809.pdf |access-date=2020-07-25 |url-status=live |archive-url=https://web.archive.org/web/20200725051128/http://everyspec.com/MIL-HDBK/MIL-HDBK-0200-0299/download.php?spec=MIL_HDBK_231A.1809.pdf |archive-date=2020-07-25}} (NB. Supersedes MIL-HDBK-231(AS) (1970-07-01).)

{{cite book |title=A short note on useful codes for Fluidic Control Circuits |chapter=Codes particularly useful for analogue to digital conversions |author-first=E. Alexander |author-last=Powell |date=June 1968 |id=CoA Memo 156 |publisher=The College of Aeronautics, Department of Production Engineering |publication-place=Cranfield, UK |s2cid=215864694 |pages=7, 9 |url=https://dspace.lib.cranfield.ac.uk/bitstream/handle/1826/9559/COA_Memo_156_June_1968.pdf |access-date=2020-12-15 |url-status=live |archive-url=https://web.archive.org/web/20201215124905/https://dspace.lib.cranfield.ac.uk/bitstream/handle/1826/9559/COA_Memo_156_June_1968.pdf |archive-date=2020-12-15}} (18 pages) (NB. The paper names the Glixon code modified Gray code and misspells Richard W. Hamming's name.)

{{cite web |title=Decimal Representations |author-first=John J. G. |author-last=Savard |date=2018 |orig-date=2006 |work=quadibloc |url=http://www.quadibloc.com/comp/cp0203.htm |access-date=2018-07-16 |url-status=live |archive-url=https://web.archive.org/web/20180716101321/http://www.quadibloc.com/comp/cp0203.htm |archive-date=2018-07-16}}

{{cite journal |title=Loopless Gray Code Enumeration and the Tower of Bucharest |author-first1=Felix |author-last1=Herter |author-first2=Günter |author-last2=Rote |publication-place=Berlin, Germany |orig-date=2018-08-09, 2017-12, 2017-08-09, 2016-04-22 |date=2018-11-14 |journal=Theoretical Computer Science |issn=0304-3975 |volume=748 |arxiv=1604.06707 |s2cid=4014870 |doi=10.1016/j.tcs.2017.11.017 |pages=40–54 |url=https://page.mi.fu-berlin.de/rote/Papers/pdf/Loopless+Gray+code+enumeration+and+the+Tower+of+Bucharest.pdf |access-date=2020-12-16 |url-status=live |archive-url=https://web.archive.org/web/20201216150701/https://page.mi.fu-berlin.de/rote/Papers/pdf/Loopless+Gray+code+enumeration+and+the+Tower+of+Bucharest.pdf |archive-date=2020-12-16}} [https://web.archive.org/web/20201216230211/https://arxiv.org/pdf/1604.06707.pdf] (15/18/19/24 pages)

{{cite conference |title=Using Gray codes as Location Identifiers |author-first1=Thomas |author-last1=Strang |author-first2=Armin |author-last2=Dammann |author-first3=Matthias |author-last3=Röckl |author-first4=Simon |author-last4=Plass |work=6. GI/ITG KuVS Fachgespräch Ortsbezogene Anwendungen und Dienste |language=en, de |date=October 2009 |publisher=Institute of Communications and Navigation, German Aerospace Center (DLR) |publication-place=Oberpfaffenhofen, Germany |citeseerx=10.1.1.398.9164 |access-date=2020-12-16 |url-status=live |url=http://elib.dlr.de/60489/3/paper.pdf |archive-url=https://web.archive.org/web/20150501063457/http://elib.dlr.de/60489/3/paper.pdf |archive-date=2015-05-01}} (5/8 pages) [https://web.archive.org/web/20201216231728/https://elib.dlr.de/60489/2/Strang_Thomas.pdf]

  • {{cite web |author=Thomas Strang |display-authors=etal |date=October 2009 |title=Using Gray codes as Location Identifiers |website=ResearchGate |type=Abstract |url=https://www.researchgate.net/publication/225003251 |archive-url=https://web.archive.org/web/20200903200722/https://www.researchgate.net/profile/Simon_Plass/publication/225003251_Using_Gray_codes_as_Location_Identifiers/links/02e7e53a733e49b2f6000000/Using-Gray-codes-as-Location-Identifiers.pdf |archive-date=2020-09-03 |language=de, en}}

{{cite book |title=Genetic Algorithms in Search, Optimization, and Machine Learning |author-first=David Edward |author-last=Goldberg |author-link=David Edward Goldberg |publisher=Addison-Wesley |publication-place=Reading, Massachusetts, USA |edition=1 |date=1989|bibcode=1989gaso.book.....G }}

{{cite book |title=The Froehlich/Kent Encyclopedia of Telecommunications: Volume 2 - Batteries to Codes-Telecommunications |editor-first1=Fritz E. |editor-last1=Froehlich |editor-first2=Allen |editor-last2=Kent |editor-link2=Allen Kent |editor-first3=Carolyn M. |editor-last3=Hall |chapter=Baudot, Jean Maurice Emile |author-first=Andrew J. |author-last=Butrica |publisher=Marcel Dekker Inc. / CRC Press |date=1991-06-21 |volume=2 |isbn=0-8247-2901-3 |lccn=90-3966 |pages=31–34 |chapter-url=https://books.google.com/books?id=l3Rn_VefKaoC&pg=PA31 |access-date=2020-12-20 |quote-page=31 |quote=[…] A Baudot prototype (4 years in the making) was built in 1876. The transmitter had 5 keys similar to those of a piano. Messages were sent in a special 5-element code devised by Baudot […]}}

{{cite web |title=The Evolution of Character Codes, 1874–1968 |author-first=Eric N. |author-last=Fischer |date=2000-06-20 |id=ark:/13960/t07x23w8s |url=https://archive.org/details/enf-ascii |access-date=2020-12-20 |quote=[…] In 1872, [Baudot] started research toward a telegraph system that would allow multiple operators to transmit simultaneously over a single wire and, as the transmissions were received, would print them in ordinary alphabetic characters on a strip of paper. He received a patent for such a system on June 17, 1874. […] Instead of a variable delay followed by a single-unit pulse, Baudot's system used a uniform six time units to transmit each character. […] his early telegraph probably used the six-unit code […] that he attributes to Davy in an 1877 article. […] in 1876 Baudot redesigned his equipment to use a five-unit code. Punctuation and digits were still sometimes needed, though, so he adopted from Hughes the use of two special letter space and figure space characters that would cause the printer to shift between cases at the same time as it advanced the paper without printing. The five-unit code he began using at this time […] was structured to suit his keyboard […], which controlled two units of each character with switches operated by the left hand and the other three units with the right hand. […]}} [https://web.archive.org/web/20180919020435/http://index-of.es/Varios-2/ASCII%20The%20Evolution%20of%20Character%20Codes.pdf][https://archive.org/details/enf-ascii]

{{cite web |title=Codes that Don't Count - Some Printing Telegraph Codes as Products of their Technologies (With Particular Attention to the Teletypesetter) |author-first=David M. |author-last=MacMillan |work=lemur.com |location=Mineral Point, Wisconsin, USA |version=Revision 3 |date=2010-04-27 |orig-date=2010-04-25, 2010-04-23 |url=http://www.circuitousroot.com/artifice/telegraphy/tty/codes/index.html |access-date=2020-12-20 |url-status=live |archive-url=https://web.archive.org/web/20201218233813/http://www.circuitousroot.com/artifice/telegraphy/tty/codes/index.html |archive-date=2020-12-18}}

{{cite book |title=Convention télégraphique internationale de Saint-Pétersbourg et Règlement et tarifs y annexés, Revision de Lisbonne, 1908 / Extraits de la publication: Documents de la Conférence télégraphique internationale de Lisbonne |language=fr |date=1909 |orig-date=1908 |location=Lisbon, Portugal |publication-place=Berne, Switzerland |publisher=Bureau Internationale de L'Union Télégraphique}}

{{cite book |title=Règlement télégraphique annexé à la convention internationale des télécommunications - protocol finale audit règlement - Madrid, 1932 |language=fr |chapter=Chapter IX. Signaux de transmission, Article 35. Signaux de transmission des alphabets télegraphiques internationaux 'nos 1 et 2, signaux d.u code Morse, de l'appareil Hughes et de l'appareil Siemens |location=Madrid, Spain |publication-place=Berne, Switzerland |publisher=Bureau Internationale de L'Union Télégraphique |date=1933 |orig-date=1932 |pages=31–40 [33] |url=http://search.itu.int/history/HistoryDigitalCollectionDocLibrary/4.5.43.fr.201.pdf |access-date=2020-12-21 |url-status=live |archive-url=https://web.archive.org/web/20201221011133/http://search.itu.int/history/HistoryDigitalCollectionDocLibrary/4.5.43.fr.201.pdf |archive-date=2020-12-21}} (1+188 pages) [https://web.archive.org/web/20201221012741/https://www.itu.int/en/history/Pages/PlenipotentiaryConferences.aspx?conf=4.5]

{{cite book |title=Telegraph Regulations Annexed To The International Telecommunication Convention - Final Protocol To The Telegraph Regulations - Madrid 1932 |chapter=Chapter IX. Transmission Signals. Article 35. Transmission Signals of the International Telegraph Alphabets Nos. 1 and 2, Morse Code Signals and Signals of the Hughes and Siemens Instruments. |language=en, fr |date=1933 |orig-date=1932 |id=43-152-2 / 18693 |pages=32–40 [34] |publisher=General Post Office / His Majesty's Stationery Office |location=London, UK |url=http://search.itu.int/history/HistoryDigitalCollectionDocLibrary/4.5.43.en.101.pdf |access-date=2020-12-21 |url-status=live |archive-url=https://web.archive.org/web/20201221011748/http://search.itu.int/history/HistoryDigitalCollectionDocLibrary/4.5.43.en.101.pdf |archive-date=2020-12-21}} (1+2*120+26 pages) [https://web.archive.org/web/20201221012741/https://www.itu.int/en/history/Pages/PlenipotentiaryConferences.aspx?conf=4.5]

{{cite journal |title=Einige neuere Vorschläge zur mehrfachen Telegraphie: A. Absatzweise vielfache Telegraphie |language=de |date=1877 |journal=Dingler's Polytechnisches Journal |editor-first1=Johann |editor-last1=Zeman |editor-first2=Ferdinand |editor-last2=Fischer |publication-place=Augsburg, Germany |publisher=J. G. Cotta'sche Buchhandlung |volume=226 |pages=499–507 |url=http://dingler.culture.hu-berlin.de/article/pj226/ar226125 |access-date=2020-12-21 |url-status=live |archive-url=https://web.archive.org/web/20201221163504/http://dingler.culture.hu-berlin.de/article/pj226/ar226125 |archive-date=2020-12-21 |quote-page=499 |quote=[…] Der um die Mitte des J[ahres] 1874 patenti[e]rte, ebenfalls dem Highton'schen verwandte Typendrucker des französischen Telegraphen-Verwaltungsbeamten Baudot wurde bei seiner 1875 patenti[e]rten Weiterentwicklung in einen fünffachen umgewandelt […]}}

}}

Further reading

{{refbegin|30em}}

  • {{cite book |author-first=Richard Kohler |author-last=Richards |title=Arithmetic Operations in Digital Computers |publisher=D. Van Nostrand Co., Inc. |location=New York, USA |edition=5 |date=1955 |url=https://books.google.com/books?id=BI5QAAAAMAAJ}}
  • {{cite book |author-first=Richard Kohler |author-last=Richards |title=Electronic Digital Components and Circuits |publisher=D. Van Nostrand Co., Inc. |date=1967 |pages=490, 500–504, 510–511}}
  • {{cite web |author-last=Black |author-first=Paul E. |title=Gray code |date=2004-02-25 |publisher=NIST |url=https://xlinux.nist.gov/dads/HTML/graycode.html}}
  • {{cite book |author-last1=Press |author-first1=William H. |author-last2=Teukolsky |author-first2=Saul A. |author-last3=Vetterling |author-first3=William T. |author-last4=Flannery |author-first4=Brian P. |date=2007 |title=Numerical Recipes: The Art of Scientific Computing |edition=3rd |publisher=Cambridge University Press |publication-place=New York, USA |isbn=978-0-521-88068-8 |chapter=Section 22.3. Gray Codes |chapter-url=http://apps.nrbook.com/empanel/index.html#pg=1166 |access-date=2011-08-18 |archive-date=2011-08-11 |archive-url=https://web.archive.org/web/20110811154417/http://apps.nrbook.com/empanel/index.html#pg=1166 |url-status=dead }}
  • {{cite journal |author-last=Savage |author-first=Carla Diane |author-link=Carla Diane Savage |title=A Survey of Combinatorial Gray Codes |journal=SIAM Review |publisher=Society for Industrial and Applied Mathematics (SIAM) |volume=39 |issue=4 |pages=605–629 |date=1997 |doi=10.1137/S0036144595295272 |url=http://www4.ncsu.edu/~savage/AVAILABLE_FOR_MAILING/survey.ps|jstor=2132693 |bibcode=1997SIAMR..39..605S |citeseerx=10.1.1.39.1924|s2cid=6375360 }}
  • {{cite book |author-last=Wilf |author-first=Herbert Saul |author-link=Herbert Saul Wilf |chapter=Chapters 1–3 |title=Combinatorial algorithms: An update |url=https://archive.org/details/combinatorialalg0000wilf |url-access=registration |publisher=Society for Industrial and Applied Mathematics (SIAM) |date=1989 |isbn=0-89871-231-9 }}
  • {{cite book |author-first1=Megan |author-last1=Dewar |author-first2=Brett |author-last2=Stevens |title=Ordering Block Designs – Gray Codes, Universal Cycles and Configuration |publisher=Springer Science+Business Media |location=New York, USA |edition=1 |date=2012-08-29 |isbn=978-1-46144324-7 |series=CMS Books in Mathematics |issn=1613-5237 |doi=10.1007/978-1-4614-4325-4}}
  • {{cite web |title=Gray Code Fundamentals |work=Design How-To |at=Part 1 |author-first=Clive "Max" |author-last=Maxfield |date=2012-10-01 |orig-date=2011-05-28 |publisher=EETimes |url=https://www.eetimes.com/document.asp?doc_id=1278809 |access-date=2017-10-30 |url-status=live |archive-url=https://web.archive.org/web/20171030135842/https://www.eetimes.com/document.asp?doc_id=1278809 |archive-date=2017-10-30}} [https://www.eetimes.com/document.asp?doc_id=1278827 Part 2] [https://www.eetimes.com/document.asp?doc_id=1278853 Part 3]
  • {{cite book |title=Hacker's Delight |title-link=Hacker's Delight |chapter=Chapter 13: Gray Code |author-first=Henry S. |author-last=Warren, Jr. |date=2013 |edition=2 |publisher=Addison WesleyPearson Education, Inc. |isbn=978-0-321-84268-8 |pages=311–317}} (7 pages)
  • {{cite journal |title=Computing Binary Combinatorial Gray Codes Via Exhaustive Search With SAT Solvers |author-last1=Zinovik |author-first1=Igor |author-last2=Kroening |author-first2=Daniel |author-last3=Chebiryak |author-first3=Yury |journal=IEEE Transactions on Information Theory |publisher=IEEE |volume=54 |issue=4 |date=2008-03-21 |pages=1819–1823 |doi=10.1109/TIT.2008.917695 |url=https://ieeexplore.ieee.org/document/4475394 |hdl=20.500.11850/11304 |s2cid=2854180 |hdl-access=free}} (5 pages)
  • {{cite journal |author-first=Joseph A. |author-last=O'Brien |title=Unit-Distance Binary-Decimal Code Translators |journal=IRE Transactions on Electronic Computers |volume=EC-6 |issue=2 |date=June 1957 |issn=0367-9950 |doi=10.1109/TEC.1957.5221585 |pages=122–123 |url=https://www.researchgate.net/publication/250929745 |access-date=2020-05-25}} (2 pages)
  • {{cite magazine |title=A decimal Gray code – Easily converted for shaft position coding |author-first=K. G. |author-last=Barr |location=Faculty of Natural Sciences, University of the West Indies |date=March 1981 |magazine=Wireless World |volume=87 |number=1542 |pages=86–87 |url=https://worldradiohistory.com/hd2/IDX-Site-Early-Radio/Archive-Wireless-World-IDX/80s/Wireless-World-1981-03-OCR-Page-0046.pdf |access-date=2020-07-28 |url-status=live |archive-url=https://web.archive.org/web/20200728093447/https://worldradiohistory.com/hd2/IDX-Site-Early-Radio/Archive-Wireless-World-IDX/80s/Wireless-World-1981-03-OCR-Page-0046.pdf |archive-date=2020-07-28}}

{{refend}}