Last modified on 6 November 2014, at 09:39

Real Numbers: Normalisation

UNIT 3 - ⇑ Real Numbers ⇑

← Floating point numbers Normalisation Errors →


When storing numbers we need to use the space we are given in the most efficient way. For instance if we take a denary floating point number such as

 6.63_{10} \times 10^{-34} (Planck's constant)

If we were to rewrite it as:

 0.0663_{10} \times 10^{-32} (Planck's constant)

Then you can see the representation takes up an extra 2 characters, the two extra 0's, even though it represents exactly the same number. This may be acceptable when you are not worried about how many characters a number makes up, but in binary and with limited computer memories, the space that numbers take up is very important. We need the most efficient representation we can. With a fixed number of bits, a normalised representation of a number will display the number to the greatest accuracy possible. In summary normalised numbers:

  • Give only one representation of a number
  • Save space
  • Give the most accurate representation of a number in a given number of bits

As a rule of thumb: when dealing with Floating point numbers in binary you must make sure that the first two bits are different. That is:

0.1
1.0

And most definitely NOT

1.1
0.0

Let's look at an example. Taking a binary floating point number:

0.010\;0000\;00\;\mid\;00\;0011

We can see that the number starts with 0.01. We need to change this to 0.1 for it be normalised. To do this we need to move the decimal place one position to the right, and to retain the same number represented by the unnormalised number we need to change the exponent accordingly. With a movement one place right to normalise the number we need to change the exponent to move the decimal point one place left to compensate. Thus subtracting one from the current exponent:

0.100\;0000\;00\;\mid\;00\;0010

To make sure you have normalised it correctly, check that

0.010\;0000\;00\;\mid\;00\;0011 = 0.100\;0000\;00\;\mid\;00\;0010

Lets try a more complicated example:

1.110\;0000\;00\;\mid\;11\;1110

To get the mantissa normalised we need to move the decimal point two places to the right. To maintain the same value as the original floating point number we need to adjust the exponent to be two smaller.

1.000\;0000\;00\;\mid\;11\;1100

Now check that the new normalised value has the same value as the original.

Summary: Normalising numbers
  1. Normalise the left hand side (mantissa).
  2. Record the number of ‘bounces’ it has taken to normalise
  3. Work out the exponent of the normalised number by using: original exponent – ‘bounce’
  • Normalised numbers start with 2 bits that are different
  • Make sure that your normalisation does not change the sign of the mantissa
  • Normalisation provides the maximum precision for a given number of bits
  • Normalisation makes sure there is only one representation for each number
Exercise: Normalisation Questions

Are the Following numbers normalised?

0.010000000 111111

Answer :

No, as it starts with 0.0

0.111111000 111111

Answer :

Yes, as it starts with 0.1

1.100000010 111111

Answer :

No, as it starts with 1.1

Normalise the following numbers:

0 010000000 111111

Answer :

  1. 0.010000000 111111 -> 00.10000000 111111
  2. One place to the right
  3. 111111 - 1 = -1 -1 = -2 = 000010 (+2) = 111110 (-2)
00.10000000 111110 = 0.100000000 111110

0 001101000 000110

Answer :

  1. 0.001101000 000110 -> 000.1101000 000110
  2. Two places to the right
  3. 000110 - 2 = 6 - 2 = 4 = 000100 (+4)
000.1101000 000100 = 0.110100000 000100

1 111111010 000011

Answer :

  1. 1.111111010 000011 -> 1111111.010 000011
  2. Six places to the right
  3. 000011 - 6 = 3 - 6 = -3 = 111101 (-3)
111111.010 111101 = 1.01000000 111101