Calculators for you Contact Us


Decimal to Gray Code Converter

Use our Decimal to Gray code converter a free online calculator / conversion tool to convert decimal value into gray code.




Gray Codes

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

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 Codes and Natural Binary Codes

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.



Gray Color Code Table

DecimalBinary CodeGray Code
000000000
100010001
200100011
300110010
401000110
501010111
601100101
701110100
810001100
910011101
1010101111
1110111110
1211001010
1311011011
1411101001
1511111000


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 CodePositionBinary Code
23222120Position23222120
000000000
000110001
001120010
001030011
011040100
011150101
010160110
010070111
110081000
110191001
1111101010
1110111011
1011121100
1011131101
1001141110
1000151111

Spreading Knowledge Across the World

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....