Gray code

From HandWiki
(Redirected from Petherick code)
Short description: Ordering of binary values, used for positioning and error correction


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 "001" and "2" would be "010". In Gray code, these values are represented as "001" and "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.[1]

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:

Decimal Binary
... ...
3 011
4 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 011001101100. When the switches appear to be in position 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.

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,[2][3][4][5][6] single-distance, single-step, monostrophic[7][8][5][6] or syncopic codes,[7] in reference to the Hamming distance of 1 between adjacent codes.

Invention

Gray's patent introduces the term "reflected binary code"

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.[9][10][11] Frank Gray introduced the term reflected binary code in his 1947 patent application, remarking that the code had "as yet no recognized name".[12] He derived the name from the fact that it "may be built up from the conventional binary code by a sort of reflection process".

In the standard encoding the least significant bit follows a repetitive pattern of 2 on, 2 off ( … 11001100 … ); the next digit a pattern of 4 on, 4 off; the ith 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 2n-1 on 2n-1 off, the same as for the second-most significant digit, but starting at a different point in the sequence. The four-bit version of this is shown below:

Visualized as a traversal of vertices of a tesseract
Gray code along the number line
Decimal Binary Gray
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
10 1010 1111
11 1011 1110
12 1100 1010
13 1101 1011
14 1110 1001
15 1111 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.[13]

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[9][10][11] 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";[14][15] one of those also lists "minimum error code" and "cyclic permutation code" among the names.[15] A 1954 patent application refers to "the Bell Telephone Gray code".[16] Other names include "cyclic binary code",[10] "cyclic progression code",[17][10] "cyclic permuting binary"[18] or "cyclic permuted binary" (CPB).[19][20]

The Gray code is sometimes misattributed to 19th century electrical device inventor Elisha Gray.[11][21][22][23]

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.[24][11]

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

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

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

Telegraphy codes

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[31] or 1876,[32][33] 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,[34][35][36] and other symbols appropriately placed, the 5-bit character code has been recognized as a reflected binary code.[11] This code became known as Baudot code[37] and, with minor changes, was eventually adopted as International Telegraph Alphabet No. 1 (ITA1, CCITT-1) in 1932.[38][39][36]

About the same time, the German-Austrian Otto Schäffler (de)[40] demonstrated another printing telegraph in Vienna using a 5-bit reflected binary code for the same purpose, in 1874.[41][11]

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,[12] 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.[42]

Part of front page of Gray's patent, showing PCM tube (10) with reflected binary code in plate (15)

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

Rotary encoder for angle-measuring devices marked in 3-bit binary-reflected Gray code (BRGC)
A Gray code absolute rotary encoder with 13 tracks. Housing, interrupter disk, and light source are in the top; sensing element and support components are in the bottom.

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.[13] 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[43][44][45] as well as in Händler circle graphs since 1958,[46][47][48][49] 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.

Communication between clock domains

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 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,[50] 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.[9][10][11]

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.[51] 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,[nb 1] 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.[52]

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,[53] add one to it with a standard binary adder, and then convert the result back to Gray code.[54] 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.[55]

Gray code addressing

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.[56][57]

Constructing an n-bit Gray code

The first few steps of the reflect-and-prefix method.
4-bit Gray code permutation

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 0, prefixing the entries in the reflected list with a binary 1, and then concatenating the original list with the reversed list.[11] For example, generating the n = 3 list from the n = 2 list:

2-bit list: 00, 01, 11, 10  
Reflected:   10, 11, 01, 00
Prefix old entries with 0: 000, 001, 011, 010,  
Prefix new entries with 1:   110, 111, 101, 100
Concatenated: 000, 001, 011, 010, 110, 111, 101, 100

The one-bit Gray code is G1 = (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 [math]\displaystyle{ n \oplus \left\lfloor \tfrac{n}{2} \right\rfloor }[/math]. Prepending a 0 bit leaves the order of the code words unchanged, prepending a 1 bit reverses the order of the code words. If the bits at position [math]\displaystyle{ i }[/math] of codewords are inverted, the order of neighbouring blocks of [math]\displaystyle{ 2^i }[/math] codewords is reversed. For example, if bit 0 is inverted in a 3 bit codeword sequence, the order of two neighbouring codewords is reversed

000,001,010,011,100,101,110,111 → 001,000,011,010,101,100,111,110  (invert bit 0)

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

000,001,010,011,100,101,110,111 → 010,011,000,001,110,111,100,101  (invert bit 1)

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

000,001,010,011,100,101,110,111 → 100,101,110,111,000,001,010,011  (invert bit 2)

Thus, performing an exclusive or on a bit [math]\displaystyle{ b_i }[/math] at position [math]\displaystyle{ i }[/math] with the bit [math]\displaystyle{ b_{i+1} }[/math] at position [math]\displaystyle{ i+1 }[/math] leaves the order of codewords intact if [math]\displaystyle{ b_{i+1} = \mathtt{0} }[/math], and reverses the order of blocks of [math]\displaystyle{ 2^{i+1} }[/math] codewords if [math]\displaystyle{ b_{i+1} = \mathtt{1} }[/math]. 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 [math]\displaystyle{ g_i }[/math] is the [math]\displaystyle{ i }[/math]th Gray-coded bit ([math]\displaystyle{ g_0 }[/math] being the most significant bit), and [math]\displaystyle{ b_i }[/math] is the [math]\displaystyle{ i }[/math]th binary-coded bit ([math]\displaystyle{ b_0 }[/math] being the most-significant bit), the reverse translation can be given recursively: [math]\displaystyle{ b_0 = g_0 }[/math], and [math]\displaystyle{ b_i=g_i \oplus b_{i-1} }[/math]. 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 [math]\displaystyle{ \mathrm{code}_0 = \mathtt{0} }[/math], and at step [math]\displaystyle{ i \gt 0 }[/math] find the bit position of the least significant 1 in the binary representation of [math]\displaystyle{ i }[/math] and flip the bit at that position in the previous code [math]\displaystyle{ \mathrm{code}_{i-1} }[/math] to get the next code [math]\displaystyle{ \mathrm{code}_i }[/math]. The bit positions start 0, 1, 0, 2, 0, 1, 0, 3, ....[nb 2] 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.[58][53][nb 1]

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 2n

It is possible to construct binary Gray codes with n bits with a length of less than 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.[59] OEIS sequence A290772 [60] gives the number of possible Gray sequences of length 2 n which include zero and use the minimum number of bits.

n-ary Gray code

Ternary number → ternary Gray code
Template:Monodiv

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 0,1,2.[29] The (nk)-Gray code is the n-ary Gray code with k digits.[61] The sequence of elements in the (3, 2)-Gray code is: 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,[61] 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".[50] 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 [math]\displaystyle{ (\delta_k) }[/math]; the transition counts (spectrum) of G are the collection of integers defined by

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

A Gray code is uniform or uniformly balanced if its transition counts are all equal, in which case we have [math]\displaystyle{ \lambda_k = \tfrac{R^n}{n} }[/math] for all k. Clearly, when [math]\displaystyle{ R = 2 }[/math], such codes exist only if n is a power of 2.[62] 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 [math]\displaystyle{ 2\left\lfloor \tfrac{2^n}{2n} \right\rfloor }[/math] or [math]\displaystyle{ 2\left\lceil \tfrac{2^n}{2n} \right\rceil }[/math].[50] 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.[63]

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:[50]

0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 0
0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0
0 0 0 0 1 1 1 1 1 0 0 1 1 1 0 0
0 0 0 1 1 0 0 0 0 0 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:[50]

1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 1 1 0 0 0
1 1 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1
1 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 1
1 1 1 1 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 1

We will now show a construction[64] and implementation[65] 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 [math]\displaystyle{ G' }[/math] given an n-digit Gray code G in such a way that the balanced property is preserved. To do this, we consider partitions of [math]\displaystyle{ G = g_0, \ldots, g_{2^n-1} }[/math] into an even number L of non-empty blocks of the form

[math]\displaystyle{ \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\} }[/math]

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

[math]\displaystyle{ \mathtt{00}g_0, }[/math]
[math]\displaystyle{ \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}, }[/math]
[math]\displaystyle{ \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, }[/math]
[math]\displaystyle{ \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 }[/math]

