Use our Decimal to Gray code converter a free online calculator / conversion tool to convert decimal value into gray code.
Gray Code is a form of binary that uses a different method of incrementing from one number to the next. With Gray Code, only one bit changes state from one position to another.
Decimal number system has only ten (10) digits from 0 to 9. Every number (value) represents with 0,1,2,3,4,5,6, 7,8 and 9 in this number system. The base of decimal number system is 10, because it has only 10 digits
Gray code is a form of binary and the most popular absolute encoder output type. Gray Code is a form of binary that uses a different method of incrementing from one number to the next. With Gray Code, only one bit changes state from one position to another. This feature allows a system designer to perform some error checking (i.e., if more than one bit changes, the data must be incorrect). Below Table illustrates the difference between Natural Binary and Gray Code.
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 |
11 | 1011 | 1110 |
12 | 1100 | 1010 |
13 | 1101 | 1011 |
14 | 1110 | 1001 |
15 | 1111 | 1000 |
Gray Code is the most popular absolute encoder output type because its use prevents certain data errors that can occur with Natural Binary during state changes. For example, in a highly capacitive circuit (or sluggish system response), a Natural Binary state change from 0011 to 0100 could cause the counter/PLC to see 0111. This sort of error is not possible with Gray Code, so the data is more reliable. In table below, note that even from position 7 to 8, Gray Code only changes one bit state.
Gray Code | Position | Binary Code |
---|
23 | 22 | 21 | 20 | Position | 23 | 22 | 21 | 20 |
---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 |
0 | 0 | 1 | 1 | 2 | 0 | 0 | 1 | 0 |
0 | 0 | 1 | 0 | 3 | 0 | 0 | 1 | 1 |
0 | 1 | 1 | 0 | 4 | 0 | 1 | 0 | 0 |
0 | 1 | 1 | 1 | 5 | 0 | 1 | 0 | 1 |
0 | 1 | 0 | 1 | 6 | 0 | 1 | 1 | 0 |
0 | 1 | 0 | 0 | 7 | 0 | 1 | 1 | 1 |
1 | 1 | 0 | 0 | 8 | 1 | 0 | 0 | 0 |
1 | 1 | 0 | 1 | 9 | 1 | 0 | 0 | 1 |
1 | 1 | 1 | 1 | 10 | 1 | 0 | 1 | 0 |
1 | 1 | 1 | 0 | 11 | 1 | 0 | 1 | 1 |
1 | 0 | 1 | 1 | 12 | 1 | 1 | 0 | 0 |
1 | 0 | 1 | 1 | 13 | 1 | 1 | 0 | 1 |
1 | 0 | 0 | 1 | 14 | 1 | 1 | 1 | 0 |
1 | 0 | 0 | 0 | 15 | 1 | 1 | 1 | 1 |
Binary to Decimal Binary to Octal Binary to Hex Binary to Gray Code Decimal to Binary Decimal to Octal Decimal to Hex Decimal to Gray Code Octal to Binary Octal to Decimal Octal to Hexadecimal Hex to Binary Hex to Decimal Hexadecimal to Octal Gray to Binary Gray to Decimal 1s and 2s Complement Calculator Binary Subtraction Calculator Binary Addition Calculator
USA - United States of America Canada United Kingdom Australia New Zealand South America Brazil Portugal Netherland South Africa Ethiopia Zambia Singapore Malaysia India China UAE - Saudi Arabia Qatar Oman Kuwait Bahrain Dubai Israil England Scotland Norway Ireland Denmark France Spain Poland and many more....