📁 Topic 3 · 3.1 Number Representation
3.1b Hexadecimal
Edexcel 4CP0 · iGCSE Computer Science · ~11 min read
Notes
──
Video
──
Slides
──
Worksheet
──
Quiz

What is Hexadecimal?

Hexadecimal (hex) is a base-16 number system. It uses 16 different digits: 0–9 and the letters A–F (where A=10, B=11, C=12, D=13, E=14, F=15). Each hex digit represents exactly one nibble (4 bits), so two hex digits represent one byte (8 bits).

Hexadecimal Digit Values

Denary0123456789101112131415
Hex0123456789ABCDEF
4-bit binary0000000100100011010001010110011110001001101010111100110111101111

Binary to Hexadecimal

Split the binary number into groups of 4 bits (nibbles) from the right. Convert each nibble to its hex digit.

Example: Convert 10110111 to hex

  • Split: 1011 | 0111
  • 1011 = 8+2+1 = 11 = B
  • 0111 = 4+2+1 = 7
  • Result: B7

Hexadecimal to Binary

Replace each hex digit with its 4-bit binary equivalent.

Example: Convert 4F to binary

  • 4 = 0100
  • F = 15 = 1111
  • Result: 01001111

Hexadecimal to Denary

In hex, place values are powers of 16. The rightmost digit × 1 (16⁰), next × 16 (16¹), next × 256 (16²), etc.

Example: Convert 2C to denary

  • 2 × 16 = 32
  • C × 1 = 12 × 1 = 12
  • Result: 32 + 12 = 44

Why Use Hexadecimal?

  • Much shorter than binary — 1 hex digit = 4 bits, so 2 hex digits = 1 full byte
  • Easier for humans to read and remember than long binary strings
  • Used to represent memory addresses (e.g. 0x3FA1)
  • Used for RGB colour codes in web design (e.g. #FF5733)
  • Used in error messages and debugging
  • Easy to convert to and from binary — no calculation required, just look up the nibble
📝 Exam Tip: When converting binary to hex, always split into groups of 4 from the RIGHT. If the leftmost group has fewer than 4 bits, pad with leading zeros. E.g. 110101 → 0011 | 0101 → 35 in hex.
⚠️ Common Mistakes
  • Forgetting the letters A–F — 10 in hex is A, not "10"
  • Splitting binary from the left instead of the right when converting to hex
  • Thinking hex "10" = denary 10 — it actually equals 16 (1×16 + 0×1)
← 3.1a Binary Numbers Topic 3 · 3.1 Number Representation Next: 3.1c Binary Arithmetic →
🔒
Pro Content
Subscribe to access all 47 Edexcel iGCSE lessons.
£7.99/month
or £59/year