📄 Paper 2 · 4.5 Data Representation
4.5.1 Number Systems
AQA 7517 · A-Level Computer Science · ~16 min read · 🆓 Free lesson

Types of Number

In AQA Computer Science, you need to understand different categories of numbers and how they relate to computing.

Number setSymbolDefinitionExamples
Natural numbersNon-negative integers (whole numbers ≥ 0)0, 1, 2, 3, 100
Integer numbersAll whole numbers, including negatives-3, -1, 0, 5, 100
Rational numbersNumbers expressible as p/q where p,q ∈ ℤ and q ≠ 0½, -¾, 0.25, 3
Irrational numbersCannot be expressed as a fraction; non-terminating non-repeating decimalsπ, √2, e
Real numbersAll rational and irrational numbersAny point on the number line

Natural Numbers (ℕ)

Natural numbers are the counting numbers starting from 0 (or 1 in some definitions). In computing, natural numbers are used for counting items, array indices, and loop counters.

  • ℕ = {0, 1, 2, 3, 4, ...}
  • Always whole and non-negative
  • Closed under addition and multiplication (but not subtraction)

Integer Numbers (ℤ)

Integers extend natural numbers to include negative whole numbers. In computing, integers are fundamental — all CPUs natively process integers.

  • ℤ = {..., -3, -2, -1, 0, 1, 2, 3, ...}
  • Closed under addition, subtraction, and multiplication
  • Stored in computers using binary (with two's complement for negatives)
  • Fixed size (e.g. 8-bit, 16-bit, 32-bit, 64-bit integers)

Rational Numbers (ℚ)

A rational number is any number that can be expressed as a fraction p/q where p and q are integers and q ≠ 0.

  • All terminating decimals are rational: 0.25 = ¼
  • All recurring decimals are rational: 0.333... = ⅓
  • All integers are rational: 5 = 5/1

Irrational Numbers

Irrational numbers cannot be expressed as a fraction and have non-terminating, non-repeating decimal expansions.

  • π = 3.14159265358979... (never repeats)
  • √2 = 1.41421356... (never repeats)
  • e = 2.71828182... (Euler's number)

Key implication for computing

Computers cannot represent irrational numbers (or most real numbers) exactly — they use floating-point approximations. This introduces rounding errors.

Real Numbers (ℝ)

Real numbers include all rational and irrational numbers — every point on the number line. The number hierarchy is:

ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ

(Natural numbers are a subset of integers, which are a subset of rationals, which are a subset of reals.)

Ordinal Numbers

Ordinal numbers describe position or order: 1st, 2nd, 3rd, 4th. They are used in computing to describe order of execution, priority queues, and ranking.

Relevance to Computing

Number typeHow stored in computers
Natural / IntegerBinary integers (unsigned / two's complement)
Rational / RealFloating-point (IEEE 754 standard) — an approximation
IrrationalCannot be stored exactly — approximated by floating-point

This distinction matters because floating-point arithmetic can introduce small rounding errors — critical in scientific computing, financial calculations, and graphics.

Exam tip: AQA requires you to know the set hierarchy ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ. Know that irrational numbers (π, √2, e) cannot be exactly represented in a computer — only approximated. All integers are rational, all rational numbers are real. Natural numbers are non-negative integers. Ordinal numbers describe position/order.
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.1 Number Systems

8 questions · instantly marked · AQA 7517 standard

Q1State the four main number sets studied in AQA Computer Science and give the mathematical symbol for each.[4]
✅ Mark scheme
Mark scheme
Natural numbers (ℕ) [1]; Integer numbers (ℤ) [1]; Rational numbers (ℚ) [1]; Real numbers (ℝ) [1]. (Irrational numbers also acceptable as a named set.)
Q2Write the set membership hierarchy using subset notation (⊂).[1]
✅ Mark scheme
Mark scheme
ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ [1] — natural numbers are a subset of integers, which are a subset of rationals, which are a subset of reals.
Q3Explain what makes a number irrational. Give two examples.[3]
✅ Mark scheme
Mark scheme
An irrational number cannot be expressed as a fraction p/q (where p,q are integers, q ≠ 0) [1]; it has a non-terminating, non-repeating decimal expansion [1]; examples: any two of π, √2, √3, e [1].
Q4Is -7 a natural number, integer, rational number? Explain your answer for each.[3]
✅ Mark scheme
Mark scheme
Not a natural number — natural numbers are non-negative (≥ 0) [1]; it IS an integer — integers include all negative whole numbers [1]; it IS a rational number — it can be written as -7/1 (p/q form) [1].
Q5Why can computers not represent irrational numbers exactly? What technique do they use instead?[2]
✅ Mark scheme
Mark scheme
Irrational numbers have infinite non-repeating decimal expansions that cannot be stored in finite binary memory [1]; computers use floating-point representations (IEEE 754), which are approximations that can introduce rounding errors [1].
Q6State whether 0.333... (recurring) is rational or irrational. Justify your answer.[2]
✅ Mark scheme
Mark scheme
Rational [1] — although the decimal is non-terminating, it is repeating, and can be expressed as the fraction 1/3 (which is p/q form) [1].
Q7What are ordinal numbers? Give an example of their use in computing.[2]
✅ Mark scheme
Mark scheme
Ordinal numbers describe position or order (1st, 2nd, 3rd...) [1]; computing examples: priority in a queue, ranking search results, process scheduling order [1].
Q8A student claims "all integers are rational numbers." Is this correct? Explain with an example.[2]
✅ Mark scheme
Mark scheme
Correct [1] — any integer n can be expressed as n/1, which satisfies the p/q definition of rational numbers; e.g. 5 = 5/1, -3 = -3/1 [1].
Topic Quiz
Question 1 of 15
You scored
out of 15
Card 1 of 8
Click to reveal definition
🎉
All cards reviewed!
TermDefinition
🎯

Mini Test — Number Systems

10 questions · 10 minutes

← 4.13.1 Analysis & Design
34 of 70 · AQA 7517
4.5.2 Number Bases →