If we define the transition multiplicities

[math]\displaystyle{ m_i = \left|\left\{ j : \delta_{k_j} = i, 1 \leq j \leq L \right\}\right| }[/math]

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 [math]\displaystyle{ \lambda'_i }[/math] is

[math]\displaystyle{ \lambda'_i = \begin{cases} 4 \lambda_i - 2 m_i, & \text{if } 0 \leq i \lt n \\ L, & \text{ otherwise } \end{cases} }[/math]

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 [math]\displaystyle{ i }[/math] transition and splitting another block at another digit [math]\displaystyle{ i }[/math] transition produces a different Gray code with exactly the same transition spectrum [math]\displaystyle{ \lambda'_i }[/math], so one may for example[63] designate the first [math]\displaystyle{ m_i }[/math] transitions at digit [math]\displaystyle{ i }[/math] as those that fall between two blocks. Uniform codes can be found when [math]\displaystyle{ R \equiv 0 \pmod 4 }[/math] and [math]\displaystyle{ R^n \equiv 0 \pmod n }[/math], and this construction can be extended to the R-ary case as well.[64]

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.[66]

Monotonic Gray codes

Monotonic codes are useful in the theory of interconnection networks, especially for minimizing dilation for linear arrays of processors.[67] 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 [math]\displaystyle{ Q_n = (V_n, E_n) }[/math] into levels of vertices that have equal weight, i.e.

[math]\displaystyle{ V_n(i) = \{ v \in V_n : v \text{ has weight } i \} }[/math]

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

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

[math]\displaystyle{ P_{n+1,j} = \mathtt{1}P^{\pi_n}_{n,j-1}, \mathtt{0}P_{n,j} }[/math]

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

[math]\displaystyle{ 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 }[/math]

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

Subpaths in the Savage–Winkler algorithm
[math]\displaystyle{ P_{n,j} }[/math] j = 0 j = 1 j = 2 j = 3
n = 1 0, 1
n = 2 00, 01 10, 11
n = 3 000, 001 100, 110, 010, 011 101, 111
n = 4 0000, 0001 1000, 1100, 0100, 0110, 0010, 0011 1010, 1011, 1001, 1101, 0101, 0111 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 [math]\displaystyle{ Q_{2n+1}(n) }[/math] 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 [math]\displaystyle{ n \leq 15 }[/math], and the preceding construction for monotonic codes ensures a Hamiltonian path of length at least 0.839N where N is the number of vertices in the middle-level subgraph.[68]

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.[69] 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.[69] 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.[11] According to Sawada and Wong, the search space for n = 6 can be explored in 15 hours, and more than 9,500 solutions for the case n = 7 have been found.[70]

Snake-in-the-box codes

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,[71] 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;[3] 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

Yet another kind of Gray code is the single-track Gray code (STGC) developed by Norman B. Spedding[72][73] and refined by Hiltgen, Paterson and Brandestini in "Single-track Gray codes" (1996).[74][75] 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.[76]

Animated and color-coded version of the STGC rotor.

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 0 or 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[77] 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.[72] 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.[78] 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:

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

Each column is a cyclic shift of the first column, and from any row to the next row only one bit changes.[79] 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.[80]

9-bit, Single-Track Gray Code, displaying one degree angular resolution.

Since this 30 degree example was added, there has been a lot of interest in examples with higher angular resolution. In 2008, Gary Williams,[81] based on previous work [78] 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[82] was designed by etzenseep (Florian Bauer) in September, 2022.

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

Single-track Gray code for 360 positions
Angle Code Angle Code Angle Code Angle Code Angle Code Angle Code Angle Code Angle Code Angle Code
100000001 40° 000000011 80° 000000110 120° 000001100 160° 000011000 200° 000110000 240° 001100000 280° 011000000 320° 110000000
110000001 41° 100000011 81° 000000111 121° 000001110 161° 000011100 201° 000111000 241° 001110000 281° 011100000 321° 111000000
111000001 42° 110000011 82° 100000111 122° 000001111 162° 000011110 202° 000111100 242° 001111000 282° 011110000 322° 111100000
111000011 43° 110000111 83° 100001111 123° 000011111 163° 000111110 203° 001111100 243° 011111000 283° 111110000 323° 111100001
111000111 44° 110001111 84° 100011111 124° 000111111 164° 001111110 204° 011111100 244° 111111000 284° 111110001 324° 111100011
111001111 45° 110011111 85° 100111111 125° 001111111 165° 011111110 205° 111111100 245° 111111001 285° 111110011 325° 111100111
111011111 46° 110111111 86° 101111111 126° 011111111 166° 111111110 206° 111111101 246° 111111011 286° 111110111 326° 111101111
111011011 47° 110110111 87° 101101111 127° 011011111 167° 110111110 207° 101111101 247° 011111011 287° 111110110 327° 111101101
101011011 48° 010110111 88° 101101110 128° 011011101 168° 110111010 208° 101110101 248° 011101011 288° 111010110 328° 110101101
101011111 49° 010111111 89° 101111110 129° 011111101 169° 111111010 209° 111110101 249° 111101011 289° 111010111 329° 110101111
10° 101011101 50° 010111011 90° 101110110 130° 011101101 170° 111011010 210° 110110101 250° 101101011 290° 011010111 330° 110101110
11° 101010101 51° 010101011 91° 101010110 131° 010101101 171° 101011010 211° 010110101 251° 101101010 291° 011010101 331° 110101010
12° 101010111 52° 010101111 92° 101011110 132° 010111101 172° 101111010 212° 011110101 252° 111101010 292° 111010101 332° 110101011
13° 101110111 53° 011101111 93° 111011110 133° 110111101 173° 101111011 213° 011110111 253° 111101110 293° 111011101 333° 110111011
14° 001110111 54° 011101110 94° 111011100 134° 110111001 174° 101110011 214° 011100111 254° 111001110 294° 110011101 334° 100111011
15° 001010111 55° 010101110 95° 101011100 135° 010111001 175° 101110010 215° 011100101 255° 111001010 295° 110010101 335° 100101011
16° 001011111 56° 010111110 96° 101111100 136° 011111001 176° 111110010 216° 111100101 256° 111001011 296° 110010111 336° 100101111
17° 001011011 57° 010110110 97° 101101100 137° 011011001 177° 110110010 217° 101100101 257° 011001011 297° 110010110 337° 100101101
18° 001011001 58° 010110010 98° 101100100 138° 011001001 178° 110010010 218° 100100101 258° 001001011 298° 010010110 338° 100101100
19° 001111001 59° 011110010 99° 111100100 139° 111001001 179° 110010011 219° 100100111 259° 001001111 299° 010011110 339° 100111100
20° 001111101 60° 011111010 100° 111110100 140° 111101001 180° 111010011 220° 110100111 260° 101001111 300° 010011111 340° 100111110
21° 000111101 61° 001111010 101° 011110100 141° 111101000 181° 111010001 221° 110100011 261° 101000111 301° 010001111 341° 100011110
22° 000110101 62° 001101010 102° 011010100 142° 110101000 182° 101010001 222° 010100011 262° 101000110 302° 010001101 342° 100011010
23° 000100101 63° 001001010 103° 010010100 143° 100101000 183° 001010001 223° 010100010 263° 101000100 303° 010001001 343° 100010010
24° 000101101 64° 001011010 104° 010110100 144° 101101000 184° 011010001 224° 110100010 264° 101000101 304° 010001011 344° 100010110
25° 000101001 65° 001010010 105° 010100100 145° 101001000 185° 010010001 225° 100100010 265° 001000101 305° 010001010 345° 100010100
26° 000111001 66° 001110010 106° 011100100 146° 111001000 186° 110010001 226° 100100011 266° 001000111 306° 010001110 346° 100011100
27° 000110001 67° 001100010 107° 011000100 147° 110001000 187° 100010001 227° 000100011 267° 001000110 307° 010001100 347° 100011000
28° 000010001 68° 000100010 108° 001000100 148° 010001000 188° 100010000 228° 000100001 268° 001000010 308° 010000100 348° 100001000
29° 000011001 69° 000110010 109° 001100100 149° 011001000 189° 110010000 229° 100100001 269° 001000011 309° 010000110 349° 100001100
30° 000001001 70° 000010010 110° 000100100 150° 001001000 190° 010010000 230° 100100000 270° 001000001 310° 010000010 350° 100000100
31° 100001001 71° 000010011 111° 000100110 151° 001001100 191° 010011000 231° 100110000 271° 001100001 311° 011000010 351° 110000100
32° 100001101 72° 000011011 112° 000110110 152° 001101100 192° 011011000 232° 110110000 272° 101100001 312° 011000011 352° 110000110
33° 100000101 73° 000001011 113° 000010110 153° 000101100 193° 001011000 233° 010110000 273° 101100000 313° 011000001 353° 110000010
34° 110000101 74° 100001011 114° 000010111 154° 000101110 194° 001011100 234° 010111000 274° 101110000 314° 011100001 354° 111000010
35° 010000101 75° 100001010 115° 000010101 155° 000101010 195° 001010100 235° 010101000 275° 101010000 315° 010100001 355° 101000010
36° 010000111 76° 100001110 116° 000011101 156° 000111010 196° 001110100 236° 011101000 276° 111010000 316° 110100001 356° 101000011
37° 010000011 77° 100000110 117° 000001101 157° 000011010 197° 000110100 237° 001101000 277° 011010000 317° 110100000 357° 101000001
38° 010000001 78° 100000010 118° 000000101 158° 000001010 198° 000010100 238° 000101000 278° 001010000 318° 010100000 358° 101000000
39° 000000001 79° 000000010 119° 000000100 159° 000001000 199° 000010000 239° 000100000 279° 001000000 319° 010000000 359° 100000000
Starting and ending angles for the 20 tracks for a Single-track Gray Code with 9 sensors separated by 40°
Starting Angle Ending Angle Length
3 4 2
23 28 6
31 37 7
44 48 5
56 60 5
64 71 8
74 76 3
88 91 4
94 96 3
99 104 6
110 115 6
131 134 4
138 154 17
173 181 9
186 187 2
220 238 19
242 246 5
273 279 7
286 289 4
307 360 54

Two-dimensional Gray code

A Gray-coded constellation diagram for rectangular 16-QAM

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.[83]

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.[84]

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

Related codes

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

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

4-bit unit-distance BCD codes[nb 6]
Name Bit 0 1 2 3 4 5 6 7 8 9 Weights[nb 7] Tracks Compl. Cyclic 5s Comment
Gray BCD 4 0 0 0 0 0 0 0 0 1 1 0—3 4 (3[nb 8]) No (2, 4, 8, 16) No [110][111]
3 0 0 0 0 1 1 1 1 1 1
2 0 0 1 1 1 1 0 0 0 0
1 0 1 1 0 0 1 1 0 0 1
Paul 4 1 0 0 0 0 0 0 0 1 1 1—3 4 (3[nb 8]) No 2, 10 No [125]
3 0 0 0 0 1 1 1 1 1 1
2 0 0 1 1 1 1 0 0 0 0
1 1 1 1 0 0 1 1 0 0 1
Glixon 4 0 0 0 0 0 0 0 0 1 1 0—3 4 No 2, 4, 8, 10 (shifted +1) [122][110][111][123][124][nb 5]
3 0 0 0 0 1 1 1 1 1 0
2 0 0 1 1 1 1 0 0 0 0
1 0 1 1 0 0 1 1 0 0 0
Tompkins I 4 0 0 0 0 0 1 1 1 1 1 0—4 2 No 2, 4, 10 Yes [2][110][111]
3 0 0 0 0 1 1 1 1 1 0
2 0 0 1 1 1 1 1 0 0 0
1 0 1 1 0 0 0 1 1 0 0
O'Brien I (Watts) 4 0 0 0 0 0 1 1 1 1 1 0—3 4 9[103][104][nb 9] 2, 4, 10 Yes [109][110][111][nb 5]
3 0 0 0 0 1 1 0 0 0 0
2 0 0 1 1 1 1 1 1 0 0
1 0 1 1 0 0 0 0 1 1 0
Petherick (RAE) 4 0 0 0 0 0 1 1 1 1 1 1—3 3 9[103][104][nb 9] 2, 10 Yes [17][107][nb 4]
3 1 0 0 0 1 1 0 0 0 1
2 0 0 1 1 1 1 1 1 0 0
1 1 1 1 0 0 0 0 1 1 1
O'Brien II 4 0 0 0 0 0 1 1 1 1 1 1—3 3 9[89][103][104][nb 9] 2, 10 Yes [109][110][111][nb 4]
3 0 0 0 1 1 1 1 0 0 0
2 0 1 1 1 0 0 1 1 1 0
1 1 1 0 0 0 0 0 0 1 1
Susskind 4 0 0 0 0 0 1 1 1 1 1 1—4 3 9[nb 9] 2, 10 Yes [4]
3 0 0 1 1 1 1 1 1 0 0
2 0 1 1 1 0 0 1 1 1 0
1 1 1 1 0 0 0 0 1 1 1
Klar 4 0 0 0 0 0 1 1 1 1 1 0—4 4 (3[nb 8]) 9[nb 9] 2, 10 Yes [126][127]
3 0 0 0 1 1 1 1 0 0 0
2 0 0 1 1 1 1 1 1 0 0
1 0 1 1 1 0 0 1 1 1 0
Tompkins II 4 0 0 0 0 0 1 1 1 1 1 1—3 2 9[nb 10] 2, 10 Yes [2][110][111]
3 0 0 1 1 1 1 1 0 0 0
2 1 1 1 0 0 0 0 0 1 1
1 0 1 1 1 0 0 1 1 1 0
Excess-3 Gray 4 0 0 0 0 0 1 1 1 1 1 1—4 4 9[103][104][nb 9] 2, 10 Yes [6][103]
3 0 1 1 1 1 1 1 1 1 0
2 1 1 1 0 0 0 0 1 1 1
1 0 0 1 1 0 0 1 1 0 0

See also

Notes

  1. 1.0 1.1 1.2 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.[C]
  2. Sequence 0, 1, 0, 2, 0, 1, 0, 3, … (sequence A007814 in the OEIS).
  3. 3.0 3.1 3.2 There are several Gray code variants which are called "modified" of some sort: The Glixon code is sometimes called modified Gray code.[D] The Lucal code is also called modified reflected binary code (MRB).[E] The O'Brien code I or Watts code is sometimes referred to as reflected binary modified Gray code.[F]
  4. 4.0 4.1 4.2 4.3 By interchanging and inverting three bit rows, the O'Brien code II and the Petherick code can be transferred into each other.
  5. 5.0 5.1 5.2 5.3 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.
  6. Other unit-distance BCD codes include the non-Gray code related 5-bit Libaw–Craig and the 1-2-1 code.
  7. 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).
  8. 8.0 8.1 8.2 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.
  9. 9.0 9.1 9.2 9.3 9.4 9.5 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.
  10. For Tompkins code II, a 9s complement can be derived by inverting the first three digits and swapping the two middle binary digits.

References

  1. Gray, Joel (March 2020). "Understanding Gray Code: A Reliable Encoding System" (in en). Section: Conclusion. https://graycode.ie/blog/graycode/. 
  2. 2.0 2.1 2.2 2.3 "Unit-Distance Binary-Decimal Codes for Two-Track Commutation". IRE Transactions on Electronic Computers. Correspondence (Moore School of Electrical Engineering, University of Pennsylvania, Philadelphia, Pennsylvania, USA) EC-5 (3): 139. September 1956. doi:10.1109/TEC.1956.5219934. ISSN 0367-9950. https://dokumen.tips/documents/unit-distance-binary-decimal-codes-for-two-track-commutation.html. Retrieved 2020-05-18.  (1 page)
  3. 3.0 3.1 "Unit-Distance Error-Checking Codes". IRE Transactions on Electronic Computers EC-7 (2): 179–180. June 1958. doi:10.1109/TEC.1958.5222529. ISSN 0367-9950.  (2 pages)
  4. 4.0 4.1 Susskind, Alfred Kriss, ed (1958-03-28). "III.F. Unit-Distance Codes / VI.E.2. Reflected Binary Codes". written at Cambridge, Massachusetts, USA. Notes on Analog-Digital Conversion Techniques. Technology Books in Science and Engineering. 1 (3 ed.). New York, USA: Technology Press of the Massachusetts Institute of Technology / John Wiley & Sons, Inc. / Chapman & Hall, Ltd.. pp. 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.)
  5. 5.0 5.1 "3.3. Unit Distance Codes". written at Paris, France (in en). Design Methods for Digital Systems (1st English ed.). Berlin, Germany: Akademie-Verlag / Springer-Verlag. January 1973. p. 50. doi:10.1007/978-3-642-86187-1. License No. 202-100/542/73. Order No. 7617470(6047) ES 19 B 1 / 20 K 3. ISBN 978-0-387-05871-9. https://books.google.com/books?id=8FnxCAAAQBAJ. Retrieved 2020-06-21.  (xviii+506 pages) (NB. The French 1967 original book was named "Techniques Booléennes et Calculateurs Arithmétiques", published by Éditions Dunod (fr).)
  6. 6.0 6.1 6.2 6.3 6.4 6.5 Military Handbook: Encoders – Shaft Angle To Digital. United States Department of Defense. 1991-09-30. MIL-HDBK-231A. http://everyspec.com/MIL-HDBK/MIL-HDBK-0200-0299/download.php?spec=MIL_HDBK_231A.1809.pdf. Retrieved 2020-07-25.  (NB. Supersedes MIL-HDBK-231(AS) (1970-07-01).)
  7. 7.0 7.1 7.2 "Digital coding and translating system". Monrovia, California, USA: Datex Corporation. 1965-01-12. https://patentimages.storage.googleapis.com/7f/1d/09/6a9b1fa3e67cb8/US3165731.pdf.  (28 pages)
  8. 8.0 8.1 "Some Binary Codes and a Novel Five-Channel Code". Control (Systems, Instrumentation, Data Processing, Automation, Management, incorporating Automation Progress). Special Features (London, UK: Morgan-Grampain (Publishers) Limited) 8 (74): 399–404. August 1964. https://books.google.com/books?id=jf4eAAAAMAAJ. Retrieved 2020-06-22.  (6 pages)
  9. 9.0 9.1 9.2 "Binary counter". Bell Telephone Laboratories, Incorporated. 1943-01-12. https://patents.google.com/patent/US2307868?oq=US2307868. "[…] 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 […]"  [1] (4 pages)
  10. 10.0 10.1 10.2 10.3 10.4 "Shaft Angle Encoders Afford High Accuracy". Electronic Industries (Chilton Company) 18 (10): 76–80. October 1959. https://worldradiohistory.com/Archive-Tele-Tech/50s/Electronic-Industries-1959-10.pdf. Retrieved 2018-01-14. "[…] 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. […]". 
  11. 11.0 11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8 "Enumeration and Backtracking / Generating all n-tuples". The Art of Computer Programming, Volume 4A: Combinatorial Algorithms, Part 1. 4A (1 ed.). Addison-Wesley Professional. 2014-09-12. pp. 442–443. ISBN 978-0-13348885-2. https://books.google.com/books?id=IkuEBAAAQBAJ.  (912 pages)
  12. 12.0 12.1 Pulse Code Communication. New York, USA: Bell Telephone Laboratories, Incorporated. 1953-03-17. U.S. Patent 2,632,058. Serial No. 785697. https://patentimages.storage.googleapis.com/a3/d7/f2/0343f5f2c0cf50/US2632058.pdf. Retrieved 2020-08-05.  (13 pages)
  13. 13.0 13.1 Genetic Algorithms in Search, Optimization, and Machine Learning (1 ed.). Reading, Massachusetts, USA: Addison-Wesley. 1989. Bibcode1989gaso.book.....G. 
  14. Encoding Circuit. Long Branch, New Jersey, USA: US Secretary of the Army. 1956-01-31. U.S. Patent 2,733,432. Serial No. 401738. https://patentimages.storage.googleapis.com/46/90/d6/2ed9fb7a77e643/US2733432.pdf. Retrieved 2020-08-05.  (8 pages)
  15. 15.0 15.1 Direction-Sensitive Binary Code Position Control System. North Hollywood, California, USA: Bendix Aviation Corporation. 1958-02-11. U.S. Patent 2,823,345. Serial No. 386524. https://patentimages.storage.googleapis.com/ad/74/b1/2b0aa965d0c1df/US2823345.pdf. Retrieved 2020-08-05.  (10 pages)
  16. Automatic Rectification System. US Secretary of the Navy. 1958-06-24. U.S. Patent 2,839,974. Serial No. 403085. https://patentimages.storage.googleapis.com/9d/bf/65/e676a661e1217e/US2839974.pdf. Retrieved 2020-08-05.  (8 pages)
  17. 17.0 17.1 17.2 A Cyclic Progressive Binary-coded-decimal System of Representing Numbers (Technical Note MS15). Farnborough, UK: Royal Aircraft Establishment (RAE). October 1953.  (4 pages) (NB. Sometimes referred to as A Cyclic-Coded Binary-Coded-Decimal System of Representing Numbers.)
  18. 18.0 18.1 Fundamentals of Digital Instrumentation (1 ed.). London, UK: Hilger & Watts Ltd. 1960. https://books.google.com/books?id=gpVNAAAAYAAJ. Retrieved 2020-05-24.  (39 pages)
  19. 19.0 19.1 "Chapter Three: Direct Reading from Coded Scales". Digital Data: Their derivation and reduction for analysis and process control (1 ed.). London, UK: Hilger & Watts Ltd / Interscience Publishers. March 1961. pp. 18–23. https://books.google.com/books?id=WOIJAAAAMAAJ. Retrieved 2020-05-24. "[…] 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".)
  20. Tables for the Binary Encoding of Angles (1 ed.). United Kingdom Atomic Energy Authority, Research Group, Atomic Energy Research Establishment, Harwell, UK: H. M. Stationery Office. 1965. https://books.google.com/books?id=aUEgAQAAIAAJ. Retrieved 2020-05-24.  (12 pages)
  21. "Pioneers Of Binary Coding". Journal of the Institution of Electrical Engineers (Manchester College of Science and Technology, Faculty of Technology of the University of Manchester, Manchester, UK: Institution of Engineering and Technology (IET)) 7 (81): 539–541. September 1961. doi:10.1049/jiee-3.1961.0300. https://ieeexplore.ieee.org/document/5324416. Retrieved 2020-06-22.  (3 pages)
  22. Principles of pulse code modulation (1 ed.). London, UK / New York, USA: Iliffe Books Ltd. / American Elsevier Publishing Company, Inc.. 1969. pp. 245, 434. ISBN 978-0-444-19747-4. "[…] 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 Heath 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)
  23. Cogwheels of the Mind: The Story of Venn Diagrams. Baltimore, Maryland, USA: Johns Hopkins University Press. 2004. pp. 48, 50. ISBN 0-8018-7434-3. https://books.google.com/books?id=7_0Thy4V3JIC&pg=PA65. 
  24. (in fr) Théorie du baguenodier par un clerc de notaire lyonnais (1 ed.). Lyon, France: Aimé Vingtrinier. 1872. https://books.google.com/books?id=EcoBJRekd-sC&pg=PP1. Retrieved 2020-12-17.  [2](2+16+4 pages and 4 pages foldout) (NB. This booklet was published anonymously, but is known to have been authored by Louis Gros.)
  25. (in fr) 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!. Imprimerie Paul Bousrez, Tours.. November 1883.  (NB. N. Claus de Siam is an anagram of Lucas d'Amiens, pseudonym of the author Édouard Lucas.)
  26. de Parville, Henri, ed (1883-12-27). "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." (in fr). Journal des Débats Politiques et Littéraires. Revue des science (Paris, France): 1–2 [2]. ark:/12148/bpt6k462461g. https://gallica.bnf.fr/ark:/12148/bpt6k462461g/f2.item. Retrieved 2020-12-18.  (1 page)
  27. Allardice, R. E.; Fraser, A. Y. (February 1883). "La Tour d'Hanoï" (in en, fr). Proceedings of the Edinburgh Mathematical Society (Edinburgh Mathematical Society) 2 (5): 50–53. doi:10.1017/S0013091500037147. ISSN 0013-0915.  [3] (4 pages)
  28. (in fr) Récréations mathématiques. 3 (Librairie Albert Blanchard reissue ed.). 1979. p. 58.  (The first edition of this book was published post-humously.)
  29. 29.0 29.1 "Loopless Gray Code Enumeration and the Tower of Bucharest". Theoretical Computer Science (Berlin, Germany) 748: 40–54. 2018-11-14. doi:10.1016/j.tcs.2017.11.017. ISSN 0304-3975. https://page.mi.fu-berlin.de/rote/Papers/pdf/Loopless+Gray+code+enumeration+and+the+Tower+of+Bucharest.pdf. Retrieved 2020-12-16.  [4] (15/18/19/24 pages)
  30. "The curious properties of the Gray code and how it can be used to solve puzzles". Scientific American. Mathematical Games 227 (2): 106. August 1972.  (1 page)
  31. "Einige neuere Vorschläge zur mehrfachen Telegraphie: A. Absatzweise vielfache Telegraphie" (in de). Dingler's Polytechnisches Journal (Augsburg, Germany: J. G. Cotta'sche Buchhandlung) 226: 499–507. 1877. http://dingler.culture.hu-berlin.de/article/pj226/ar226125. Retrieved 2020-12-21. "[…] 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 […]". 
  32. "Baudot, Jean Maurice Emile". The Froehlich/Kent Encyclopedia of Telecommunications: Volume 2 - Batteries to Codes-Telecommunications. 2. Marcel Dekker Inc. / CRC Press. 1991-06-21. pp. 31–34. ISBN 0-8247-2901-3. https://books.google.com/books?id=l3Rn_VefKaoC&pg=PA31. Retrieved 2020-12-20. "[…] 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 […]" 
  33. "The Evolution of Character Codes, 1874–1968". 2000-06-20. https://archive.org/details/enf-ascii. "[…] 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. […]"  [5][6]
  34. "Le télégraphe imprimeur Baudot" (in fr). Journal Télégraphique (Berne, Switzerland: Le Bureau International des Administrations Télégraphiques) VIII / #16 (12): 241–253 [249]. 1884-12-25. ark:/12148/bpt6k5725454q. ISSN 2223-1420. https://gallica.bnf.fr/ark:/12148/bpt6k5725454q/f9.item. Retrieved 2020-12-20. 
  35. The Baudôt Printing Telegraph System (2 ed.). London, Bath, Melbourne, New York: Sir Isaac Pitman and Sons, Ltd.. 1920. pp. 43–44. OCLC 778309351. https://books.google.com/books?id=CfQKAQAAIAAJ. Retrieved 2020-12-20.  (vii+184 pages) (NB. A first edition was published in 1913.)
  36. 36.0 36.1 "Codes that Don't Count - Some Printing Telegraph Codes as Products of their Technologies (With Particular Attention to the Teletypesetter)". lemur.com. Mineral Point, Wisconsin, USA. 2010-04-27. http://www.circuitousroot.com/artifice/telegraphy/tty/codes/index.html. 
  37. (in fr) 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. Berne, Switzerland: Bureau Internationale de L'Union Télégraphique. 1909. 
  38. "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". written at Madrid, Spain (in fr). Règlement télégraphique annexé à la convention internationale des télécommunications - protocol finale audit règlement - Madrid, 1932. Berne, Switzerland: Bureau Internationale de L'Union Télégraphique. 1933. pp. 31–40 [33]. http://search.itu.int/history/HistoryDigitalCollectionDocLibrary/4.5.43.fr.201.pdf. Retrieved 2020-12-21.  (1+188 pages) [7]
  39. "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." (in en, fr). Telegraph Regulations Annexed To The International Telecommunication Convention - Final Protocol To The Telegraph Regulations - Madrid 1932. London, UK: General Post Office / His Majesty's Stationery Office. 1933. pp. 32–40 [34]. 43-152-2 / 18693. http://search.itu.int/history/HistoryDigitalCollectionDocLibrary/4.5.43.en.101.pdf. Retrieved 2020-12-21.  (1+2*120+26 pages) [8]
  40. (in de, en) Otto Schäffler (1838-1928). Pionier des Telephons, der Telegraphie und der Lochkarte sowie Erbauer der ersten Wiener Telephonzentrale. Blätter für Technikgeschichte. 41–43 (1979–1981) (1 ed.). Vienna, Austria: Technisches Museum für Industrie und Gewerbe, Forschungsinstitut für Technikgeschichte / Springer-Verlag. 1983-12-01. pp. 81–118. ISBN 3-21181779-4. OCLC 952698275. 
  41. "International Workshop on Managing Requirements Knowledge". written at Vienna, Austria. AFIPS '76: Proceedings of the June 7–10, 1976, national computer conference and exposition June 1976. 1. New York, USA: American Federation of Information Processing Societies, Association for Computing Machinery. 1976-06-07. pp. 15–20. doi:10.1145/1499799.1499803. ISBN 978-1-4503-7917-5. "[…] In 1874, Otto Schäffler|Schaeffler (de) 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, inserted there 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)
  42. "Television by Pulse Code Modulation". Bell System Technical Journal 30 (1): 33–49. 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.)
  43. "The Map Method for Synthesis of Combinational Logic Circuits". Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics 72 (5): 593–599. November 1953. doi:10.1109/TCE.1953.6371932. Paper 53-217. http://philectrosophy.com/documents/The%20Map%20Method%20For%20Synthesis%20of.pdf. Retrieved 2017-04-16.  (NB. Also contains a short review by Samuel H. Caldwell.)
  44. Digital Design: Principles & Practices. New Jersey, USA: Prentice Hall. 1994. pp. 48–49, 222. ISBN 0-13-211459-3.  (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.)
  45. "3.9.2 Maps". Boolean Reasoning – The Logic of Boolean Equations (reissue of 2nd ed.). Mineola, New York, USA: Dover Publications, Inc.. 2012. p. 49. ISBN 978-0-486-42785-0. "[…] Karnaugh's map orders the arguments of the discriminants according to the reflected binary code, also called the Gray code. […]"  (xii+291+3 pages) 1st edition
  46. (in de) Ein Minimisierungsverfahren zur Synthese von Schaltkreisen (Minimisierungsgraphen) (Dissertation). Potsdam, Germany: Technische Hochschule Darmstadt. 1958. D 17. https://books.google.com/books?id=D58TAQAAIAAJ.  (73 pages+app.) [9]
  47. (in de) Taschenbuch der Nachrichtenverarbeitung (2 ed.). Berlin, Germany: Springer-Verlag OHG. 1967. pp. 64, 1034–1035, 1036, 1038. Title No. 1036. "[…] Ü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. […]" 
  48. "Informatik Sammlung Erlangen (ISER)" (in de). Erlangen, Germany: Friedrich-Alexander Universität. 2012-03-13. https://www.rrze.fau.de/wir-ueber-uns/kooperationen/iser.shtml. 
  49. "Informatik Sammlung Erlangen (ISER) – Impressum" (in de). Erlangen, Germany: Friedrich-Alexander Universität. 2012-03-13. http://www.iser.uni-erlangen.de:80/index.php?ort_id=327&tree=0. 
  50. 50.0 50.1 50.2 50.3 50.4 "Balanced Gray Codes". Electronic Journal of Combinatorics 3 (1). 1996. doi:10.37236/1249. https://www.combinatorics.org/ojs/index.php/eljc/article/view/v3i1r25/. 
  51. "Synchronization in Digital Logic Circuits". 2003. http://www.stanford.edu/class/ee183/handouts_spr2003/synchronization_pres.pdf. 
  52. Reflected binary code counter. Nutley, New Jersey, USA: International Telephone and Telegraph Corporation (ITT). 1962-02-06. U.S. Patent 3,020,481. Serial No. 696793. https://patentimages.storage.googleapis.com/a2/e5/21/f5abbb073bf21c/US3020481.pdf. Retrieved 2020-08-06.  (5 pages)
  53. 53.0 53.1 53.2 53.3 "Codes particularly useful for analogue to digital conversions". A short note on useful codes for Fluidic Control Circuits. Cranfield, UK: The College of Aeronautics, Department of Production Engineering. June 1968. pp. 7, 9. CoA Memo 156. https://dspace.lib.cranfield.ac.uk/bitstream/handle/1826/9559/COA_Memo_156_June_1968.pdf. Retrieved 2020-12-15.  (18 pages) (NB. The paper names the Glixon code modified Gray code and misspells Richard W. Hamming's name.)
  54. "Some issues in gray code addressing". Proceedings of the Sixth Great Lakes Symposium on VLSI. IEEE Computer Society. 1996-03-22. pp. 178–181. doi:10.1109/GLSV.1996.497616. ISBN 978-0-8186-7502-7. https://ieeexplore.ieee.org/document/497616. 
  55. 55.0 55.1 The Gray Code. CDMTCS Research Report Series. Centre for Discrete Mathematics and Theoretical Computer Science, University of Auckland, New Zealand. March 2007. CDMTCS-304. https://www.cs.auckland.ac.nz/research/groups/CDMTCS//researchreports/304bob.pdf. Retrieved 2020-05-23.  (25 pages)
  56. Low Power Architecture Design and Compilation Techniques for High-Performance Processors (Report). Advanced Computer Architecture Laboratory. 1994. ACAL-TR-94-01. http://www.scarpaz.com/2100-papers/Power%20Estimation/su94-low%20power%20architecture%20and%20compilation.pdf. Retrieved 2020-12-17. 
  57. "Shifted Gray encoding to reduce instruction memory address bus switching for low-power embedded systems". Journal of Systems Architecture 56 (4–6): 180–190. April–June 2010. doi:10.1016/j.sysarc.2010.03.003. 
  58. "The Aggregate Magic Algorithms: Gray Code Conversion". The Aggregate. Electrical and Computer Engineering Department, College of Engineering, University of Kentucky. 2002. http://aggregate.org/MAGIC/#Gray%20Code%20Conversion. 
  59. Maxfield, Max (2007-06-29). "How to generate Gray Codes for non-power-of-2 sequences". https://www.eetimes.com/how-to-generate-gray-codes-for-non-power-of-2-sequences/. 
  60. (sequence A290772 in the OEIS)
  61. 61.0 61.1 "Generalized Gray Codes with Applications". Proceedings of the National Scientific Council, Republic of China, Part A 22: 841–848. 1998. 
  62. D. G. Wagner, J. West (1991). "Construction of Uniform Gray Codes". Congressus Numerantium 80: 217–223. 
  63. 63.0 63.1 "A simple proof for the existence of exponentially balanced Gray codes". Electronic Journal of Combinatorics 12. 2005. doi:10.37236/1986. 
  64. 64.0 64.1 "Balancing cyclic R-ary Gray codes". Electronic Journal of Combinatorics 14. 2007. doi:10.37236/949. 
  65. "Ariadne: A Minimal Approach to State Continuity". Usenix Security 25. 2016. https://distrinet.cs.kuleuven.be/software/sce/ariadne.html. 
  66. "A Survey of Combinatorial Gray Codes". SIAM Review (Society for Industrial and Applied Mathematics (SIAM)) 39 (4): 605–629. 1997. doi:10.1137/S0036144595295272. Bibcode1997SIAMR..39..605S. http://www4.ncsu.edu/~savage/AVAILABLE_FOR_MAILING/survey.ps. 
  67. 67.0 67.1 "Monotone Gray codes and the middle levels problem". Journal of Combinatorial Theory. Series A 70 (2): 230–248. 1995. doi:10.1016/0097-3165(95)90091-8. ISSN 0097-3165. 
  68. "Long cycles in the middle two levels of the Boolean lattice". Ars Combinatoria (North Carolina State University, Raleigh, North Carolina, USA) 35 (A): 97–108. 1997-01-16. ISSN 0381-7032. http://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=DACA73A3D791549CE05443B7948527EC?doi=10.1.1.39.2249&rep=rep1&type=pdf. Retrieved 2020-05-13.  (15 pages)
  69. 69.0 69.1 "MATH 343 Applied Discrete Math Supplementary Materials". Department of Mathematics, Simon Fraser University. 1999. http://www.math.sfu.ca/~goddyn/Courses/343/supMaterials.pdf. 
  70. "A Fast Algorithm to generate Beckett–Gray codes". Electronic Notes in Discrete Mathematics 29: 571–577. 2007. doi:10.1016/j.endm.2007.07.091. 
  71. "Snake-in-the-Box Codes". written at Ames, Iowa, USA. Digital Design. New York, USA: Wiley-Interscience, John Wiley & Sons, Inc.. January 1971. pp. 206–207. ISBN 0-471-71945-5.  (12+577+1 pages)
  72. 72.0 72.1 Spedding, Norman Bruce, "A position encoder", NZ patent 264738, published 1994-10-28[failed verification]
  73. "The following is a copy of the provisional patent filed on behalf of Industrial Research Limited on 1994-10-28 – NZ Patent 264738". Industrial Research Limited. 1994-10-28. http://www.winzurf.co.nz/Single_Track_Grey_Code_Patent/Single_track_Grey_code_encoder_patent.pdf. 
  74. "Single-Track Gray Codes". IEEE Transactions on Information Theory 42 (5): 1555–1561. September 1996. doi:10.1109/18.532900. http://ieeexplore.ieee.org/iel1/18/11236/00532900.pdf. 
  75. "Single-Track Circuit Codes". IEEE Transactions on Information Theory 47 (6): 2587–2595. September 2001. doi:10.1109/18.945274. http://www.hpl.hp.com/techreports/2000/HPL-2000-81.pdf. Retrieved 2018-01-15. 
  76. "The Structure of Single-Track Gray Codes". IEEE Transactions on Information Theory IT-45 (7): 2383–2396. November 1999. doi:10.1109/18.796379. http://etzion.net.technion.ac.il/files/2016/02/P54.pdf. Retrieved 2018-01-15.  Technical Report CS0937
  77. "Gray-Codes with few tracks (a question of Marco Brandestini)". 1997. http://www.mathematik.uni-bielefeld.de/~sillke/PROBLEMS/gray. 
  78. 78.0 78.1 "Near Optimal Single-Track Gray Codes". IEEE Transactions on Information Theory IT-42 (3): 779–789. May 1996. doi:10.1109/18.490544. http://etzion.net.technion.ac.il/files/2016/02/P36.pdf. Retrieved 2018-04-08. 
  79. "A Survey of Venn Diagrams: Symmetric Diagrams". Electronic Journal of Combinatorics. 2005-06-18. doi:10.37236/26. http://www.combinatorics.org/Surveys/ds5/VennSymmEJC.html. 
  80. Mechatronics. McGraw–Hill Education – Europe. 1999. ISBN 978-0-07-131444-2. http://mechatronics.colostate.edu/. 
  81. Williams, Gary. "'single track gray code' sought for encoding 360 degrees with 9 sensors". https://www.experts-exchange.com/questions/23594359/'single-track-gray-code'-sought-for-encoding-360-degrees-with-9-sensors.html#a22127642. 
  82. Bauer, Florian. "9-Bit Absolute Singletrack Gray Code Rotary Encoder". https://www.thingiverse.com/thing:4590077. 
  83. Krishna (2008-05-11). "Gray code for QAM". http://www.dsprelated.com/showthread/comp.dsp/96917-1.php. 
  84. "Using Gray codes as Location Identifiers" (in en, de). Oberpfaffenhofen, Germany: Institute of Communications and Navigation, German Aerospace Center (DLR). October 2009. http://elib.dlr.de/60489/3/paper.pdf. Retrieved 2020-12-16.  (5/8 pages) [10]
  85. "An Introduction to Ring-Linear Coding Theory". Gröbner Bases, Coding, and Cryptography. Springer Science & Business Media. 2009. p. 220. ISBN 978-3-540-93806-4. https://archive.org/details/grbnerbasescodin00sala. 
  86. Hazewinkel, Michiel, ed (2016). "Kerdock and Preparata codes". Encyclopedia of Mathematics. Springer Science+Business Media. ISBN 978-1-4020-0609-8. https://www.encyclopediaofmath.org/index.php/Kerdock_and_Preparata_codes. 
  87. How to Use Shaft Encoders. Monrovia, California, USA: Datex Corporation. 1965-07-12.  (85 pages)
  88. 88.0 88.1 Analog to digital encoder. New York, USA: Conrac Corporation. 1969-12-30. U.S. Patent 3,487,460A. Serial No. 719026 (397812). https://patentimages.storage.googleapis.com/f0/c0/60/9c3231f7e8ed44/US3487460.pdf. Retrieved 2018-01-21. "[…] 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 3,165,731. 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)
  89. 89.0 89.1 89.2 89.3 89.4 89.5 "2.4. Coding numbers in the binary system". Digital Electronics. Philips Technical Library (PTL) / Macmillan Education (Reprint of 1st English ed.). Eindhoven, Netherlands: The Macmillan Press Ltd. / N. V. Philips' Gloeilampenfabrieken. 1973-06-18. pp. 32, 39, 50–53. doi:10.1007/978-1-349-01417-0. ISBN 978-1-349-01419-4. https://books.google.com/books?id=hlRdDwAAQBAJ. Retrieved 2020-05-11. "[…] 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. […]" [yes|permanent dead link|dead link}}] (270 pages)
  90. 90.0 90.1 90.2 90.3 90.4 "2.4.4.6. Einschrittige Kodes" (in de). Digitale Elektronik in der Meßtechnik und Datenverarbeitung: Theoretische Grundlagen und Schaltungstechnik. Philips Fachbücher. I (improved and extended 5th ed.). Hamburg, Germany: Deutsche Philips GmbH. 1975. pp. 41, 48, 51, 58, 60–61. ISBN 3-87145-272-6.  (xii+327+3 pages)
  91. "…accurate liquid level metering – at ANY DISTANCE!". Petroleum Refiner (Gulf Publishing Company) 33 (9): 368. September 1954. ISSN 0096-6517. https://books.google.com/books?id=B2Q7AAAAMAAJ&q=%22Varec+pulse+code%22. "[…] The complete dispatching operation, gauging, and remote control is integrated into one single unitized system when a "Varec" Pulse Code Telemetering System is installed. […]". 
  92. "Telemetering and supervisory control system having normally continuous telemetering signals". Leeds and Northrup Co.. 1968-08-13. https://patents.google.com/patent/US3397386A/en.  [11]
  93. "Encoder Pulse Format". Installation and Operations Manual for the Model 1900 Micro 4-Wire Transmitter. Cypress, California, USA: Whessoe Varec, Inc.. January 1993. pp. 04-4–04-8. 33-08461. https://www.varec.com/web/wp-content/uploads/2018/05/IOM016_1900.pdf. Retrieved 2020-05-16.  (38 pages) (NB. Position 5 for "Inches" on page 04-8 should read "0111" rather than "1111".)
  94. "2.2.3.3 MSP Level Data Format". Varec Model 1900 – Micro 4-Wire Transmitter (BSAP to Mark / Space Protocol (MSP)) – Application Notes. Emerson Electric. pp. 11–14. https://www.emerson.com/documents/automation/manuals-guides-application-notes-varec-model-1900-protocol-ras-en-133360.pdf. Retrieved 2020-05-16.  (vi+33 pages)
  95. 95.0 95.1 "Arithmetic Operations for Digital Computers Using a Modified Reflected Binary". IRE Transactions on Electronic Computers EC-8 (4): 449–458. December 1959. doi:10.1109/TEC.1959.5222057. ISSN 0367-9950. https://ieeexplore.ieee.org/document/5222057.  (10 pages)
  96. 96.0 96.1 Error Detecting Logic for Digital Computers (1st ed.). New York, USA: McGraw-Hill Book Company. November 1968. pp. 152–164. OCLC 439460. 
  97. 97.0 97.1 97.2 "Chapter 6. Displacement measurement". Instrumentation in Process Control (1 ed.). London, UK: Butterworth & Co (Publishers) Ltd. 1972. pp. 122–123. ISBN 0-408-70293-1. https://books.google.com/books?id=8WEhBQAAQBAJ&pg=PA122. "[…] 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)
  98. "Altitude – MODEC ASCII". AirSport Avionics. 2012-07-26. http://www.airsport-corp.com/modecascii.txt. 
  99. "Aviation Gray Code: Gillham Code Explained". Custom Computer Services (CCS). 2010-12-03. http://www.ccsinfo.com/forum/viewtopic.php?p=140960#140960. 
  100. A cyclic progressive decimal code for simple translation to decimal and analogue outputs (Report). East Kilbride, Glasgow, UK: National Engineering Laboratory. 1964. NEL Report 129.  (17 pages)
  101. "The work on NC at NEL". Proceedings of the Fourteenth International Machine Tool Design and Research Conference, 12–14 September 1973. The Macmillan Press Ltd. 1974. pp. 215–224 [215, 217]. doi:10.1007/978-1-349-01921-2_30. ISBN 978-1-34901921-2. https://link.springer.com/chapter/10.1007/978-1-349-01921-2_30. Retrieved 2020-05-21. 
  102. "Abtastvorrichtung zur digitalen Weg- oder Winkelmessung" (in de). VEB Schiffselektronik Johannes Warnke (de). 1989-09-06. 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.  [12] [13]
  103. 103.00 103.01 103.02 103.03 103.04 103.05 103.06 103.07 103.08 103.09 103.10 "Gray code – Unit distance code". 2005. http://www.ahok.de/en/hoklas-code.html. 
  104. 104.0 104.1 104.2 104.3 104.4 "Gray-Kode – Einschrittiger Abtastkode" (in de). 2005. http://www.ahok.de/dt/hoklas-code.html. 
  105. Some Recently Developed Digital Devices for Encoding the Rotations of Shafts (Technical Note MS21). Farnborough, UK: Royal Aircraft Establishment (RAE). 1958. 
  106. "Digitizer als Analog-Digital-Wandler in der Steuer-, Meß- und Regeltechnik" (in de). Technische Mitteilungen. Relais, elektronische Geräte, Steuerungen (Cologne-Niehl, Germany: Franz Baumgartner (FraBa)) (13): 1–2. May 1963. https://www.posital.com/media/posital_media/documents/TechnischeMitteilung_May1963.pdf. Retrieved 2020-05-21. "[…] 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)
  107. 107.0 107.1 "The Design of a Pneumatic Position Encoder". IFAC Proceedings Volumes (The College of Aeronautics, Cranfield, Bedford, England) 2 (3): 75–88. October 1965. doi:10.1016/S1474-6670(17)68955-9. Chapter 1.5.. https://ac.els-cdn.com/S1474667017689559/1-s2.0-S1474667017689559-main.pdf?_tid=f0c1e48e-f95b-11e7-ad9a-00000aab0f01&acdnat=1515956073_9006e89e176c6a840b5454c38525240b. Retrieved 2018-01-14. [yes|permanent dead link|dead link}}]
  108. "Session 14. Data Processing". Applications of Computers (Conference paper). Atlas – Application of Computers, University of Nottingham 15–19 September 1958. 1958-09-19. http://www.chilton-computing.org.uk/acl/literature/manuals/nottingham/p014.htm. Retrieved 2020-05-25. 
  109. 109.0 109.1 109.2 "Cyclic Decimal Codes for Analogue to Digital Converters". Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics (Bell Telephone Laboratories, Whippany, New Jersey, USA) 75 (2): 120–122. May 1956. doi:10.1109/TCE.1956.6372498. Paper 56-21. ISSN 0097-2452. https://pdfslide.net/documents/cyclic-decimal-codes-for-analogue-to-digital-converters.html. Retrieved 2020-05-18.  (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.)
  110. 110.0 110.1 110.2 110.3 110.4 110.5 110.6 110.7 110.8 Steinbuch, Karl W., ed (1962). written at Karlsruhe, Germany (in de). Taschenbuch der Nachrichtenverarbeitung (1 ed.). Berlin / Göttingen / New York: Springer-Verlag OHG. pp. 71–74, 97, 761–764, 770, 1080–1081. 
  111. 111.0 111.1 111.2 111.3 111.4 111.5 111.6 111.7 111.8 (in de) Taschenbuch der Informatik – Band II – Struktur und Programmierung von EDV-Systemen. Taschenbuch der Nachrichtenverarbeitung. 2 (3 ed.). Berlin, Germany: Springer Verlag. 1974. pp. 98–100. ISBN 3-540-06241-6. 
  112. "Control Systems". International Business Machines Corp. 1960-12-27. pp. Fig. 7, Fig. 8, Fig. 11. https://patentimages.storage.googleapis.com/3d/a8/16/1dc616c432ca95/US2966670.pdf.  (14 pages) (NB. The author called his code 2*-4-2-1 (+9-±7-±3-±1) reflected decimal code.)
  113. "The Use of a Reflected Code in Digital Control Systems". IRE Transactions on Electronic Computers EC-3 (4): 1–6. December 1954. doi:10.1109/IREPGELC.1954.6499244. ISSN 2168-1740.  (6 pages)
  114. "[unknown"]. Transactions (Institute of Measurement and Control) 10–12: 87. 1958. 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.)
  115. "3.2.2 Electromechanical Digitizers". Measurement of Neutron Spectra by Semi-Automatic Scanning of Recoil Protons in Photographic Emulsions. United Kingdom Atomic Energy Authority, Atomic Weapons Research Establishment, UK: U.S. Department of Energy. 1963. pp. 8–10, 19. AWRE Report No. NR 5/63. https://books.google.com/books?id=tD5YAAAAYAAJ&pg=PT4.  [14] (23 pages)
  116. "Electronic Diode Matrix Decoder Circuits". Detroit, Michigan, USA: Burroughs Corporation. 1967-03-14. https://patentimages.storage.googleapis.com/71/6a/f4/044b43b93097e7/US3309695.pdf.  (5 pages) [15]
  117. "Binary-coded decimal signal converter". Detroit, Michigan, USA: Burroughs Corporation. 1970-03-31. https://patentimages.storage.googleapis.com/65/d6/45/f7837c143fa3da/US3504363.pdf.  (7 pages)
  118. "[unknown]". Electrical Design News (Rogers Publishing Company) 12. 1967. ISSN 0012-7515.  [16][17]
  119. "Some Problems Of Angular Rotational Digital Converters". Periodica Polytechnica Electrical Engineering (Department of Electronics Technology, Technical University, Budapest, Hungary) 23 (3–4): 265–270 [266]. 1979-10-05. https://pp.bme.hu/ee/article/view/4838. Retrieved 2020-05-23.  [18] (6 pages) (NB. Shows a 6-digit Watts code.)
  120. "Decimal Representations". quadibloc. 2018. http://www.quadibloc.com/comp/cp0203.htm. 
  121. 121.0 121.1 "Pulse-Count Coder". Nutley, New Jersey, USA: International Telephone and Telegraph Corporation. 1958-07-29. https://patentimages.storage.googleapis.com/14/07/c6/404dafe27dc829/US2845617.pdf.  (5 pages)
  122. 122.0 122.1 "Can You Take Advantage of the Cyclic Binary-Decimal Code?". Control Engineering (Technical Publishing Company, a division of Dun-Donnelley Publishing Corporation, Dun & Bradstreet Corp.) 4 (3): 87–91. March 1957. ISSN 0010-8049. https://books.google.com/books?id=-_5IAQAAIAAJ.  (5 pages)
  123. 123.0 123.1 "2.3 Gebräuchliche Codes in der digitalen Meßtechnik". written at Krefeld / Karlsruhe, Germany (in de). Digitale Meßtechnik: Eine Einführung (2 ed.). Berlin / Heidelberg, Germany: Springer-Verlag. 1971. pp. 10–23 [12–14]. doi:10.1007/978-3-642-80560-8. ISBN:978-3-642-80561-5. ISBN 3-540-05058-2.  (viii+252 pages) 1st edition (NB. Like Kämmerer, the authors describe a 6-bit 20-cyclic Glixon code.)
  124. 124.0 124.1 "II.15. Struktur: Informationsdarstellung im Automaten". written at Jena, Germany (in de). Digitale Automaten – Theorie, Struktur, Technik, Programmieren. Elektronisches Rechnen und Regeln. 5 (1 ed.). Berlin, Germany: Akademie-Verlag GmbH. May 1969. p. 173. License no. 202-100/416/69. Order no. 4666 ES 20 K 3..  (NB. A second edition 1973 exists as well. Like Borucki and Dittmann, 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.)
  125. "Unterbrechungsfreier Schleifencode" (in de). 1995-08-10. http://www.uni-bonn.de/~uzs180/download/mpbcd102.zip.  (NB. The author called this code 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.)
  126. (in de) Digitale Rechenautomaten – Eine Einführung. Sammlung Göschen. 1241/1241a (1 ed.). Berlin, Germany: Walter de Gruyter & Co. / G. J. Göschen'sche Verlagsbuchhandlung (de). 1970-02-01. p. 17. . Archiv-Nr. 7990709.. ISBN 3-11-083160-0. https://books.google.com/books?id=QnqVDwAAQBAJ&pg=PA17. Retrieved 2020-04-13.  (205 pages) (NB. A 2019 reprint of the first edition is available under ISBN:3-11002793-3. A reworked and expanded 4th edition exists as well.)
  127. (in de) Digitale Rechenautomaten – Eine Einführung in die Struktur von Computerhardware. Sammlung Göschen. 2050 (4th reworked ed.). Berlin, Germany: Walter de Gruyter & Co.. 1989. p. 28. ISBN 3-11011700-2.  (320 pages) (NB. The author called this code 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.)

Further reading

External links