Gray code is a one step code, i.e. only one single bit changes from one position to the next. The transfer from one position can be slightly shifted by imprecise scanning, but it is not possible that this would cause incorrect position values to be given.
Another advantage of the gray code is the easy reversibility. The counting direction can easily be changed by inverting the most significant bit. Therefore it is possible to change the counter direction just by using the complement-entry.
The gray code has to be converted into a binary code, because the single bits of the gray code don¡¯t have a determined value. This is done by a code converter, that consists of a cascaded of XORs.
Transition from 255 to 256 - only 1 bit changes in Gray Code, while 9 bits change in Binary Code
Natural Binary |
Grey Code | |
255 |
011111111 |
010000000 |
256 |
100000000 |
11000000 |
Previous£º Conventional Optical Absolute