Topic Three (1.3): Floating-point Numbers, Representation and Manipulation

Introduction Icon.png Introduction

Many students learn how to store integer numbers as young as 11 years old now. However, storing real numbers – with a decimal point – is a little trickier.

There are two methods covered in this book. In fixed-point you work in exactly the same way as you do for an integer, but when writing out your binary headings you count right from the 1, halving each time.

Floating-point is a little trickier still, as you have to use the exponent to move the binary point into the right position, before working out the answer just like fixed-point.

The good thing is, with a little practise it really isn’t that difficult – but this really is an area where you do want to practise!

Watch Icon.png Watch

WATCH - Binary 3 – Fixed-point Binary Fractions (YouTube) Links to an external site. This video discusses fixed-point binary notation.

WATCH - Binary 4 – Floating-point Binary Fractions 1 (YouTube) Links to an external site. This video introduces you to floating-point binary notation. Note that the ‘bouncing’ method of moving the binary point can often count as valid working in an exam.

WATCH - Binary 5 – Floating-point Range Versus Precision (YouTube) Links to an external site. This video discusses range and precision; it’s important to know that a real number is often at best an approximation of the value it is attempting to represent.

WATCH - Binary 6 – Normalised Floating-point Binary Fractions (YouTube) Links to an external site. This video discusses normalisation – the way floating-point binary numbers are adjusted to make best use of the space available.

Read & Make Notes Icon.png Read and Make Notes

Read pages 320 to 325 of your textbook. Complete the questions and tasks within the text as you go.

CHECK – Module 1 Textbook Answers Download CHECK – Module 1 Textbook Answers

Skills Icon.png Tasks

Complete the following:

  • Use a sheet of A4 paper to create flow-charts to convert a fixed-point and a floating-point binary number to a decimal number.
  • Give the flow charts to someone else to follow and see if they can get the right answer to some of the model questions in the book.
  • If they can, great, you’ve got an amazing revision tool!

Read Icon.png Further Reading

READ - Computer Memory (The Vienna University of Economics & Business) Links to an external site. This is an interesting page on data storage, including real numbers. Have a good read through it.

 Stretch Icon.png Extended Learning

READ - Python Math Exercise 31 (w3resource) Links to an external site.This page has code for converting a binary number to decimal. Using this as a basis, program a solution to convert a fixed-point, and then a floating-point, binary number into decimal.

Review Icon.png End of Topic 3 Review

Complete exam-style questions 3 and 5 on pages 326 to 327.

CHECK – Module 1 Exam-style Answers  Download CHECK – Module 1 Exam-style Answers 

Top Tip Icon.png Top Tips

Ensure that you understand the following before moving on to the next topic.

  • Fixed-point binary points don’t move; you will always be told where they are.
  • With floating-point numbers, you will always be told how large the mantissa and the exponent are.
  • Both mantissa and exponent are 2’s complement (so may be positive or negative) unless you are told otherwise.
  • Always show working – you may get the answer wrong but still gain marks!

Glossary Icon.png Key Terms

Add the following subject vocabulary to your glossary. Write the definitions in your own words to embed understanding.

  • Fixed-point
  • Floating-point
  • Mantissa
  • Exponent
  • Precision
  • Normalisation

Consolidate Icon.png Consolidate

Extend your understanding by working through these additional resources/tasks:

  • There are alternative methods of storing real numbers including IEEE-754. Have a look at the alternatives and see if you can work out why the exam boards have used the method they have.

Worksheet Icon.png Assignment

When you have completed all the activities and are fully prepared and feel confident with the material, you should complete Assignment One and submit it to your tutor via Canvas for marking and feedback.