7 in Binary

7 in binary is 111. It takes 3 bits to write, and as a full byte it is 00000111.

How to convert 7 to binary

Divide by 2, write down the remainder, and repeat with the quotient until it reaches 0. The remainders, read from the last row up to the first, spell out 111.

DivisionQuotientRemainder
7 ÷ 231
3 ÷ 211
1 ÷ 201

Check it the other way

To verify, read 111 left to right, giving each digit its place value and adding up the places that hold a 1.

BitPlace valueContributes
122 = 44
121 = 22
120 = 11

Adding the contributions: 4 + 2 + 1 = 7. The conversion checks out.

7 in every base

FormatValue
Binary111
Decimal7
Hexadecimal7
Octal7
As a byte (8-bit)00000111

Worth knowing about 7

Seven is a Mersenne prime, one less than a power of two, which makes its binary form 111 solid ones and puts it in the same family as the largest primes ever discovered.

Convert another number

Binary
 
Hex
 
Octal
 

Nearby numbers

Or browse the full table at numbers in binary.

FAQ

What is 7 in binary?

In binary, 7 is written 111. That is 3 digits, each one a power of two: the pattern says which of 1, 2, 4, 8, and so on to add together to make 7. Computers store it as the byte 00000111, padding the front with zeros.

How many bits does 7 need?

It takes 3 bits to write 7 in binary, since 111 has 3 digits and dropping any of them would change the value. Real hardware rounds up to whole bytes, so 7 normally sits in eight bits as 00000111, with the unused positions set to zero.

What is 7 in hex?

In hex, 7 is written 7. Because 16 is a power of two, hex lines up neatly with binary: one hex digit always covers four bits, so 111 compresses cleanly. The octal form, common in file permissions, is 7. Same number, three different notations.