Real numbers — AQA A-Level Computer Science
Test yourself on Real numbers with AQA A-Level practice questions.
7 days Premium · Then free forever · No card, no charge
Your focus
- Be familiar with the concept of a real number and the set ℝ of real numbers, which includes the natural numbers, the rational numbers and
Real numbers exam tips
Quick Revision Summary (Key Takeaway)
In AQA A-Level Computer Science, real numbers are represented using either fixed-point or floating-point binary notations using two's complement for signed values. Floating-point representation divides bits into a mantissa and an exponent to provide a significantly larger dynamic range, requiring normalisation to maximise precision and eliminate redundant representations.
Topic Overview
The representation of real numbers covers how fractional and non-integer values are digitally encoded in computer systems using fixed-point and floating-point systems. Students explore the structural trade-offs between dynamic range and numerical precision, alongside the mechanics of two's complement encoding for both the mantissa and exponent.
Understanding real number systems is essential for hardware design, numerical computing, and software development where precision loss, rounding errors, overflow, and underflow can result in critical software failures. It connects foundational binary arithmetic to high-level computer architecture and algorithmic complexity.
Key Concepts
- →Fixed-point binary allocates a predefined number of bits to the integer and fractional parts, resulting in constant absolute precision across its entire range.
- →Floating-point representation uses a mantissa (fractional component) and an exponent (scale factor), allowing a wide dynamic range at the cost of varying absolute precision.
- →Normalisation ensures that every real number has a single, unique representation and maximises numerical precision by avoiding leading redundant bits ('00' for positive, '11' for negative).
- →Absolute error is the magnitude of difference between the actual value and its binary representation, whereas relative error measures this error as a proportion of the actual value.
Examiner Tips
- 💡When shifting during floating-point normalisation, write out the bit shifts step-by-step: each left shift of the mantissa requires subtracting 1 from the exponent.
- 💡Always state whether an exponent is represented in standard two's complement or excess/biased notation, as specified in the question stem (AQA standard is two's complement).
- 💡Remember that the binary point in an AQA normalised mantissa sits immediately between the sign bit and the first magnitude bit (e.g. 0.1... or 1.0...).
Common Mistakes
- Assuming floating-point numbers have higher precision than fixed-point: Floating point has a vastly larger dynamic range, but a fixed-point system of the same bit length can have higher absolute precision for values within its limited range.
- Believing normalisation only applies to positive numbers: Negative numbers must also be normalised, and students frequently forget they must begin with '10' in two's complement.
- Thinking all real numbers can be represented exactly: Decimal fractions with denominators containing prime factors other than 2 (such as 0.1 or 0.2) generate recurring binary expansions and cannot be represented exactly in binary.
Revision Plan
- 1Day 1-2: Master fixed-point binary conversions, calculating range, precision, and two's complement fractions.
- 2Day 3-4: Practice converting unnormalised floating-point numbers to denary values and vice versa.
- 3Day 5: Drill normalisation techniques for both positive ('01') and negative ('10') values, tracking exponent changes.
- 4Day 6-7: Complete past exam questions focused on calculating absolute and relative errors, overflow, and underflow.
Exam Question Types
- 📋Direct conversion: Convert a binary floating-point representation (e.g. 10-bit mantissa, 6-bit exponent) into denary.
- 📋Normalisation problems: Take an unnormalised binary float, normalise it, and update the exponent.
- 📋Error analysis: Calculate absolute and relative errors when a given decimal fraction is stored in fixed-point or floating-point format.
- 📋Comparative essay/discussion: Compare fixed-point and floating-point systems in real-time embedded environments (e.g. digital signal processors).
Command Word Expectations (AQA)
Show full mathematical working, step-by-step binary shifts, and state the final result clearly with appropriate units or signs.
Identify a specific operational mechanism (e.g. how normalisation prevents precision loss) and link it logically to the resulting effect or reason.
Provide balanced points detailing similarities, differences, advantages, and limitations of two approaches (such as fixed-point vs floating-point).
How Students Lose Marks (Examiner Pitfalls)
Step-by-Step Worked Solutions
Question: A real number is stored in an 8-bit mantissa and a 4-bit exponent, both in two's complement. Normalise the unnormalised floating-point value: Mantissa = 0000 1100, Exponent = 0101, and then determine its final denary value.
- 1.Step 1: Check the sign bit of the mantissa. The most significant bit is 0, so the number is positive. A normalised positive mantissa must begin with '01'.
- 2.Step 2: Shift the mantissa left until the first two bits are '01'. The mantissa is currently '0000 1100'. Shifting left by 3 positions gives '0110 0000'.
- 3.Step 3: Adjust the exponent to compensate for the left shifts. Shifting left by 3 positions multiplies the mantissa by 2^3, so we must subtract 3 from the exponent. The original exponent is 0101 (denary +5). New exponent = 5 - 3 = +2, which is binary 0010.
- 4.Step 4: Combine the normalised components: Mantissa = 0110 0000, Exponent = 0010.
- 5.Step 5: Calculate the denary value: Mantissa 0.1100000 = 0.5 + 0.25 = 0.75. Exponent 0010 = 2. Value = 0.75 * 2^2 = 0.75 * 4 = 3.0.
Question: A computer uses an 8-bit fixed-point representation with 4 integer bits and 4 fractional bits, using two's complement. Calculate the absolute error and relative error when approximating the denary value 3.6.
- 1.Step 1: Convert 3.6 to binary with 4 fractional bits (place values: 0.5, 0.25, 0.125, 0.0625). Integer part: 3 = 0011. Fractional part: 0.6 = 0.5 (0.1) + 0.0625 (0.0001) = 0.5625 (binary 0.1001). Adding another 0.0625 gives 0.625 (binary 0.1010).
- 2.Step 2: Compare representations to target 3.6: 0011.1001 = 3.5625 (difference 0.0375). 0011.1010 = 3.6250 (difference 0.0250). The closest representation is 0011.1010 = 3.625.
- 3.Step 3: Calculate absolute error: |Target - Stored| = |3.6 - 3.625| = 0.025.
- 4.Step 4: Calculate relative error: Absolute Error / Target = 0.025 / 3.6 = 1/144 = 0.00694 (or 0.694%).