📄 Paper 2 · 4.5 Data Representation
4.5.2 Number Bases
AQA 7517 · A-Level Computer Science · ~18 min read

What is a Number Base?

A number base (or radix) defines how many unique digits a positional number system uses. Each digit position represents a power of the base.

BaseNameDigits usedUsed in computing for
2Binary0, 1All internal computer storage and processing
8Octal0–7Unix file permissions; compact binary notation
10Decimal0–9Human-readable numbers
16Hexadecimal0–9, A–FMemory addresses, colour codes, machine code

Positional Notation

In a base-n system, each digit position has a value of n raised to a power:

Binary: 1011₂
= 1×2³ + 0×2² + 1×2¹ + 1×2⁰
= 8  +  0  +  2  +  1  = 11₁₀

Hexadecimal: 2A₁₆
= 2×16¹ + A×16⁰
= 32  + 10  = 42₁₀

Binary (Base 2)

Binary is the foundation of all computing — transistors have two states (on/off) mapping to 1 and 0.

Converting decimal to binary

Divide repeatedly by 2, recording remainders from bottom to top:

Convert 43₁₀ to binary:
43 ÷ 2 = 21 remainder 1
21 ÷ 2 = 10 remainder 1
10 ÷ 2 =  5 remainder 0
 5 ÷ 2 =  2 remainder 1
 2 ÷ 2 =  1 remainder 0
 1 ÷ 2 =  0 remainder 1

Read remainders upward: 43₁₀ = 101011₂

Converting binary to decimal

101011₂ = 1×32 + 0×16 + 1×8 + 0×4 + 1×2 + 1×1
        = 32 + 0 + 8 + 0 + 2 + 1 = 43₁₀

Hexadecimal (Base 16)

Hexadecimal is a compact way to represent binary — each hex digit represents exactly 4 bits (a nibble).

HexDecimalBinary (4-bit)
000000
550101
991001
A101010
B111011
F151111

Binary ↔ Hexadecimal conversion

Binary to Hex — group bits in 4s from the right:
10110101₂ → 1011 | 0101 → B | 5 → B5₁₆

Hex to Binary — expand each digit to 4 bits:
3F₁₆ → 0011 | 1111 → 00111111₂

Hex to decimal

B5₁₆ = 11×16 + 5×1 = 176 + 5 = 181₁₀

Decimal to hex

Convert 255₁₀ to hex:
255 ÷ 16 = 15 remainder 15 → F
 15 ÷ 16 =  0 remainder 15 → F
Read upward: 255₁₀ = FF₁₆

Why Use Hexadecimal?

  • Much more compact than binary — 1 hex digit = 4 binary bits
  • Easier for humans to read and write than long binary strings
  • Used for: memory addresses (e.g. 0xFF3C10), colour codes (#FF6600), MAC addresses, machine code output
Exam tip: Be confident converting between binary, decimal, and hexadecimal. Know that 1 hex digit = 4 bits. For hex digits A=10, B=11, C=12, D=13, E=14, F=15. Hexadecimal is widely used in computing because it compactly represents binary — 2 hex digits = 1 byte (8 bits). Memory addresses and RGB colour values are common examples.
▶
Click through the slides at your own pace. Use arrow keys or click to advance.
Click slide or press arrow keys to navigate

Worksheet — 4.5.2 Number Bases

8 questions · instantly marked · AQA 7517 standard

Q1Convert 11010110₂ to decimal. Show your working.[2]
✅ Mark scheme
Mark scheme
128+0+32+0+16+4+2+0 = 182 [1 for working, 1 for correct answer of 182₁₀].
Q2Convert 157₁₀ to binary. Show your working.[2]
✅ Mark scheme
Mark scheme
Repeated division by 2: 157÷2=78 r1, 78÷2=39 r0, 39÷2=19 r1, 19÷2=9 r1, 9÷2=4 r1, 4÷2=2 r0, 2÷2=1 r0, 1÷2=0 r1 → reading remainders upward: 10011101₂ [1 for method, 1 for answer].
Q3Convert A9₁₆ to decimal. Show your working.[2]
✅ Mark scheme
Mark scheme
A×16 + 9×1 = 10×16 + 9 = 160 + 9 = 169₁₀ [1 for working showing A=10, 1 for answer 169].
Q4Convert 11001010₂ to hexadecimal. Show your working.[2]
✅ Mark scheme
Mark scheme
Group into 4-bit nibbles from right: 1100 | 1010 → C | A → CA₁₆ [1 for grouping method, 1 for correct answer CA₁₆].
Q5Convert 3E₁₆ to binary.[2]
✅ Mark scheme
Mark scheme
3 → 0011, E → 1110 → 00111110₂ [1 for expanding each hex digit to 4 bits, 1 for correct answer].
Q6Explain why hexadecimal is commonly used when representing memory addresses.[2]
✅ Mark scheme
Mark scheme
Each hexadecimal digit represents exactly 4 bits, so hex is a compact and direct representation of binary [1]; it is much shorter and easier for humans to read and write than long binary strings — e.g. 2 hex digits = 1 byte [1].
Q7Convert 200₁₀ to hexadecimal. Show your working.[2]
✅ Mark scheme
Mark scheme
200÷16=12 r8 → 8; 12÷16=0 r12 → C; reading upward: C8₁₆ [1 for method, 1 for correct answer C8₁₆].
Q8The web colour code #FF8C00 uses hexadecimal. Convert each of the three colour components (FF, 8C, 00) to decimal.[3]
✅ Mark scheme
Mark scheme
FF₁₆ = 15×16+15 = 255 [1]; 8C₁₆ = 8×16+12 = 140 [1]; 00₁₆ = 0 [1]. (Colour is RGB: Red=255, Green=140, Blue=0 — a shade of orange.)
Topic Quiz
Question 1 of 15
You scored
out of 15
Card 1 of 7
Click to reveal definition
🎉
All cards reviewed!
TermDefinition
🎯

Mini Test — Number Bases

10 questions · 10 minutes

← 4.5.1 Number Systems
35 of 70 · AQA 7517
4.5.3 Units of Information →