18 in Binary

18 in binary is 1 0010 (10010).

Result 10010.

Binary (base 2)1 0010

Step by step

  1. Divide by 2 repeatedly and write down the remainders:
    DivisionQuotientRemainder
    18 ÷ 290
    9 ÷ 241
    4 ÷ 220
    2 ÷ 210
    1 ÷ 201
  2. Read the remainders from bottom to top: 1 0010
binary (base 2)1 0010
octal (base 8)22
decimal (base 10)18
hexadecimal (base 16)12
Bits needed5 bits (fits in 1 byte)
8-bit form0001 0010
16-bit form0000 0000 0001 0010
32-bit form0000 0000 0000 0000 0000 0000 0001 0010

Quick method for 18

Find the powers of 2 that add up to 18: 16 + 2. Put a 1 in those places and 0 elsewhere: 10010.

18 in other forms

  • Place values: 16 + 2 = 18
  • Hex: 12
  • Octal: 22
  • 5 bits — fits in one byte
  • 2 one-bits (even parity)
  • Padded: 0001 0010
  • 16-bit: 0000 0000 0001 0010
  • One's complement (8-bit): 1110 1101
  • Between 24 = 16 and 25 = 32
  • −18 in 8-bit two's complement: 1110 1110
  • ASCII: DC2 — ASCII table

Going back: binary to decimal.

More numbers in binary

All numbers 0–255 in binary

18 in binary: questions

What is 18 in binary?

10010.

What is 18 in hex?

12.

How many bits is 18?

5.