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 small values

  • By using scientific notation in base-2

  • Unlike fixed-point binary (which has a fixed position for the binary point)

    • Floating-point binary allows the point to “float” by using a mantissa and an exponent

  • This allows:

    • Representation of very large and very small numbers

    • More precision for fractional values

    • Efficient use of limited storage (e.g. 8-bit, 16-bit)

Components of floating-point

Component

Description

Mantissa

Holds the significant digits of the number (like the digits in scientific notation)

Exponent

Indicates how far to move the binary point, by powers of 2

  • For example, in decimal:

3.14 × 10³
Mantissa = 3.14
Exponent = 3
  • In binary, floating point works the same way, but uses powers of 2:

1.11 × 2⁴ → Mantissa: 1.11, Exponent: 4

Representation in binary

  • A floating-point binary number typically includes:

    • A sign bit

    • A mantissa (binary digits with a fixed or implied binary point)

    • An exponent (with a sign, often using two’s complement)

  • Example using 8 bits:

  0       1001       0110  
[Sign] [Exponent] [Mantissa]

Positive floating-point representation

  • The MSB (most significant bit) is 0 → positive number

  • The exponent shifts the binary point right or left

  • Allows precision with fractional values

  • Benefit: Increased precision

  • Limitation: Lower maximum value compared to integer binary

Negative floating-point representation

  • Two’s complement is used for negative values

  • The MSB of the exponent or mantissa is used to indicate sign

  • The binary point is shifted using the (possibly negative) exponent

Example: Representing 6.25 in binary

  • Step 1: Convert the integer part (6) to binary

6 in binary = 110
  • Step 2: Convert the fractional part (0.25) to binary

    • Multiply by 2, keep the integer part, and repeat with the remainder:

0.25 × 2 = 0.50 → 0
0.50 × 2 = 1.00 → 1
  • So

0.25 in binary = 01
  • Step 3: Combine integer and fractional parts

6.25 in binary = 110.01

Normalising floating-point numbers

  • A floating point binary number is said to be normalised when the mantissa begins with 01 (for positive numbers) or 10 (for negative numbers)

  • This format ensures:

    • Maximum precision from the available bits

    • A consistent standard for binary arithmetic and comparisons

Why normalise?

Reason

Explanation

Consistency

Ensures all numbers follow the same structure

Precision

Removes unnecessary leading 0s to make full use of the mantissa

Easier processing

Simplifies comparison and arithmetic operations

Steps to normalise a floating-point number

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

  2. Adjust the exponent each time you move the binary point:

    • Moving the point leftincrease the exponent

    • Moving the point rightdecrease the exponent

Example

  • Before normalisation

    • Mantissa: 0.0011

    • Exponent: 0010 (which is +2 in binary)

  • Process

    • Shift binary point 2 places right to make mantissa start with 01

      • Mantissa becomes: 0.1100

      • Exponent is reduced by 2 → becomes: 0000 (which is 0 in binary)

  • After normalisation

    • Mantissa: 0.1100

    • Exponent: 0000

You've read 0 of your 5 free revision notes this week

Unlock more, it's free!

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

the (exam) results speak for themselves:

Did this page help you?

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.