Gray code: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>DreamRimmer bot II
m Standardise list-defined references format (bot)
imported>GreenC bot
Reformat 1 archive link. Wayback Medic 2.5 per WP:USURPURL and JUDI batch #29ab
 
Line 1,197: Line 1,197:
<ref name="Foss_1954_1">{{cite web |title=Control Systems |author-first=Frederic A. |author-last=Foss |date=1960-12-27<!-- gdate --> |orig-date=1954-12-17<!-- fdate --> |id={{US patent|2966670A}}. Serial No. 475945 |publisher=[[International Business Machines Corp]] |pages=Fig. 7, Fig. 8, Fig. 11 |no-pp=yes |url=https://patentimages.storage.googleapis.com/3d/a8/16/1dc616c432ca95/US2966670.pdf |access-date=2020-08-05 |url-status=live |archive-url=https://web.archive.org/web/20200621145238/https://patentimages.storage.googleapis.com/3d/a8/16/1dc616c432ca95/US2966670.pdf |archive-date=2020-06-21}} (14 pages) (NB. The author called his code 2*-4-2-1 (+9-±7-±3-±1) reflected<!-- -coded --> decimal code.)</ref>
<ref name="Foss_1954_1">{{cite web |title=Control Systems |author-first=Frederic A. |author-last=Foss |date=1960-12-27<!-- gdate --> |orig-date=1954-12-17<!-- fdate --> |id={{US patent|2966670A}}. Serial No. 475945 |publisher=[[International Business Machines Corp]] |pages=Fig. 7, Fig. 8, Fig. 11 |no-pp=yes |url=https://patentimages.storage.googleapis.com/3d/a8/16/1dc616c432ca95/US2966670.pdf |access-date=2020-08-05 |url-status=live |archive-url=https://web.archive.org/web/20200621145238/https://patentimages.storage.googleapis.com/3d/a8/16/1dc616c432ca95/US2966670.pdf |archive-date=2020-06-21}} (14 pages) (NB. The author called his code 2*-4-2-1 (+9-±7-±3-±1) reflected<!-- -coded --> decimal code.)</ref>
<ref name="Foss_1954_2">{{cite journal |title=The Use of a Reflected Code in Digital Control Systems |author-first=Frederic A. |author-last=Foss |date=December 1954 |journal=[[IRE Transactions on Electronic Computers]] |volume=EC-3 |issue=4 |issn=2168-1740 |doi=10.1109/IREPGELC.1954.6499244 |pages=1–6}} (6 pages)</ref>
<ref name="Foss_1954_2">{{cite journal |title=The Use of a Reflected Code in Digital Control Systems |author-first=Frederic A. |author-last=Foss |date=December 1954 |journal=[[IRE Transactions on Electronic Computers]] |volume=EC-3 |issue=4 |issn=2168-1740 |doi=10.1109/IREPGELC.1954.6499244 |pages=1–6}} (6 pages)</ref>
<ref name="O'Brien_1955">{{cite journal |author-first=Joseph A. |author-last=O'Brien |title=Cyclic Decimal Codes for Analogue to Digital Converters |journal=[[Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics]] |location=Bell Telephone Laboratories, Whippany, New Jersey, USA |volume=75 |issue=2 |date=May 1956 |orig-date=1955-11-15, 1955-06-23 |issn=0097-2452 |doi=10.1109/TCE.1956.6372498 |id=Paper 56-21 |s2cid=51657314 |pages=120–122 |url=https://pdfslide.net/documents/cyclic-decimal-codes-for-analogue-to-digital-converters.html |access-date=2020-05-18 |archive-date=2020-05-18  |archive-url=https://web.archive.org/web/20200518075301/https://pdfslide.net/documents/cyclic-decimal-codes-for-analogue-to-digital-converters.html |url-status=dead }} (3 pages) (NB. This paper was prepared for presentation at the AIEE Winter General Meeting, New York, USA, 1956-01-30 to 1956-02-03.)</ref>
<ref name="O'Brien_1955">{{cite journal |author-first=Joseph A. |author-last=O'Brien |title=Cyclic Decimal Codes for Analogue to Digital Converters |journal=[[Transactions of the American Institute of Electrical Engineers, Part I: Communication and Electronics]] |location=Bell Telephone Laboratories, Whippany, New Jersey, USA |volume=75 |issue=2 |date=May 1956 |orig-date=1955-11-15, 1955-06-23 |issn=0097-2452 |doi=10.1109/TCE.1956.6372498 |id=Paper 56-21 |s2cid=51657314 |pages=120–122 |url=https://pdfslide.net/documents/cyclic-decimal-codes-for-analogue-to-digital-converters.html |access-date=2020-05-18 |archive-date=2020-05-18  |archive-url=https://web.archive.org/web/20200518075301/https://pdfslide.net/documents/cyclic-decimal-codes-for-analogue-to-digital-converters.html |url-status=usurped }} (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.)</ref>
<ref name="Tompkins_1956">{{cite journal |author-first=Howard E. |author-last=Tompkins |title=Unit-Distance Binary-Decimal Codes for Two-Track Commutation |date=September 1956 |orig-date=1956-07-16 |journal=[[IRE Transactions on Electronic Computers]] |issn=0367-9950 |volume=EC-5 |issue=3 |doi=10.1109/TEC.1956.5219934 |series=Correspondence |location=[[Moore School of Electrical Engineering]], [[University of Pennsylvania]], Philadelphia, Pennsylvania, USA |page=139 |url=https://dokumen.tips/documents/unit-distance-binary-decimal-codes-for-two-track-commutation.html |access-date=2020-05-18 |archive-date=2020-05-18  |archive-url=https://web.archive.org/web/20200518083051/https://dokumen.tips/documents/unit-distance-binary-decimal-codes-for-two-track-commutation.html |url-status=dead }} (1 page)</ref>
<ref name="Tompkins_1956">{{cite journal |author-first=Howard E. |author-last=Tompkins |title=Unit-Distance Binary-Decimal Codes for Two-Track Commutation |date=September 1956 |orig-date=1956-07-16 |journal=[[IRE Transactions on Electronic Computers]] |issn=0367-9950 |volume=EC-5 |issue=3 |doi=10.1109/TEC.1956.5219934 |series=Correspondence |location=[[Moore School of Electrical Engineering]], [[University of Pennsylvania]], Philadelphia, Pennsylvania, USA |page=139 |url=https://dokumen.tips/documents/unit-distance-binary-decimal-codes-for-two-track-commutation.html |access-date=2020-05-18 |archive-date=2020-05-18  |archive-url=https://web.archive.org/web/20200518083051/https://dokumen.tips/documents/unit-distance-binary-decimal-codes-for-two-track-commutation.html |url-status=dead }} (1 page)</ref>
<ref name="Glixon_1957">{{cite journal |date=March 1957 |title=Can You Take Advantage of the Cyclic Binary-Decimal Code? |author-first=Harry Robert |author-last=Glixon |journal=[[Control Engineering (magazine)|Control Engineering]] |issn=0010-8049 |publisher=[[Technical Publishing Company]], a division of Dun-Donnelley Publishing Corporation, [[Dun & Bradstreet Corp.]] |volume=4 |number=3 |pages=<!-- 3, -->87–91 |url=https://books.google.com/books?id=-_5IAQAAIAAJ}}<!-- https://web.archive.org/web/20180115014809/https://donmooreswartales.com/2010/05/12/harry-glixon/ https://books.google.com/books?id=-_5IAQAAIAAJ&q=cyclic+binary+code --> (5 pages)</ref>
<ref name="Glixon_1957">{{cite journal |date=March 1957 |title=Can You Take Advantage of the Cyclic Binary-Decimal Code? |author-first=Harry Robert |author-last=Glixon |journal=[[Control Engineering (magazine)|Control Engineering]] |issn=0010-8049 |publisher=[[Technical Publishing Company]], a division of Dun-Donnelley Publishing Corporation, [[Dun & Bradstreet Corp.]] |volume=4 |number=3 |pages=<!-- 3, -->87–91 |url=https://books.google.com/books?id=-_5IAQAAIAAJ}}<!-- https://web.archive.org/web/20180115014809/https://donmooreswartales.com/2010/05/12/harry-glixon/ https://books.google.com/books?id=-_5IAQAAIAAJ&q=cyclic+binary+code --> (5 pages)</ref>

Latest revision as of 17:08, 27 November 2025

Template:Short description Template:Use dmy dates Template:Gray code by bit width

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

For example, the representation of the decimal value "1" in binary would normally be "<templatestyles src="Mono/styles.css" />001", and "2" would be "<templatestyles src="Mono/styles.css" />010". In Gray code, these values are represented as "<templatestyles src="Mono/styles.css" />001" and "<templatestyles src="Mono/styles.css" />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 <templatestyles src="Mono/styles.css" />011
4 <templatestyles src="Mono/styles.css" />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 <templatestyles src="Mono/styles.css" />011 — <templatestyles src="Mono/styles.css" />001 — <templatestyles src="Mono/styles.css" />101 — <templatestyles src="Mono/styles.css" />100. When the switches appear to be in position <templatestyles src="Mono/styles.css" />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.

Script error: No such module "anchor".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

File:Reflected binary Gray 2632058.png
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".

File:Gray code tesseract.svg
Visualized as a traversal of vertices of a tesseract
File:Gray code number line arcs.svg
Gray code along the number line

In the standard encoding of the Gray code the least significant bit follows a repetitive pattern of 2 on, 2 off (... <templatestyles src="Mono/styles.css" />11001100 ...); the next digit a pattern of 4 on, 4 off; the i-th least significant bit a pattern of 2i on 2i off. The most significant digit is an exception to this: for an n-bit Gray code, the most significant digit follows the pattern 2n−1 on, 2n−1 off, which is the same (cyclic) sequence of values as for the second-most significant digit, but shifted forwards 2n−2 places. The four-bit version of this is shown below:

Decimal Binary Gray
0 <templatestyles src="Mono/styles.css" />0000 <templatestyles src="Mono/styles.css" />0000
1 <templatestyles src="Mono/styles.css" />0001 <templatestyles src="Mono/styles.css" />0001
2 <templatestyles src="Mono/styles.css" />0010 <templatestyles src="Mono/styles.css" />0011
3 <templatestyles src="Mono/styles.css" />0011 <templatestyles src="Mono/styles.css" />0010
4 <templatestyles src="Mono/styles.css" />0100 <templatestyles src="Mono/styles.css" />0110
5 <templatestyles src="Mono/styles.css" />0101 <templatestyles src="Mono/styles.css" />0111
6 <templatestyles src="Mono/styles.css" />0110 <templatestyles src="Mono/styles.css" />0101
7 <templatestyles src="Mono/styles.css" />0111 <templatestyles src="Mono/styles.css" />0100
8 <templatestyles src="Mono/styles.css" />1000 <templatestyles src="Mono/styles.css" />1100
9 <templatestyles src="Mono/styles.css" />1001 <templatestyles src="Mono/styles.css" />1101
10 <templatestyles src="Mono/styles.css" />1010 <templatestyles src="Mono/styles.css" />1111
11 <templatestyles src="Mono/styles.css" />1011 <templatestyles src="Mono/styles.css" />1110
12 <templatestyles src="Mono/styles.css" />1100 <templatestyles src="Mono/styles.css" />1010
13 <templatestyles src="Mono/styles.css" />1101 <templatestyles src="Mono/styles.css" />1011
14 <templatestyles src="Mono/styles.css" />1110 <templatestyles src="Mono/styles.css" />1001
15 <templatestyles src="Mono/styles.css" />1111 <templatestyles src="Mono/styles.css" />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

Script error: No such module "anchor".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]

Script error: No such module "anchor".About the same time, the German-Austrian Template:Ill[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]

File:US02632058 Gray.png
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

File:Encoder Disc (3-Bit).svg
Rotary encoder for angle-measuring devices marked in 3-bit binary-reflected Gray code (BRGC)
File:Gray code rotary encoder 13-track opened.jpg
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

Template:Main article

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

Cycling through states with minimal effort

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

A balanced Gray code can be constructed,[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 executable 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

File:Binary-reflected Gray code construction.svg
The first few steps of the reflect-and-prefix method.
File:Gray code permutation matrix 16.svg
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 <templatestyles src="Mono/styles.css" />0, prefixing the entries in the reflected list with a binary <templatestyles src="Mono/styles.css" />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: <templatestyles src="Mono/styles.css" />00, <templatestyles src="Mono/styles.css" />01, <templatestyles src="Mono/styles.css" />11, <templatestyles src="Mono/styles.css" />10  
Reflected:   <templatestyles src="Mono/styles.css" />10, <templatestyles src="Mono/styles.css" />11, <templatestyles src="Mono/styles.css" />01, <templatestyles src="Mono/styles.css" />00
Prefix old entries with <templatestyles src="Mono/styles.css" />0: <templatestyles src="Mono/styles.css" />000, <templatestyles src="Mono/styles.css" />001, <templatestyles src="Mono/styles.css" />011, <templatestyles src="Mono/styles.css" />010,  
Prefix new entries with <templatestyles src="Mono/styles.css" />1:   <templatestyles src="Mono/styles.css" />110, <templatestyles src="Mono/styles.css" />111, <templatestyles src="Mono/styles.css" />101, <templatestyles src="Mono/styles.css" />100
Concatenated: <templatestyles src="Mono/styles.css" />000, <templatestyles src="Mono/styles.css" />001, <templatestyles src="Mono/styles.css" />011, <templatestyles src="Mono/styles.css" />010, <templatestyles src="Mono/styles.css" />110, <templatestyles src="Mono/styles.css" />111, <templatestyles src="Mono/styles.css" />101, <templatestyles src="Mono/styles.css" />100

The one-bit Gray code is G1 = (<templatestyles src="Mono/styles.css" />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 nn2. Prepending a <templatestyles src="Mono/styles.css" />0 bit leaves the order of the code words unchanged, prepending a <templatestyles src="Mono/styles.css" />1 bit reverses the order of the code words. If the bits at position i of codewords are inverted, the order of neighbouring blocks of 2i codewords is reversed. For example, if bit 0 is inverted in a 3 bit codeword sequence, the order of two neighbouring codewords is reversed

Template:Block indent

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

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

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

A similar method can be used to perform the reverse translation, but the computation of each bit depends on the computed value of the next higher bit so it cannot be performed in parallel. Assuming gi is the ith Gray-coded bit (g0 being the most significant bit), and bi is the ith binary-coded bit (b0 being the most-significant bit), the reverse translation can be given recursively: b0=g0, and bi=gibi1. 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 code0=0, and at step i>0 find the bit position of the least significant <templatestyles src="Mono/styles.css" />1 in the binary representation of i and flip the bit at that position in the previous code codei1 to get the next code codei. 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 2nScript error: No such module "Check for unknown parameters"., 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 2nScript error: No such module "Check for unknown parameters". that 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 (δk); the transition counts (spectrum) of G are the collection of integers defined by

λk=|{jRn:δj=k}|, for kn

A Gray code is uniform or uniformly balanced if its transition counts are all equal, in which case we have λk=Rnn for all k. Clearly, when R=2, 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 22n2n or 22n2n.[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] Template:Block indent Template:Block indent Template:Block indent Template:Block indent 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] Template:Block indent Template:Block indent Template:Block indent Template:Block indent Template:Block indent

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 G given an n-digit Gray code G in such a way that the balanced property is preserved. To do this, we consider partitions of G=g0,,g2n1 into an even number L of non-empty blocks of the form

{g0},{g1,,gk2},{gk2+1,,gk3},,{gkL2+1,,g2},{g1}

where k1=0, kL1=2, and kL1(mod2n)). This partition induces an (n+2)-digit Gray code given by

Template:Block indent

If we define the transition multiplicities

mi=|{j:δkj=i,1jL}|

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 λ'i is

λ'i={4λi2mi,if 0i<nL, otherwise 

The delicate part of this construction is to find an adequate partitioning of a balanced n-digit Gray code such that the code induced by it remains balanced, but for this only the transition multiplicities matter; joining two consecutive blocks over a digit i transition and splitting another block at another digit i transition produces a different Gray code with exactly the same transition spectrum λ'i, so one may for example[63] designate the first mi transitions at digit i as those that fall between two blocks. Uniform codes can be found when R0(mod4) and Rn0(modn), 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 Qn=(Vn,En) into levels of vertices that have equal weight, i.e.

Vn(i)={vVn:v has weight i}

for 0in. These levels satisfy |Vn(i)|=(ni). Let Qn(i) be the subgraph of Qn induced by Vn(i)Vn(i+1), and let En(i) be the edges in Qn(i). A monotonic Gray code is then a Hamiltonian path in Qn such that whenever δ1En(i) comes before δ2En(j) in the path, then ij.

An elegant construction of monotonic n-digit Gray codes for any n is based on the idea of recursively building subpaths Pn,j of length 2(nj) having edges in En(j).[67] We define P1,0=(0,1), Pn,j= whenever j<0 or jn, and

Pn+1,j=1Pn,j1πn,0Pn,j

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

Gn(1)=Pn,0Pn,1RPn,2Pn,3R and Gn(2)=Pn,0RPn,1Pn,2RPn,3

The choice of πn which ensures that these codes are indeed Gray codes turns out to be πn=E1(πn12). The first few values of Pn,j are shown in the table below.

Subpaths in the Savage–Winkler algorithm
Pn,j j = 0 j = 1 j = 2 j = 3
n = 1 <templatestyles src="Mono/styles.css" />0, 1
n = 2 <templatestyles src="Mono/styles.css" />00, 01 <templatestyles src="Mono/styles.css" />10, 11
n = 3 <templatestyles src="Mono/styles.css" />000, 001 <templatestyles src="Mono/styles.css" />100, 110, 010, 011 <templatestyles src="Mono/styles.css" />101, 111
n = 4 <templatestyles src="Mono/styles.css" />0000, 0001 <templatestyles src="Mono/styles.css" />1000, 1100, 0100, 0110, 0010, 0011 <templatestyles src="Mono/styles.css" />1010, 1011, 1001, 1101, 0101, 0111 <templatestyles src="Mono/styles.css" />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 Q2n+1(n) is vertex-transitive (that is, its automorphism group is transitive, so that each vertex has the same "local environment" and cannot be differentiated from the others, since we can relabel the coordinates as well as the binary digits to obtain an automorphism) and the problem of finding a Hamiltonian path in this subgraph is called the "middle-levels problem", which can provide insights into the more general conjecture. The question has been answered affirmatively for n15, and the preceding construction for monotonic codes ensures a Hamiltonian path of length at least 0.839Template:Px2N, 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 Script error: No such module "val". solutions for the case n = 7 have been found.[70]

Snake-in-the-box codes

Template:Snakes and coils in the box.svg Snake-in-the-box codes, or snakes, are the sequences of nodes of induced paths in an n-dimensional hypercube graph, and coil-in-the-box codes,[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]

File:Animated Graycode.gif
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 <templatestyles src="Mono/styles.css" />0 or <templatestyles src="Mono/styles.css" />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
<templatestyles src="Mono/styles.css" />10000 72° <templatestyles src="Mono/styles.css" />01000 144° <templatestyles src="Mono/styles.css" />00100 216° <templatestyles src="Mono/styles.css" />00010 288° <templatestyles src="Mono/styles.css" />00001
12° <templatestyles src="Mono/styles.css" />10100 84° <templatestyles src="Mono/styles.css" />01010 156° <templatestyles src="Mono/styles.css" />00101 228° <templatestyles src="Mono/styles.css" />10010 300° <templatestyles src="Mono/styles.css" />01001
24° <templatestyles src="Mono/styles.css" />11100 96° <templatestyles src="Mono/styles.css" />01110 168° <templatestyles src="Mono/styles.css" />00111 240° <templatestyles src="Mono/styles.css" />10011 312° <templatestyles src="Mono/styles.css" />11001
36° <templatestyles src="Mono/styles.css" />11110 108° <templatestyles src="Mono/styles.css" />01111 180° <templatestyles src="Mono/styles.css" />10111 252° <templatestyles src="Mono/styles.css" />11011 324° <templatestyles src="Mono/styles.css" />11101
48° <templatestyles src="Mono/styles.css" />11010 120° <templatestyles src="Mono/styles.css" />01101 192° <templatestyles src="Mono/styles.css" />10110 264° <templatestyles src="Mono/styles.css" />01011 336° <templatestyles src="Mono/styles.css" />10101
60° <templatestyles src="Mono/styles.css" />11000 132° <templatestyles src="Mono/styles.css" />01100 204° <templatestyles src="Mono/styles.css" />00110 276° <templatestyles src="Mono/styles.css" />00011 348° <templatestyles src="Mono/styles.css" />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]

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

File:16QAM Gray Coded.svg
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 ↔ <templatestyles src="Mono/styles.css" />00, 1 ↔ <templatestyles src="Mono/styles.css" />01, 2 ↔ <templatestyles src="Mono/styles.css" />11, 3 ↔ <templatestyles src="Mono/styles.css" />10 } establishes an isometry between the metric space over the finite field 22 with the metric given by the Hamming distance and the metric space over the finite ring 4 (the usual modular arithmetic) with the metric given by the Lee distance. The mapping is suitably extended to an isometry of the Hamming spaces 22m and 4m. Its importance lies in establishing a correspondence between various "good" but not necessarily linear codes as Gray-map images in 22 of ring-linear codes from 4.[85][86]

Related codes

Template:Excessive citations

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
Script error: No such module "anchor".Gray BCD 4 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 0–3 4 (3[nb 8]) No (2, 4, 8, 16) No [110][111]
3 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1
2 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1
Script error: No such module "anchor".Paul 4 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 1–3 4 (3[nb 8]) No 2, 10 No [125]
3 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1
2 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1
Glixon 4 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 0–3 4 No 2, 4, 8, 10 (shifted +1) [122][110][111][123][124][nb 5]
3 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0
2 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
Tompkins I 4 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 0–4 2 No 2, 4, 10 Yes [2][110][111]
3 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0
2 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
O'Brien I (Watts) 4 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 0–3 4 9[103][104][nb 9] 2, 4, 10 Yes [109][110][111][nb 5]
3 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
2 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0
Petherick (RAE) 4 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 1–3 3 9[103][104][nb 9] 2, 10 Yes [17][107][nb 4]
3 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1
2 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1
O'Brien II 4 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 1–3 3 9[89][103][104][nb 9] 2, 10 Yes [109][110][111][nb 4]
3 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
2 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0
1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1
Script error: No such module "anchor".Susskind 4 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 1–4 3 9[nb 9] 2, 10 Yes [4]
3 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
2 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0
1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1
Script error: No such module "anchor".Klar 4 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 0–4 4 (3[nb 8]) 9[nb 9] 2, 10 Yes [126][127]
3 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
2 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0
Tompkins II 4 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 1–3 2 9[nb 10] 2, 10 Yes [2][110][111]
3 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0
2 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1
1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0
Excess-3 Gray 4 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 1–4 4 9[103][104][nb 9] 2, 10 Yes [6][103]
3 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0
2 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1
1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />1 <templatestyles src="Mono/styles.css" />0 <templatestyles src="Mono/styles.css" />0

See also

Notes

<templatestyles src="Reflist/styles.css" />

  1. a b c 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.Template:Citeref
  2. Sequence 0, 1, 0, 2, 0, 1, 0, 3, … (sequence A007814 in the OEIS).
  3. a b c There are several Gray code variants which are called "modified" of some sort: The Glixon code is sometimes called modified Gray code.Template:Citeref The Lucal code is also called modified reflected binary code (MRB).Template:Citeref The O'Brien code I or Watts code is sometimes referred to as reflected binary modified Gray code.Template:Citeref
  4. a b c d By interchanging and inverting three bit rows, the O'Brien code II and the Petherick code can be transferred into each other.
  5. a b c d 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. a b c 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. a b c d e f For O'Brien codes I and II and Petherick, Susskind, Klar as well as Excess-3 Gray codes, a 9s complement can be derived by inverting the most-significant (fourth) binary digit.
  10. For Tompkins code II, a 9s complement can be derived by inverting the first three digits and swapping the two middle binary digits.

Script error: No such module "Check for unknown parameters".

References

  1. Script error: No such module "citation/CS1".
  2. a b c d Script error: No such module "Citation/CS1". (1 page)
  3. a b Script error: No such module "Citation/CS1". (2 pages)
  4. a b Script error: No such module "citation/CS1". (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. a b Script error: No such module "citation/CS1". (xviii+506 pages) (NB. The French 1967 original book was named "Techniques Booléennes et Calculateurs Arithmétiques", published by Template:Ill.)
  6. a b c d e f Script error: No such module "citation/CS1". (NB. Supersedes MIL-HDBK-231(AS) (1970-07-01).)
  7. a b c Script error: No such module "citation/CS1". (28 pages)
  8. a b Script error: No such module "Citation/CS1". (6 pages)
  9. a b c Script error: No such module "citation/CS1". [1] (4 pages)
  10. a b c d e Script error: No such module "Citation/CS1".
  11. a b c d e f g h i Script error: No such module "citation/CS1". (912 pages)
  12. a b Script error: No such module "citation/CS1". (13 pages)
  13. a b Script error: No such module "citation/CS1".
  14. Script error: No such module "citation/CS1". (8 pages)
  15. a b Script error: No such module "citation/CS1". (10 pages)
  16. Script error: No such module "citation/CS1". (8 pages)
  17. a b c Script error: No such module "citation/CS1". (4 pages) (NB. Sometimes referred to as A Cyclic-Coded Binary-Coded-Decimal System of Representing Numbers.)
  18. a b Script error: No such module "citation/CS1". (39 pages)
  19. a b Script error: No such module "citation/CS1". (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. Script error: No such module "citation/CS1". (12 pages)
  21. Script error: No such module "Citation/CS1". (3 pages)
  22. Script error: No such module "citation/CS1". (2+448+2 pages)
  23. Script error: No such module "citation/CS1".
  24. Script error: No such module "citation/CS1". [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. Script error: No such module "citation/CS1". (NB. N. Claus de Siam is an anagram of Lucas d'Amiens, pseudonym of the author Édouard Lucas.)
  26. Script error: No such module "Citation/CS1". (1 page)
  27. Script error: No such module "Citation/CS1". [3] (4 pages)
  28. Script error: No such module "citation/CS1". (The first edition of this book was published post-humously.)
  29. a b Script error: No such module "Citation/CS1". [4] (15/18/19/24 pages)
  30. Script error: No such module "Citation/CS1". (1 page)
  31. Script error: No such module "Citation/CS1".
  32. Script error: No such module "citation/CS1".
  33. Script error: No such module "citation/CS1". [5][6]
  34. Script error: No such module "Citation/CS1".
  35. Script error: No such module "citation/CS1". (vii+184 pages) (NB. A first edition was published in 1913.)
  36. a b Script error: No such module "citation/CS1".
  37. Script error: No such module "citation/CS1".
  38. Script error: No such module "citation/CS1". (1+188 pages) [7]
  39. Script error: No such module "citation/CS1". (1+2*120+26 pages) [8]
  40. Script error: No such module "citation/CS1".
  41. Script error: No such module "citation/CS1". (6 pages)
  42. Script error: No such module "Citation/CS1". (NB. Presented orally before the I.R.E. National Convention, New York City, March 1949.)
  43. Script error: No such module "Citation/CS1". (NB. Also contains a short review by Samuel H. Caldwell.)
  44. Script error: No such module "citation/CS1". (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. Script error: No such module "citation/CS1". (xii+291+3 pages) 1st edition
  46. Script error: No such module "citation/CS1". (73 pages+app.) [9]
  47. Script error: No such module "citation/CS1".
  48. Script error: No such module "citation/CS1".
  49. Script error: No such module "citation/CS1".
  50. a b c d e Script error: No such module "Citation/CS1".
  51. Script error: No such module "citation/CS1".
  52. Script error: No such module "citation/CS1". (5 pages)
  53. a b c d Script error: No such module "citation/CS1". (18 pages) (NB. The paper names the Glixon code modified Gray code and misspells Richard W. Hamming's name.)
  54. Script error: No such module "citation/CS1".
  55. a b Script error: No such module "citation/CS1". (25 pages)
  56. Script error: No such module "citation/CS1".
  57. Script error: No such module "Citation/CS1".
  58. Script error: No such module "citation/CS1".
  59. Script error: No such module "citation/CS1".
  60. (sequence A290772 in the OEIS)
  61. a b Script error: No such module "Citation/CS1".
  62. Script error: No such module "Citation/CS1".
  63. a b Script error: No such module "Citation/CS1".
  64. a b Script error: No such module "Citation/CS1".
  65. Script error: No such module "Citation/CS1".
  66. Script error: No such module "Citation/CS1".
  67. a b Script error: No such module "Citation/CS1".
  68. Script error: No such module "Citation/CS1". (15 pages)
  69. a b Script error: No such module "citation/CS1".
  70. Script error: No such module "Citation/CS1".
  71. Script error: No such module "citation/CS1". (12+577+1 pages)
  72. a b <templatestyles src="Citation/styles.css"/>Template:Citation/make link, Spedding, Norman Bruce, "A position encoder", published Script error: No such module "auto date formatter". Script error: No such module "Check for unknown parameters".Script error: No such module "Unsubst".
  73. Script error: No such module "citation/CS1".
  74. Script error: No such module "Citation/CS1".
  75. Script error: No such module "Citation/CS1".
  76. Script error: No such module "Citation/CS1". Technical Report CS0937 Template:Webarchive
  77. Script error: No such module "citation/CS1".
  78. a b Script error: No such module "Citation/CS1".
  79. Script error: No such module "Citation/CS1".
  80. Script error: No such module "citation/CS1".
  81. Script error: No such module "citation/CS1".
  82. Script error: No such module "citation/CS1".
  83. Script error: No such module "citation/CS1".
  84. Script error: No such module "citation/CS1". (5/8 pages) [10]
    • Script error: No such module "citation/CS1".
  85. Script error: No such module "citation/CS1".
  86. Script error: No such module "citation/CS1".
  87. Script error: No such module "citation/CS1". (85 pages)
  88. a b Script error: No such module "citation/CS1". (11 pages)
  89. a b c d e f Script error: No such module "citation/CS1".
  90. a b c d e Script error: No such module "citation/CS1". (xii+327+3 pages)
  91. Script error: No such module "Citation/CS1".
  92. Script error: No such module "citation/CS1". [11]
  93. Script error: No such module "citation/CS1". (38 pages) (NB. Position 5 for "Inches" on page 04-8 should read "0111" rather than "1111".)
  94. Script error: No such module "citation/CS1". (vi+33 pages)
  95. a b Script error: No such module "Citation/CS1". (10 pages)
  96. a b Script error: No such module "citation/CS1".
  97. a b c Script error: No such module "citation/CS1". (12+367+5 pages)
  98. Script error: No such module "citation/CS1".
  99. Script error: No such module "citation/CS1".
  100. Script error: No such module "citation/CS1". (17 pages)
  101. Script error: No such module "citation/CS1".
  102. Script error: No such module "citation/CS1". [12] [13]
  103. a b c d e f g h i j k Script error: No such module "citation/CS1".
  104. a b c d e Script error: No such module "citation/CS1".
  105. Script error: No such module "citation/CS1".
  106. Template:Cite periodical (4 pages)
  107. a b Script error: No such module "Citation/CS1".
  108. Script error: No such module "citation/CS1".
  109. a b c Script error: No such module "Citation/CS1". (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. a b c d e f g h i Script error: No such module "citation/CS1".
  111. a b c d e f g h i Script error: No such module "citation/CS1".
  112. Script error: No such module "citation/CS1". (14 pages) (NB. The author called his code 2*-4-2-1 (+9-±7-±3-±1) reflected decimal code.)
  113. Script error: No such module "Citation/CS1". (6 pages)
  114. Script error: No such module "Citation/CS1". (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. Script error: No such module "citation/CS1". [14] (23 pages)
  116. Script error: No such module "citation/CS1". (5 pages) [15]
  117. Script error: No such module "citation/CS1". (7 pages)
  118. Script error: No such module "Citation/CS1". [16][17]
  119. Script error: No such module "Citation/CS1". [18] (6 pages) (NB. Shows a 6-digit Watts code.)
  120. Script error: No such module "citation/CS1".
  121. a b Script error: No such module "citation/CS1". (5 pages)
  122. a b Script error: No such module "Citation/CS1". (5 pages)
  123. a b Script error: No such module "citation/CS1". (viii+252 pages) 1st edition (NB. Like Template:Citeref, the authors describe a 6-bit 20-cyclic Glixon code.)
  124. a b Script error: No such module "citation/CS1". (NB. A second edition 1973 exists as well. Like Template:Citeref, 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. Script error: No such module "citation/CS1".Template:Cbignore (NB. The author called this code Script error: No such module "Lang". (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. Script error: No such module "citation/CS1". (205 pages) (NB. A 2019 reprint of the first edition is available under Template:ISBN. A reworked and expanded Template:Citeref exists as well.)
  127. Script error: No such module "citation/CS1". (320 pages) (NB. The author called this code Script error: No such module "Lang". (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

<templatestyles src="Refbegin/styles.css" />

  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "Citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1".
  • Script error: No such module "citation/CS1". Part 2 Part 3
  • Script error: No such module "citation/CS1". (7 pages)
  • Script error: No such module "Citation/CS1". (5 pages)
  • Script error: No such module "Citation/CS1". (2 pages)
  • Script error: No such module "Citation/CS1".

External links

<templatestyles src="Refbegin/styles.css" />