Gray code (Gray Code) is a quasi-weight code. If the lowest bit of the Gray code is n=1, the absolute value of the weight of the Gray code is (2^n)-1, and the sign alternates from left to right. The typical Gray code is a single-step self-complement code with reflection characteristics and cycle characteristics. Its cyclic and single-step characteristics eliminate the possibility of significant errors in random access. Its reflection and self-compensation characteristics make it easy to invert. . Gray code belongs to reliability coding and is an error-mining coding method.
Decimal | Natural binary number | Gray code |
0 | 0000 | 0000 |
1 | 0001 | 0001 |
2 | 0010 | 0011 |
3 | 0011 | 0010 |
4 | 0100 | 0110 |
5 | 0101 | 0111 |
6 | 0110 | 0101 |
7 | 0111 | 0100 |
8 | 1000 | 1100 |
9 | 1001 | 1101 |
10 | 1010 | 1111 |
11 | 1011 | 1110 |
12 | 1100 | 1010 |
13 | 1101 | 1011 |
14 | 1110 | 1001 |
15 | 1111 | 1000 |
Powered by TorCMS (https://github.com/bukun/TorCMS).