159 in Binary

159 in binary is 1001 1111 (10011111).

Result 10011111.

Binary (base 2)1001 1111

Step by step

  1. Divide by 2 repeatedly and write down the remainders:
    DivisionQuotientRemainder
    159 ÷ 2791
    79 ÷ 2391
    39 ÷ 2191
    19 ÷ 291
    9 ÷ 241
    4 ÷ 220
    2 ÷ 210
    1 ÷ 201
  2. Read the remainders from bottom to top: 1001 1111
binary (base 2)1001 1111
octal (base 8)237
decimal (base 10)159
hexadecimal (base 16)9F
Bits needed8 bits (fits in 1 byte)
8-bit form1001 1111
16-bit form0000 0000 1001 1111
32-bit form0000 0000 0000 0000 0000 0000 1001 1111

Quick method for 159

Find the powers of 2 that add up to 159: 128 + 16 + 8 + 4 + 2 + 1. Put a 1 in those places and 0 elsewhere: 10011111.

159 in other forms

  • Place values: 128 + 16 + 8 + 4 + 2 + 1 = 159
  • Hex: 9F
  • Octal: 237
  • 8 bits — fits in one byte
  • 6 one-bits (even parity)
  • Padded: 1001 1111
  • 16-bit: 0000 0000 1001 1111
  • One's complement (8-bit): 0110 0000
  • As a signed byte (two's complement): -97
  • Between 27 = 128 and 28 = 256

Going back: binary to decimal.

More numbers in binary

All numbers 0–255 in binary

159 in binary: questions

What is 159 in binary?

10011111.

What is 159 in hex?

9F.

How many bits is 159?

8.