Gray (ReflectedBinary or Mirror) Code
~ on ~ 1 commentsGray code was invented by Frank Gray of Bell Labs in 1947. He called his code as reflected binary code. Later others started calling it as Gray code. This code has also come to be known as mirror code. Both the names, viz., reflected binary code and mirror code, stem from its mirrorreflection property. The main features of the Gray code are:
• It is a binary code just like to the conventional binary code.
• The code can be constructed using its mirrorreflecting property.
• Adjacent numbers of the code differ in one bitposition only. This is illustrated in Table 1.26, which shows entries of decimal numbers 0 to 4, and their equivalents in the conventional binary and the Graycode binary. In columns 2 and 3 of Table 1.26, we have highlighted the positions in which adjacent numbers differ from each other using bold fonts. It can be seen from column 2 that adjacent numbers in conventional binary may differ from each other in one or more one bit positions. For example, 0011 (= 3) and 0100 (= 4)differ from each other in three bit positions.
Now, inspection of column 3 of Table 1.26 shows that adjacent numbers in the Gray code differ from each other only in one bit position. For example, 0010 (= 3) and 0110 (= 4) differ from each other only in the second bit position from the left. This important property of Gray code has many practical applications. The foremost among these is its use in logic simplification using the Kmap and QuineMccluskey methods. It also finds extensive use in errordetection and correction codes.
Table 1.26 Decimal, conventional binary and Graycode numbers
Decimal number

Conventional binary equivalent

Graycode equivalent

0
1
2
3
4

0000
0001
0010
0011
0100

0000
0001
0011
0010
0110

Decimal

Gray code

0
1
2
3
4
5
6
7

000
001
011
010
110
111
101
100

Decimal

Gray code

Decimal

Gray code

0
1
2
3
4
5
6
7

0000
0001
0011
0010
0110
0111
0101
0100

8
9
10
11
12
13
14
15

1000
1001
1011
1010
1110
1111
1101
1100

nice thank you
ReplyDelete