A-level Computer Science revision · Data representation

Floating-point representation

The idea

Floating-point numbers have a mantissa and an exponent, both often in two's complement. The exponent tells you how far to move the binary point in the mantissa. A normalised number starts 01 (positive) or 10 (negative), giving maximum precision for a given mantissa size.

  1. Find the exponent's value.
  2. Move the binary point in the mantissa that many places (right if positive).
  3. Convert the result to denary.

Watch out A normalised positive mantissa starts 0.1; a normalised negative one starts 1.0.

See it worked

Worked example

Mantissa 0.1100000, exponent 0011. Find the value.

  1. Exponent = 3.
  2. Move the point 3 right: 0110.0000.
  3. = 6.

Answer 6

Your turn

Question 12 marks

A number has mantissa 0.1010000 and exponent 0010 (both two's complement). What is its denary value?

Question 21 mark

Which mantissa is normalised?

Choose one
Question 31 mark

Why are floating-point numbers normalised?

Choose one

A-level Computer Science Pro, OCR H446

A-level Computer Science Pro

£119 once

Price rises to £199 on 1 January. Save £80 by joining before then.

At least 12 months of access

By paying you agree to our Terms and get access straight away, which ends your 14-day cancellation right.

No VAT is charged.

Independent practice for OCR A-level Computer Science (H446), not endorsed by OCR.

Privacy · Terms