Define Gray Code - bcd to decimal conversion?
The Gray Code is a variation on binary code in which only 1 bit is changed from the preceding number. The bit so as to changes is the smallest bit that can be changes without repeating an earlier code.
Therefore the counting sequences in base-10, binary and Gray codes go as shown below.
Base-10
|
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
|
In every subsequent number in Gray code only the lowest bit possible has been changed. The Gray code is used in the simplification of logic circuits.