Gray code to binary
Type a value in Gray to get it in bin instantly.
10101010bin
That's 11× as big as a nibble (4 bits), while a byte is 1.5× bigger. That needs 8 bits to store.
Convert the other way: bin to Gray
What it means
How big is that?
Whole numbers only. Anything after the decimal point is rounded away.
The math
How to convert Gray to bin
Base b: each digit is worth b times the one to its right. Gray code = n XOR (n ÷ 2); BCD writes each decimal digit as four bits.
Example: 11111111 Gray = 10101010 bin.
Every unit
Your number in every base
Tables
Gray to bin conversion table
| Gray | bin |
|---|---|
| 1 Gray | 1 bin |
| 10 Gray | 11 bin |
| 100 Gray | 111 bin |
| 1000 Gray | 1111 bin |
| 1010 Gray | 1100 bin |
| 1111 Gray | 1010 bin |
| 10000 Gray | 11111 bin |
| 11111 Gray | 10101 bin |
| 100000 Gray | 111111 bin |
| 1000000 Gray | 1111111 bin |
| 1100100 Gray | 1000111 bin |
| 10000000 Gray | 11111111 bin |
| 11111111 Gray | 10101010 bin |
| 100000000 Gray | 111111111 bin |
| 1000000000 Gray | 1111111111 bin |
| 1111101000 Gray | 1010110000 bin |
| 10000000000 Gray | 11111111111 bin |
bin to Gray conversion table
| bin | Gray |
|---|---|
| 1 bin | 1 Gray |
| 10 bin | 11 Gray |
| 100 bin | 110 Gray |
| 1000 bin | 1100 Gray |
| 1010 bin | 1111 Gray |
| 1111 bin | 1000 Gray |
| 10000 bin | 11000 Gray |
| 11111 bin | 10000 Gray |
| 100000 bin | 110000 Gray |
| 1000000 bin | 1100000 Gray |
| 1100100 bin | 1010110 Gray |
| 10000000 bin | 11000000 Gray |
| 11111111 bin | 10000000 Gray |
| 100000000 bin | 110000000 Gray |
| 1000000000 bin | 1100000000 Gray |
| 1111101000 bin | 1000011100 Gray |
| 10000000000 bin | 11000000000 Gray |
Quick answers
Quick answers
- How many bin is 1 Gray?
- 1 Gray is 1 bin.
- How many bin is 1010 Gray?
- 1010 Gray is 1100 bin.
- How many bin is 11111111 Gray?
- 11111111 Gray is 10101010 bin.
The units
About these units
Gray code (Gray)
Reflected binary code: the next number changes only one bit. Used by rotary encoders.
Binary (bin)
Base two: only 0 and 1. Every digit is one bit, the smallest unit of computer memory.
Keep going