5 in Binary

5 in binary is 101. It takes 3 bits to write, and as a full byte it is 00000101.

How to convert 5 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 101.

DivisionQuotientRemainder
5 ÷ 221
2 ÷ 210
1 ÷ 201

Check it the other way

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

BitPlace valueContributes
122 = 44
021 = 20
120 = 11

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

5 in every base

FormatValue
Binary101
Decimal5
Hexadecimal5
Octal5
As a byte (8-bit)00000101

Worth knowing about 5

Five is the smallest number whose binary form, 101, is a palindrome that uses both digits: it reads the same forwards and backwards.

Convert another number

Binary
 
Hex
 
Octal
 

Nearby numbers

Or browse the full table at numbers in binary.

FAQ

What is 5 in binary?

5 converts to 101 in binary. Every 1 in the pattern marks a power of two that is part of the total, and every 0 marks one that is skipped. Add the marked powers and the sum is exactly 5. Padded to a byte, it reads 00000101.

How many bits does 5 need?

101 is 3 bits long, so 5 needs 3 bits at minimum. The count grows by one whenever a number reaches the next power of two. Inside a byte, the leftover positions are filled with zeros, which is why 5 appears as 00000101 in most computer contexts.

What is 5 in hex?

5 written in base 16 is 5. Programmers lean on hex because each digit maps to exactly four bits, turning long binary strings into short codes. For completeness, 5 in octal is 5 and in binary it is 101. They all name the same quantity.