Floating Point Representation
Floating Point Representation
A normalised floating point representation uses an 8-bit mantissa and a 4-bit exponent,
both stored using twos complement format.
(a)
In binary, write the largest positive number that can be represented using this
normalised floating point system in the boxes below.
Mantissa
Exponent
(1 mark)
(b)
Mantissa
Exponent
Calculate the denary equivalent of the number, showing how you have arrived at your
answer.
Working: ..............................................................................................................................
............................................................................................................................................
............................................................................................................................................
Answer: ...............................................................................................................................
(2 marks)
(c)
Write the normalised floating point representation of the denary value 13.625 in the
boxes below. Space has been provided for you to do rough work.
Rough Work: ......................................................................................................................
............................................................................................................................................
............................................................................................................................................
Answer:
Mantissa
Exponent
(2 marks)
(d)
Write the normalised floating point representation of the denary value 0.34375 in the
boxes below. Space has been provided for you to do rough work.
Rough Work: ......................................................................................................................
............................................................................................................................................
............................................................................................................................................
Answer:
Mantissa
Exponent
(2 marks)
(e)
Explain what overflow is and give an example of a situation which might cause overflow
to occur.
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
(3 marks)
A normalised floating point representation uses an 8-bit mantissa and a 4-bit exponent,
both stored using twos complement format.
(a)
In binary, write in the boxes below, the smallest positive number that can be
represented using this normalised floating point system.
Mantissa
Exponent
(2 marks)
(b)
Mantissa
Exponent
Write the normalised floating point representation of the denary value 12.75 in the
boxes below. Space has been provided for you to do rough work, if required.
Rough Work: .....................................................................................................................
............................................................................................................................................
............................................................................................................................................
Answer:
Mantissa
Exponent
(2 marks)
(d)
(e)
Mantissa
Exponent
Mantissa
Exponent
Explain the effects of using the proposed alternative representation instead of the
existing representation.
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
(2 marks)
A normalised floating point representation uses a 7-bit mantissa and a 5-bit exponent,
both stored using twos complement format.
(a)
In binary, write the most negative number that can be represented using this
normalised floating point system in the boxes below:
Mantissa
(b)
Exponent
(2 marks)
Mantissa
Exponent
Calculate the denary equivalent of the number. Show how you have arrived at your
answer.
Working: ..............................................................................................................................
............................................................................................................................................
............................................................................................................................................
(1 mark)
Answer: ...............................................................................................................................
(1 mark)
(c)
Write the normalised floating point representation of the denary value 416 in the boxes
below. Show how you have arrived at your answer.
Working: .............................................................................................................................
............................................................................................................................................
............................................................................................................................................
(1 mark)
Answer:
Mantissa
Exponent
(1 mark)
(d)
Write the normalised floating point representation of the negative denary value -12.5 in
the boxes below. Show how you have arrived at your answer.
Working: .............................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
(2 marks)
Answer:
Mantissa
Mantissa
Exponent
Exponent
(1 mark)
(e)
Table 4 lists three different calculations that might cause an error to occur in a floating
point system.
Complete Table 4 by stating the name of the type of error that may occur for each
calculation. You should not give the same answer more than once.
Table 4
Calculation
Type of error
Four bit patterns that are stored in this computers memory are listed in Figure 3 and
are labelled with the letters A to D. Three of the bit patterns are valid floating point
numbers and one is not.
Figure 3
A
Mantissa
B
Exponent
Mantissa
D
Exponent
Mantissa
C
Exponent
Mantissa
Exponent
Complete Table 1 below. In the Correct letter (A-D) column write the appropriate
letter from A to D to indicate which bit pattern in Figure 3 is an example of the type of
value described in the Value description column.
Do not use the same letter more than once.
Table 1
Value description
A negative value.
The smallest positive value that can be represented.
A value that is not valid in the representation because it is not
normalised.
(3 marks)
(b)
Mantissa
Exponent
Calculate the denary equivalent of the number. Show how you have arrived at your
answer.
Working: .............................................................................................................................
............................................................................................................................................
............................................................................................................................................
(1 mark)
Answer: ..............................................................................................................................
(1 mark)
(c)
Write the normalised floating point representation of the negative denary value -7.75 in
the boxes below. Show how you have arrived at your answer.
Working: .............................................................................................................................
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
(2 marks)
Answer:
Mantissa
Exponent
(1 mark)
(d)
There can be a loss of precision when a denary number is stored using this floating
point system.
The closest possible representation of the denary number 6.9 is shown below.
Mantissa
Exponent
By converting this bit pattern back into denary it can be seen that the actual number
stored is 6.875, not 6.9.
(d) (i)
(d) (ii)
(d) (iii)
Explain how the floating point system used could be modified to allow a more accurate
representation of 6.9.
............................................................................................................................................
............................................................................................................................................
............................................................................................................................................
(2 marks)
A particular computer uses two 8-bit bytes to store floating-point values. One byte is
used to store the mantissa and the other is used to store the exponent.
(i) Write down, in binary form, the largest positive value that can be stored using this
representation.
[2]
(ii) Write down, in binary form the smallest magnitude, negative number that can be
stored in this representation.
[2]
(iii) The value 01101000 11111101 is stored as a floating-point number in this
computer.
State what denary number is being represented, explaining how you arrived at
your answer.
[4]
1
2
[2]
(ii) Rewrite the binary value of this floating-point representation so that it is in
normalised form.
[2]
(iii) 011001 0011 is a normalised floating-point number.
By converting each of the mantissa and the exponent into a denary number first,
write this number in denary.
[3]
[3]
(ii) The representation shown in part (d)(i) is normalised.
Explain why floating point numbers are normalised.
[1]
(iii) Show the binary pattern for the smallest positive number which can be stored
using a normalised 12-bit floating point representation.
Mantissa:
Exponent:
Denary:
[3]
(b) The developer of a new programming language decides that all real numbers will be
stored using 20-bit normalised floating point representation. She cannot decide how
many bits to use for the mantissa and how many for the exponent.
Explain the trade-off between using either a large number of bits for the mantissa, or a
large number of bits for the exponent.
[2]
[3]
(ii) Explain how you can recognise that the above pattern is normalised.
[1]
(iii) Show the binary pattern for the smallest negative number (negative sign and large
magnitude) which can be stored using a normalised 12-bit floating point
representation.
Mantissa:
Exponent:
Denary:
[3]
(a)
Byte 8
0
[3]
(ii) Without any working out, how can you recognise that this 16-bit pattern (Byte 7 and Byte
8) is a positive number?
[1]
(b) (i) Without any working out, how can you recognise that this 16-bit pattern (Byte 7
and Byte 8) is normalised?
[1]
(ii) Both of the representations shown below are not normalised.
Write in the empty rows the binary for the normalised form for the same value.
Mantissa
0
Exponent
0
Mantissa
1
Exponent
0
[3]
(c)
A change is made to use the two bytes as a 12-bit mantissa with a 4-bit exponent. Describe
the effect of this change on the values that can be represented, compared with the old use of
the two bytes.
[2]
Byte 2
0
[3]
(ii) How can you recognise that this 16-bit pattern (Byte 1 and Byte 2) is normalised?
[1]
(iii) The positive number 2.0 is to be represented as a normalised real number.
Show the mantissa and exponent for this value.
Mantissa
Exponent
[2]
(iv) What is the largest positive number that can be represented? Use the same 8-bit
mantissa and 8-bit exponent.
Show the mantissa and exponent.
Mantissa
Exponent
[2]
(b) An alternative representation is suggested using a 6-bit mantissa with a 10-bit exponent.
Describe the effect on the numbers which can be represented, compared to the 8-bit
mantissa and 8-bit exponent used earlier.
[2]
(a)
Mantissa
Exponent
(c)
0101.1000
101.1000
101.1
Mantissa
Exponent
Mantissa
1 mark for correct mantissa
1 mark for correct exponent
Exponent
2
(e)
Definition (2 marks):
The result of a calculation is too large to store/represent // a
number is too large to store/represent;
In the available number of bits / storage space (allow example
e.g. data type, byte, word, example of a data type); R space NE
Example (1 mark):
Multiplying two numbers together;
Dividing a number by a number less than one / small number;
R zero
A Adding two numbers (of same sign)
A When number converted from one type to another that does
not have suitable range/enough bits/enough storage space to
represent it
A Answers by example
MAX 1
(a)
Mantissa
(b)
0
0
1
Exponent
0
(c)
0
Mantissa
1 mark for correct mantissa
1 mark for correct exponent
(d)
Exponent
(e)
Reduced precision;
Increased range; A can represent larger/smaller numbers
No effect on amount of memory required to represent a number;
Max
2
(a)
1
1
1
1
Exponent
Mantissa
(b)
(c)
Mantissa
Exponent
(d)
Mantissa
Exponent
(e)
Calculation
Multiplying two very large numbers together.
Dividing a number by a very large number.
Adding together two numbers of very different
sizes e.g. a tiny number to a very big number.
Type of
Error
Overflow;
Underflow;
Cancellation;
(a)
C;
(c)
Mantissa
0
Exponent
If answer is correct and some working has been
shown, award three marks, even if working
would not have gained credit on its own.
Working marks can be awarded for work seen in
the final answer e.g. correct exponent.
(d)
(d)
(i)
(ii)
(d)
(iii)
Alternative
1:
Adjust the mantissa;
To use more bits;
A. "longer" for "more bits" but R. "larger",
"increase size"
Alternative 2:
Reallocate (one) bit; from the exponent to the
mantissa; A. bits
Alternative 3:
Infer one of the two bits on either side of the
binary point (from the other, as they must both
be different); use the freed up bit to store one
more significant digit in the mantissa// use the
freed up bit to represent mantissa more
accurately;
(i)
01111111 01111111
(1 per nybble)
byte)
[3]
[2]
[2]
(i)
[4]
[2]
[2]
[3]
(i)
+13
mark as follows:
Exponent: +4 // move the pattern four places
Mantissa: +13/16 // 0.1101
Answer: 13/16 24 // or equivalent
[3]
[3]
(i)
[Max 2]
88
mark as follows:
Exponent: +7 // move pattern 7 places
Mantissa: 11/16 // 1.0101
Answer: 11/16 27 // or equivalent
[3]
(ii) The mantissa/the binary pattern starts with 10 // the first two bits of the mantissa/the
binary pattern are different
[1]
(iii) Mantissa: 1000 0000
Exponent: 0111
Denary: 128 // 27 // 1 * 27
9 (a)(i)
(ii)
(b)(i)
[3]
[1]
(Normalised ) The mantissa/byte 7 starts with 01 / the first two bits are
different
[1]
(ii)
0
1
(c)
[3]
Mantissa
0
0
0
Mantissa
0
1
1
Exponent
0
1
0
Exponent
1
1
0
0
[MAX 3]
[2]
[3]
[1]
0
[2]
Mantissa
(iv)
0
Exponent
1
Mantissa
Exponent
1
(1)
(1)
[2]
[2]