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