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