Grey Code and Binary Code
Grey Code and Binary Code
From the previous articles, you may have noticed the use of the grey code instead of
the binary code in absolute shaft encoders. This is another type of digital code. It has
the important characteristic that only one bit changes between one code and the next.
Binary code, on the other hand, can have a large number of changes between one code
and the next. See the table below for examples binary code and grey code for the codes
from 0 to 15 for a four bit code. As can be clearly seen in the binary code, when moving
from the number 7 to 8, all four bits change. However, at any change in the grey code
between one number and the next, only one bit changes.
The resolution of the absolute shaft encoder can be calculated as shown in the equation
shown below:
For example, an absolute shaft encoder with 14 bits has an angular resolution of around
0.022 degrees.