Gray code
Appearance
A Gray code is a code assigning to each of a contiguous set of integers, or to each member of a circular list, a word of symbols such that each two adjacent code words differ by one symbol. The canonical Gray code is a binary code for the nonnegative integers as follows:
0 00000000 1 00000001 2 00000011 3 00000010 4 00000110 5 00000111 6 00000101 7 00000100 8 00001100 9 00001101 10 00001111 11 00001110 12 00001010 13 00001011
Gray codes are used in angle-measuring devices to avoid the possibility that, when several bits change in the binary representation of an angle, a misread could result from some of the bits changing.