The digit 7 in binary code

AnswerThe digit 7 7 is 00110111 in binary — ASCII code 55.

012806413211608141211

How the digit 7 becomes 00110111

The character’s code is 55. Writing 55 as a sum of powers of two gives 32 + 16 + 4 + 2 + 1 = 55. Put a 1 under each place value used and a 0 everywhere else, and you get 00110111.

Binary (8-bit)00110111
Decimal (ASCII code)55
Hexadecimal37 (0x37)
Octal067
UnicodeU+0037
HTML entity7

Frequently asked questions

What is the digit 7 in binary?

The digit 7 is 00110111 in 8-bit binary. That is ASCII and UTF-8 code 55, which is 32 + 16 + 4 + 2 + 1 = 55.

Is the character 7 the same as the number 7 in binary?

No. The number 7 is 111 in binary, but the text character “7” is ASCII code 55, stored as 00110111. Subtract 48 (00110000) from a digit character to get its numeric value.