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