Cambridge IGCSE · Topic 1.1
IGCSE Computer Science 0478 / Topic 1 / IGCSE

Binary, shorter.

Long strings of 0s and 1s are hard for people to read and easy to copy wrongly. Hexadecimal writes the same binary four bits at a time, so a 16-bit value becomes just four characters.

The key idea

Hexadecimal is base 16. It uses the digits 0 to 9 and the letters A to F for 10 to 15. One hex digit stands for exactly 4 bits (a nibble), so binary converts to hex by splitting it into groups of 4 from the right. Hex is used because it is shorter and easier for humans to read and write than binary, with fewer mistakes, yet converts to binary simply. The computer itself still stores binary.

one hex digit = one nibble (4 bits) 1 0 1 1 0 1 1 0 8 + 2 + 1 = 114 + 2 = 6 B6 1011 0110 = B6
Fig. 1: each group of four bits becomes one hexadecimal digit
Section 01

Sixteen digits.

In the lab, flip the bits and watch each group of four turn into a single hex digit. Click a hex digit to count it up from 0 to F.

Denary0 to 9101112131415
Hex0 to 9ABCDEF
Binary0000 to 1001101010111100110111101111
Examiner trap

Do not write 12 as the hex digit for twelve. Each place holds a single character, so twelve is C; 12 in hex means 1 × 16 + 2 = 18.

Section 02

Converting with nibbles.

Binary and hex convert directly, four bits at a time. To or from denary, go through binary or use the hex place values.

Worked example Binary to hex
Convert 1101 0111 1010 to hexadecimal.
  1. Split into nibbles from the right: 1101, 0111, 1010.
  2. 1101 = 13 = D; 0111 = 7; 1010 = 10 = A.
Answer: D7A
Worked example Hex to denary
Convert 2F to denary.
  1. Place values: 16 and 1.
  2. 2 × 16 = 32 and F = 15, so 15 × 1 = 15.
  3. 32 + 15 = 47.
Answer: 47
Worked example Denary to hex
Convert 200 to hexadecimal.
  1. 200 in binary is 1100 1000.
  2. 1100 = 12 = C; 1000 = 8.
Answer: C8
Your turn
Convert the hex number 3E to binary and to denary.
Stage 1 · Learn

Check what the sim just showed you

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

Which hex digit stands for the denary value 11?

Quick check+10 XP

How many bits does one hexadecimal digit represent?

Quick check+10 XP

In the lab's colour mode, what colour is #00FF00?

Quick check+10 XP

What is 1111 0000 in hexadecimal?

Section 03

Where hex is used.

The lab's colour code mode builds an HTML colour from three bytes, and its last mode lists other places hex appears.

Examiner trap

Say that hex is easier for humans. Computers do not store or process hex: they convert it to binary.

Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to IGCSE Paper 1 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

Convert the hexadecimal number 9C to denary.

Exam style+20 XP

Why is hexadecimal used for MAC addresses?

Exam style+20 XP

What is the denary value 255 in hexadecimal?

Exam style+20 XP

A 16-bit binary number is written in hex. How many hex digits are needed?

Skill unlocked

Hexadecimal, mastered.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
Hex digits, converting between hexadecimal, binary and denary, and explaining why and where hex is used.