Study Guide

Binary representation of real numbers

CIE A-Level Computer ScienceΒ· Unit 1: Information RepresentationΒ· 45 min read

1. Fixed-Point Binary Representationβ˜…β˜…β˜†β˜†β˜†β± 10 min

Fixed-point binary assigns a fixed number of bits to the integer part and a fixed number of bits to the fractional part of a real number. The binary point separates the two parts, just like a decimal point in base 10, with each position right of the point holding a negative power of 2 weight.

πŸ“˜ Definition

Binary Point

A separator that divides the integer part (left) from the fractional part (right) of a binary real number. Weights for positions right of the point are

Example:

For 0.101, the value is

πŸ“ Worked Example

Convert decimal 6.625 to 8-bit fixed-point binary, with 5 integer bits and 3 fractional bits

  1. 1

    Split the number into integer (6) and fractional (0.625) parts, convert each separately

  2. 2

    Convert integer 6 to 5-bit binary:

  3. 3
    6=110=001106 = 110 = 00110
  4. 4

    Convert 0.625 by repeated multiplication by 2, taking the integer part of each result:

  5. 5
    0.625Γ—2=1.25β†’10.25Γ—2=0.5β†’00.5Γ—2=1.0β†’10.625 \times 2 = 1.25 \rightarrow 1 \\ 0.25 \times 2 = 0.5 \rightarrow 0 \\ 0.5 \times 2 = 1.0 \rightarrow 1
  6. 6

    Combine the parts, with the binary point after the 5th bit:

  7. 7

    Final 8-bit representation (removing the point for storage): 00110101

Exam tip:

Always confirm how many bits are assigned to each part in the question, do not mix up integer and fractional bit counts.

2. Floating-Point Binary and Normalisationβ˜…β˜…β˜…β˜†β˜†β± 15 min

Floating-point binary is similar to scientific notation in base 10. It splits a real number into two parts: the mantissa (which stores significant digits) and the exponent (which stores the position of the binary point). This allows for a much larger range of values than fixed-point for the same total number of bits.

πŸ“˜ Definition

Normalised Floating-Point

A standardised format for floating-point binary that removes redundant leading bits to maximise precision, and ensures one unique representation per value. For two's complement mantissas, the first two bits must be different.

πŸ“ Worked Example

