Conversion of Gray Code
Gray code and binary conversion are essential for understanding and resolving issues in digital systems. The most significant bit (MSB) of a binary integer is converted to gray code by taking the XOR of the bit that is now in use and the bit that is immediate to its left in the binary representation.
The below table represents the gray code of decimals from 0 to 10.
Decimal | Binary Code | Gray Code |
---|---|---|
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 |
What is Gray Code?
A binary numbering system in which two successive values only differ by one bit is called gray code, often referred to as reflected binary code or unit distance code. Frank Gray created it in 1953, and today it is a common tool for error detection and repair in digital communication and data storage systems. The Gray code is a sequencing of the binary numeral system in which two successive values differ in an only binary digits.