The digit 6 in binary code
AnswerThe digit 6 6 is 00110110 in binary — ASCII code 54.
012806413211608141201
How the digit 6 becomes 00110110
The character’s code is 54. Writing 54 as a sum of powers of two gives 32 + 16 + 4 + 2 = 54. Put a 1 under each place value used and a 0 everywhere else, and you get 00110110.
| Binary (8-bit) | 00110110 |
|---|---|
| Decimal (ASCII code) | 54 |
| Hexadecimal | 36 (0x36) |
| Octal | 066 |
| Unicode | U+0036 |
| HTML entity | 6 |
Frequently asked questions
What is the digit 6 in binary?
The digit 6 is 00110110 in 8-bit binary. That is ASCII and UTF-8 code 54, which is 32 + 16 + 4 + 2 = 54.
Is the character 6 the same as the number 6 in binary?
No. The number 6 is 110 in binary, but the text character “6” is ASCII code 54, stored as 00110110. Subtract 48 (00110000) from a digit character to get its numeric value.