Normalise 001010 101 (6-bit mantissa, 3-bit exponent, both two's complement)

  1. 1

    Original mantissa: 001010. First two bits are both 0, so it is not normalised.

  2. 2

    Shift mantissa left by 1 place, which moves the binary point right by 1. We decrease the exponent by 1 to compensate.

  3. 3

    Shifted mantissa: 010100. Original exponent 101 = -1 in 3-bit two's complement.

  4. 4

    New exponent: -1 - 1 = -2 = 110 in 3-bit two's complement.

  5. 5

    Check: first two bits of mantissa 01 are different, so correctly normalised.

  6. 6

    Final normalised value: mantissa 010100, exponent 110

3. Conversion Between Decimal and Normalised Floating-Pointβ˜…β˜…β˜…β˜…β˜†β± 20 min

To convert a decimal real number to normalised floating-point, you first convert it to plain binary, adjust it to normalised form, then split it into mantissa and exponent to match the required bit lengths. To convert back, reverse the process.

πŸ“ Worked Example

Convert 10.25 to normalised floating-point with 8-bit mantissa and 4-bit exponent (both two's complement)

  1. 1

    Convert 10.25 to plain binary:

  2. 2

    Rewrite in normalised form: move binary point after the first bit:

  3. 3

    Fill 8-bit two's complement mantissa with significant bits: 0 1 0 1 0 0 1 0 β†’ 01010010

  4. 4

    Write exponent 3 as 4-bit two's complement: 0011

  5. 5

    Check normalisation: first two bits 0 and 1 are different, so valid. Final result: 01010010 0011

βœ“ Quick check

Test your conversion understanding:

  1. What is the decimal value of normalised 100100 010 (6-bit mantissa, 3-bit exponent, both two's complement)?

    • -1.75

    • -2.25

    • 3.5

    • -0.75

    Reveal answer
    -1.75 β€”

    Correct: Mantissa 100100 = -0.875, exponent 010 = 2, so

4. Range and Precision Trade-offβ˜…β˜…β˜…β˜†β˜†β± 10 min

The number of bits allocated to the mantissa and exponent directly impacts two key properties of any floating-point system: the range of values that can be stored, and the precision of those stored values.

πŸ“˜ Definition

Range and Precision

Range is the span from the smallest (most negative) to largest (most positive) value that can be stored. Precision is how closely the stored binary value matches the original real value, determined by the number of significant bits available.

πŸ“ Worked Example

Compare two 16-bit floating-point systems: System A (10-bit mantissa, 6-bit exponent) and System B (12-bit mantissa, 4-bit exponent). Which has larger range? Which has higher precision?

  1. 1

    Range is determined by the length of the exponent. System A has a longer exponent, so it can store a larger range of values.

  2. 2

    Precision is determined by the length of the mantissa. System B has a longer mantissa, so it can store values with higher precision and smaller rounding errors.

5. Common Pitfalls

Wrong move:

Treating the exponent as an unsigned value when it is stored as two's complement

Why:

Most CIE questions use two's complement for both mantissa and exponent, so unsigned exponent gives an incorrect final result

Correct move:

Always confirm if the exponent is signed or unsigned, and convert it to the correct signed decimal before calculating the final value

Wrong move:

Adjusting the exponent in the wrong direction when normalising

Why:

Shifting the mantissa left by 1 moves the binary point right by 1, so the exponent must decrease, not increase

Correct move:

After normalising, convert your final value back to decimal to confirm it matches the original number

Wrong move:

Incorrect normalisation for negative two's complement mantissas, accepting leading 11 as valid

Why:

Students expect leading 1 for negative values, but normalisation requires the first two bits to be different

Correct move:

Follow the mnemonic: 01 for positive, 10 for negative, all other starting pairs are unnormalised

Wrong move:

Swapping range and precision when describing the effect of changing bit allocation

Why:

Students often confuse which bit length affects which property

Correct move:

Use the memory hook: Exponent = Extent (Range), Mantissa = Measurement (Precision)

Wrong move:

Forgetting to apply the negative sign of the mantissa when converting back to decimal

Why:

Students often convert only the magnitude of the mantissa and drop the sign for negative values

Correct move:

Always check the leading bit of the mantissa first, and apply the correct sign to the final result

6. Quick Reference Cheatsheet

Concept

Key Rule

Fixed-point

Fixed bits for integer/fractional parts, limited fixed range

Floating-point

Split into mantissa (significant digits) and exponent

Normalisation (two's complement)

Positive = 01..., Negative = 10..., maximises precision

More exponent bits

Increases range of storable values

More mantissa bits

Increases precision of stored values

Decimal β†’ float steps

Convert to binary, normalise, split into mantissa + exponent

7. Frequently Asked

What is the difference between range and precision?

Range describes the smallest and largest values that can be stored in a given format. Precision describes how close a stored binary value is to the original real decimal value. Longer exponents increase range; longer mantissas increase precision.

When this came up on past exams

AI-estimated based on syllabus patterns β€” cross-check with official past papers for accuracy. Use only as revision-focus signals.

  • 2022 Β· 11

    Decimal to float binary conversion

  • 2023 Β· 12

    Explain range vs precision trade-off

  • 2024 Β· 13

    Normalise a given floating point value

Going deeper

What's Next

Binary representation of real numbers is a core foundational topic for CIE 9618 Paper 1, regularly tested with conversion questions and short explanations of the range-precision trade-off. Mastery of normalisation and conversion rules is critical to scoring full marks on these common questions. This topic also underpins further study of computer arithmetic, data storage, and digital media representation, where real number values are commonly processed and stored in floating-point formats. Next, you will expand your knowledge of information representation to cover other common data types used in computer systems.