Floating-Point Basics (Cambridge (CIE) A Level Computer Science): Revision Note

Exam code: 9618

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Updated on

Floating-point binary

What is floating-point binary?

  • Floating-point binary is a method of representing real numbers in binary, including fractions and very large or very small values

  • Uses scientific notation in base-2

  • Unlike fixed-point (where the binary point is fixed), the binary point can “float” using a mantissa and an exponent

Why use floating-point?

  • Can represent a much wider range of numbers

  • Provides more precision for fractional values

  • Makes efficient use of limited storage (e.g. 8-bit, 16-bit representations)

Components of floating-point

Component

Description

Mantissa

  • Holds the significant digits of the number

  • The first bit is the sign (0 = +, 1 = −)

  • The remaining bits are the fraction

Exponent

  • Shows how far to move the binary point (positive = right, negative = left)

  • Stored in two’s complement (unbiased)

Example in decimal

3.14 × 10³

  • Mantissa = 3.14

  • Exponent = 3

Example in binary

110.01₂ = 0.11001 × 2³

  • Mantissa = 011001… (sign 0, fraction 11001 padded to available bits)

  • Exponent = 0011 (+3 in two’s complement)

Positive floating-point representation

  • Sign bit = 0

  • Fraction part stored in the remaining mantissa bits

  • Exponent shifts the binary point

Negative floating-point representation

  • Sign bit = 1

  • Fraction part stored in the remaining mantissa bits

  • Exponent is in two’s complement

  • Example:

    • −6.25 = 110.01₂ = 0.11001 × 2³

    • Mantissa = 111001000000 (sign = 1, fraction = 11001 padded)

    • Exponent = 0011

Normalising floating-point numbers

  • A floating-point number is normalised when the mantissa begins with:

    • 01 for positive numbers

    • 10 for negative numbers

Why normalise?

Reason

Explanation

Consistency

All numbers follow the same structure

Precision

Leading zeros removed so mantissa makes full use of available bits

Easier processing

Arithmetic and comparisons are simpler

Steps to normalise a floating-point number

  1. Shift the binary point until the mantissa begins with 01 (positive) or 10 (negative)

  2. Adjust the exponent by the number of shifts:

    • Moving left → increase exponent

    • Moving right → decrease exponent

Example

  • Before normalisation:

    • Mantissa = 00011

    • Exponent = 0010 (+2)

  • Process:

    • Shift binary point 2 places right → mantissa = 01100

    • Decrease exponent by 2 → exponent = 0000

  • After normalisation:

    • Mantissa = 01100

    • Exponent = 0000

Examiner Tips and Tricks

  • Remember: mantissa sign = first bit, not two’s complement

  • Only the exponent uses two’s complement

  • In CIE questions, always write mantissas as 0.xxxxx × 2ⁿ, not 1.xxxxx × 2ⁿ (that’s IEEE)

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

James Woodhouse

Reviewer: James Woodhouse

Expertise: Computer Science & English Subject Lead

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.