Rational numbers — AQA A-Level Computer Science
A rational number is any value that can be expressed as the ratio of two integers a/b, where the denominator b is not equal to zero. In AQA A-Level Computer Science, understanding rational numbers is essential for evaluating binary representations, fixed-point and floating-point systems, and precision limits.
Rational numbers explained
This statement gives the defining property of the set ℚ: its members are exactly the numbers that can be written as fractions, meaning ratios of two integers.
Read the full explanation
A fraction a/b has an integer numerator a and a non-zero integer denominator b. The statement is a definition, so it is precise: a number belongs to ℚ if and only if such a representation exists. Examples include 1/2, −7/3 and 4, since 4 = 4/1. A number that cannot be expressed this way is not in ℚ. The square root of 2 is a standard example, because it is irrational. In multiple-choice questions you should be able to recognise whether a given number, expression or description matches this definition. The important words are integers, ratio and fraction, since any number built from these by division with integer parts is rational.
Your focus
- ℚ is the set of numbers that can be written as fractions (ratios of integers).
Which command word is this?
Provide a concise, factual answer without lengthy explanation or derivation (e.g. 'State the symbol used to denote the set of rational numbers').
Rational numbers exam tips
Topic Overview
Rational numbers (denoted by the set symbol Q) form a core component of the AQA A-Level Computer Science theory on number systems. They include all values that can be represented as an exact quotient of two integers, encompassing integers, terminating decimals, and recurring decimals.
Understanding rational numbers is fundamental when examining how computers process non-integer data. It links theoretical set theory directly to practical machine architecture, explaining why certain fractions cause precision errors and recurring patterns when converted into binary formats.
Key Concepts
- →Set Notation: Rational numbers are represented by Q, defined mathematically as {a/b : a, b in Z, b != 0}.
- →Decimal Equivalence: Every rational number converts to either a terminating decimal (e.g. 1/4 = 0.25) or a repeating recurring decimal (e.g. 1/3 = 0.333...).
- →Base Dependence: A rational number that terminates in base 10 may recur infinitely in base 2 if its denominator is not a power of two.
- →Set Hierarchy: Natural numbers (N) are a subset of Integers (Z), which are a subset of Rational numbers (Q), which are a subset of Real numbers (R).
Marking Points
- States that ℚ consists of numbers expressible as a/b with a and b integers and b ≠ 0.
- Recognises that ℚ is defined by the existence of an integer fraction representation, not by how the number looks as a decimal.
- Gives a valid member such as −7/3 or 4 and explains why it qualifies.
- Identifies a non-member such as √2 and states that it cannot be written as a ratio of integers.
Examiner Tips
- 💡When an option describes ℚ, check that it refers to ratios of integers, not simply to any real numbers or decimals.
- 💡Convert a decimal to a fraction to test rationality; a terminating decimal such as 0.25 gives 1/4.
- 💡Eliminate options containing irrational examples such as √2 or π when identifying members of ℚ.
- 💡Memorise standard set symbols: N for Natural, Z for Integers, Q for Rational, and R for Real. Use them explicitly in multi-part classification questions.
- 💡When explaining why a rational number cannot be represented exactly in binary, always mention that the denominator cannot be expressed purely as powers of two (2^-n).
Common Mistakes
- Assumes a number is rational only if it is written as a fraction on the page; correct by checking whether an equivalent integer ratio exists, for example 0.5 = 1/2.
- Accepts a decimal such as π as rational because it has many digits; correct by recognising that π is irrational as it has no integer ratio representation.
- Overlooks the non-zero condition on the denominator; correct by requiring b ≠ 0 in every fraction.
- Believing 0.1 and 0.2 are exact in binary: Students assume that because these are simple terminating fractions in decimal, they store precisely in binary, whereas they recur infinitely.
- Assuming all square roots are irrational: While sqrt(2) and sqrt(3) are irrational, expressions like sqrt(4) or sqrt(9/16) simplify to 2 and 3/4, which are rational.
- Confusing recurring decimals with irrational numbers: Students frequently classify numbers like 0.666... as irrational, even though any recurring decimal can be written as an integer fraction (e.g. 2/3).
Revision Plan
- 1Day 1: Review definitions and set notation for N, Z, Q, and R, practicing standard classification drills.
- 2Day 2: Practise converting base-10 rational fractions into binary fixed-point format to observe terminating versus recurring behaviour.
- 3Day 3: Work through past paper questions focused on round-off errors and precision limitations in floating-point systems.
- 4Day 4: Complete timed active recall questions on definitions, constraints (such as b != 0), and set hierarchy.
Exam Question Types
- 📋Classification tables: Identifying which number sets (N, Z, Q, R) apply to a given list of numeric values.
- 📋Short definition questions: Stating the formal mathematical definition and criteria for set Q.
- 📋Reasoning questions: Explaining why a specific rational decimal cannot be stored precisely in binary floating-point representation.
Command Word Expectations (AQA)
Provide a concise, factual answer without lengthy explanation or derivation (e.g. 'State the symbol used to denote the set of rational numbers').
Give the exact mathematical meaning, including all conditions (e.g. a/b where a and b are integers and b != 0).
Provide reasons and technical causes, such as explaining how base conversion causes recurring bit sequences and round-off error.
How Students Lose Marks (Examiner Pitfalls)
Step-by-Step Worked Solutions
Question: Categorise the following numbers into the most specific number set among Natural (N), Integer (Z), Rational (Q), and Real (R): -14, 0.375, sqrt(5), 19.
- 1.Step 1: Identify 19. It is a positive whole counting number, so its most specific set is the Natural numbers (N).
- 2.Step 2: Identify -14. It is a whole number with a negative sign, so its most specific set is the Integers (Z).
- 3.Step 3: Identify 0.375. It is a terminating decimal equal to 3/8, which is the ratio of two integers (3 and 8), so its most specific set is the Rational numbers (Q).
- 4.Step 4: Identify sqrt(5). Its decimal expansion is non-terminating and non-recurring, so it cannot be written as a ratio of integers; therefore, it is an irrational number and belongs to the Real numbers (R).
Question: Explain why the rational number 3/10 cannot be represented exactly in a standard 8-bit unsigned binary fixed-point system with 4 fractional bits. Calculate the absolute error.
- 1.Step 1: Convert 3/10 (0.3 in decimal) to binary fractional values using powers of two: 0.5 (2^-1), 0.25 (2^-2), 0.125 (2^-3), 0.0625 (2^-4).
- 2.Step 2: Calculate the closest binary approximation using 4 fractional bits: 0.25 + 0.00 + 0.0625 = 0.3125 (0.0101 in binary), or 0.25 (0.0100 in binary = 0.25).
- 3.Step 3: Select the closest representation: 0.0101 binary = 0.3125 decimal.
- 4.Step 4: Compute the absolute error: |0.3125 - 0.3000| = 0.0125. The fraction 3/10 has a denominator of 10 (prime factors 2 and 5), which produces an infinitely recurring sequence in base 2.