Converting between denary (base 10), binary (base 2), and hexadecimal (base 16) is a core skill in GCSE Computer Science. Every direction of conversion appears in exam questions — denary to binary, binary to denary, binary to hex, hex to denary, and combinations. Master the place-value method and you can handle any conversion the examiner throws at you.

How do you convert denary to binary?

The repeated division by 2 method:

  1. Divide the denary number by 2. Write down the remainder (0 or 1).
  2. Divide the quotient by 2. Write down the remainder.
  3. Repeat until the quotient is 0.
  4. Read the remainders from bottom to top — this is the binary result.

Worked example: convert 45 (denary) to binary

Step Divide by 2 Quotient Remainder
1 45 ÷ 2 22 1
2 22 ÷ 2 11 0
3 11 ÷ 2 5 1
4 5 ÷ 2 2 1
5 2 ÷ 2 1 0
6 1 ÷ 2 0 1

Reading remainders bottom to top: 101101

If an 8-bit answer is required, pad with leading zeros: 00101101

Verify: 32 + 8 + 4 + 1 = 45 ✓

How do you convert binary to denary?

Use the place-value table method:

Place value 128 64 32 16 8 4 2 1
Binary digits 0 0 1 0 1 1 0 1

Multiply each bit by its place value and add the results:

  • 0×128 = 0
  • 0×64 = 0
  • 1×32 = 32
  • 0×16 = 0
  • 1×8 = 8
  • 1×4 = 4
  • 0×2 = 0
  • 1×1 = 1

Total: 32 + 8 + 4 + 1 = 45

Quick tip: write out the place values (128, 64, 32, 16, 8, 4, 2, 1) first on your exam paper before you start — this eliminates arithmetic errors.

How do you convert between binary and hexadecimal?

Hexadecimal (base 16) uses the digits 0–9 and A–F, where A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.

The fastest conversion method exploits the fact that one hex digit corresponds exactly to four binary digits (a nibble).

Binary to hex:

  1. Group the binary digits into groups of 4, starting from the right. Pad with zeros on the left if necessary.
  2. Convert each group of 4 bits to its hex equivalent.

Worked example: convert 10110111 to hexadecimal

Group 1011 0111
Denary value 11 7
Hex digit B 7

Result: B7 in hexadecimal.

Hex to binary: simply reverse the process — replace each hex digit with its 4-bit binary equivalent.

Worked example: convert 3F to binary

Hex digit 3 F
4-bit binary 0011 1111

Result: 00111111

How do you convert denary to hexadecimal?

Method 1 (via binary): convert denary to binary first, then group into nibbles and convert to hex. Useful because you may already know the binary conversion.

Method 2 (direct division by 16):

  1. Divide the denary number by 16. Write the remainder.
  2. Divide the quotient by 16. Write the remainder.
  3. Repeat until quotient is 0.
  4. Read remainders from bottom to top, replacing any values 10–15 with A–F.

Worked example: convert 183 to hexadecimal

Step Divide Quotient Remainder Hex digit
1 183 ÷ 16 11 7 7
2 11 ÷ 16 0 11 B

Reading bottom to top: B7

Verify: B7 = 11×16 + 7 = 176 + 7 = 183 ✓

Complete conversion reference table

Denary Binary (4-bit) Hexadecimal
0 0000 0
1 0001 1
5 0101 5
9 1001 9
10 1010 A
11 1011 B
12 1100 C
13 1101 D
14 1110 E
15 1111 F

Memorising the values of A–F (10–15) is non-negotiable — these conversions appear in almost every exam.

Frequently asked questions

Why does GCSE Computer Science use hexadecimal at all?

Binary is the native language of hardware, but long binary strings are difficult for humans to read and write accurately. Hexadecimal offers a compact representation where each hex digit maps to exactly four bits. Colour values in web design (e.g. #FF5733), memory addresses, and error codes are all commonly shown in hexadecimal. GCSE students need hex so they can interpret these real-world representations, not just abstract theory.

What is a nibble and why does it matter for hex conversion?

A nibble is exactly 4 bits — half a byte. It is significant because 4 bits can represent 2⁴ = 16 different values (0–15), which maps perfectly to one hexadecimal digit. This is not a coincidence: hexadecimal was chosen as a convenient representation for binary precisely because of this relationship. Grouping binary into nibbles is the most reliable method for binary-to-hex conversion and you should use it consistently.

How do I convert hexadecimal to denary without going through binary?

Use the place-value method with powers of 16. For a two-digit hex number AB: the value is (value of A) × 16 + (value of B) × 1. For example, C8 = 12×16 + 8 = 192 + 8 = 200. For a three-digit number ABC: (value of A) × 256 + (value of B) × 16 + (value of C) × 1. The place values are powers of 16: 1, 16, 256, 4096, and so on — the same structure as denary (powers of 10) and binary (powers of 2), just a different base.

What is the most common mistake students make in number base conversions?

The most common errors are reading the division remainders in the wrong order (you must read from bottom to top, not top to bottom), forgetting to pad binary results to 8 bits when the question asks for an 8-bit answer, and confusing hex digits A–F with their denary values. A reliable way to avoid the last error is to write a small reference row at the top of your working: A=10, B=11, C=12, D=13, E=14, F=15. This takes ten seconds and prevents a common loss of marks.


Professor Turing can practise every number conversion direction with you using Socratic questions and instant feedback at aitutors.me.