5 in Binary

5 in binary is 101.

Result 101.

Binary (base 2)101

Step by step

  1. Divide by 2 repeatedly and write down the remainders:
    DivisionQuotientRemainder
    5 ÷ 221
    2 ÷ 210
    1 ÷ 201
  2. Read the remainders from bottom to top: 101
binary (base 2)101
octal (base 8)5
decimal (base 10)5
hexadecimal (base 16)5
Bits needed3 bits (fits in 1 byte)
8-bit form0000 0101
16-bit form0000 0000 0000 0101
32-bit form0000 0000 0000 0000 0000 0000 0000 0101

Quick method for 5

Find the powers of 2 that add up to 5: 4 + 1. Put a 1 in those places and 0 elsewhere: 101.

5 in other forms

  • Place values: 4 + 1 = 5
  • Hex: 5
  • Octal: 5
  • 3 bits — fits in one byte
  • 2 one-bits (even parity)
  • Padded: 0000 0101
  • 16-bit: 0000 0000 0000 0101
  • One's complement (8-bit): 1111 1010
  • Between 22 = 4 and 23 = 8
  • −5 in 8-bit two's complement: 1111 1011
  • ASCII: ENQ — ASCII table

Going back: binary to decimal.

More numbers in binary

All numbers 0–255 in binary

5 in binary: questions

What is 5 in binary?

101.

What is 5 in hex?

5.

How many bits is 5?

3.