4 in Binary

4 in binary is 100. It takes 3 bits to write, and as a full byte it is 00000100.

How to convert 4 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 100.

DivisionQuotientRemainder
4 ÷ 220
2 ÷ 210
1 ÷ 201

Check it the other way

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

BitPlace valueContributes
122 = 44
021 = 20
020 = 10

Adding the contributions: 4 + 0 + 0 = 4. The conversion checks out.

4 in every base

FormatValue
Binary100
Decimal4
Hexadecimal4
Octal4
As a byte (8-bit)00000100

Worth knowing about 4

Four is a perfect square of the base, so its binary form 100 mirrors what 100 means in decimal: the base multiplied by itself.

Convert another number

Binary
 
Hex
 
Octal
 

Nearby numbers

Or browse the full table at numbers in binary.

FAQ

What is 4 in binary?

In binary, 4 is written 100. 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 4. Computers store it as the byte 00000100, padding the front with zeros.

How many bits does 4 need?

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

What is 4 in hex?

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