Floating-Point Basics (Cambridge (CIE) A Level Computer Science): Revision Note
Exam code: 9618
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 |
|
Exponent |
|
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:
01for positive numbers10for 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
Shift the binary point until the mantissa begins with
01(positive) or10(negative)Adjust the exponent by the number of shifts:
Moving left → increase exponent
Moving right → decrease exponent
Example
Before normalisation:
Mantissa =
00011Exponent =
0010(+2)
Process:
Shift binary point 2 places right → mantissa =
01100Decrease exponent by 2 → exponent =
0000
After normalisation:
Mantissa =
01100Exponent =
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ⁿ, not1.xxxxx × 2ⁿ(that’s IEEE)
Unlock more, it's free!
Did this page help you?