Binary and number bases

We count in base 10 because we have ten fingers. Computers use base 2 (binary), with just 0 and 1. Hexadecimal (base 16) is a short way of writing binary.

Key facts

  • Binary column values: …, 16, 8, 4, 2, 1.
  • Hexadecimal digits: 0–9 then A (10) to F (15).
  • To convert to a base: divide repeatedly and read the remainders upwards.
  • One hex digit = four binary digits.

Worked examples

Example 1

Convert 45 to binary.

  1. 45 = 32 + 8 + 4 + 1.
  2. Columns 32 16 8 4 2 1: 1 0 1 1 0 1. 101101₂

Answer: 101101

Example 2

Convert the hex number 2F to denary.

  1. 2 × 16 + 15 = 47

Answer: 47