Digital Lecture 02 - Number Systems and Codes 2
Digital Lecture 02 - Number Systems and Codes 2
Carl Berry
cberry1@uclan.ac.uk
• Minimum-change code. Only one bit is different between consecutive codes. For example, only the LSB is
different between the Gray codes for 4 (0110) and 5 (0111).
• Mainly used in encoding position of devices such as angular positions of a motor shaft or the linear position
of a pen-recorder
• Position error will be minimum since there is only one bit change between consecutive codes. (Also called
minimum error code.)
GRAY Code
Decimal Binary Gray
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
Encoding Standards