Gray Code to Decimal Converter
Convert Gray code (binary) to decimal, live as you type.
Gray code is a binary numbering system where consecutive values differ by exactly one bit — used in rotary encoders and error correction to avoid glitches from multiple bits flipping at once. Converts live as you type, entirely in your browser.
Need the opposite? Decimal to Gray Code Converter
What is Gray Code to Decimal Converter?
Gray code is a binary numbering system where consecutive values differ by exactly one bit, used in rotary encoders, Karnaugh maps, and error correction, since it avoids the ambiguous in-between readings that regular binary can produce when a sensor catches multiple bits changing mid-transition. Paste a Gray code binary string (e.g. 1011, 0101) and get its decimal value instantly. Multiple entries are supported, so you can validate or decode a whole batch of Gray code readings at once rather than one at a time. Input is validated as you go: invalid bit strings are flagged rather than silently misconverted, and everything runs entirely in your browser, with nothing sent to a server.
Gray Code to Decimal Chart (0-15)
| Gray Code | Decimal |
|---|---|
| 0000 | 0 |
| 0001 | 1 |
| 0011 | 2 |
| 0010 | 3 |
| 0110 | 4 |
| 0111 | 5 |
| 0101 | 6 |
| 0100 | 7 |
| 1100 | 8 |
| 1101 | 9 |
| 1111 | 10 |
| 1110 | 11 |
| 1010 | 12 |
| 1011 | 13 |
| 1001 | 14 |
| 1000 | 15 |
How to Use the Gray Code to Decimal Converter
- 1
Paste a Gray Code Bit String: Enter one or more Gray code values made of 0s and 1s, such as 1011.
- 2
Read the Decimal Result Instantly: The decoded decimal value appears automatically as you type, with invalid bit strings flagged.
- 3
Copy the Result: Use the copy button to copy the decimal value for use in hardware debugging or documentation.
How Gray Code Converts to Decimal
First convert the Gray code back to regular binary, then read that binary number as decimal. The Gray-to-binary step works left to right: the first (leftmost) binary bit equals the first Gray bit, and every binary bit after that equals the previous binary bit XORed with the corresponding Gray bit.
How to Convert Gray Code to Decimal
Converting 1011: the first binary bit is 1 (copied from Gray). The second binary bit is 1 XOR 0 = 1. The third is 1 XOR 1 = 0. The fourth is 0 XOR 1 = 1. That gives binary 1101, which is 13 in decimal. So Gray code 1011 = decimal 13.
Examples
0111 → binary 0101 → decimal 5
10101 → binary 11001 → decimal 25
1100 → binary 1000 → decimal 8Frequently Asked Questions
Common questions about Gray Code to Decimal Converter.