Data Representation Workbook
Data Representation Workbook
Numbers Outcome
1+0
0+1
1+1
0+0
What are the steps to successfully add two numbers together in Binary?
Binary Addition/Subtraction revision
Show the results of adding and subtracting the following numbers, Show your
working
BCD
How is it used?
Work out the sign and magnitude for the following numbers
-27
140
-99
46
2’s Compliment
How is it used?
Fixed point in binary is still has the point as in decimal, but now we have 1’s
and 0’s to deal with:
1010.1010
The stuff before the decimal point is easy, it’s 10, but what about the
numbering system after the decimal point?
Note down below the numbering system after the decimal point
1 0 1 0
Examples
10010 0010
Mantissa Exponent
What is the mantissa?
Explain the steps in order to convert the above number into a denary number
Exercises:
1.0010010
As with all computing it is a line of best fit. You can’t make every number in
the known floating point universe, why?
What is Overflow?
What is Underflow?
Normalisation is the process of moving the binary point so that the first digit after the
point is a significant digit. This maximises precision in a given number of bits.
To maximise the precision of a positive number you should
have a mantissa with no leading zeros.
This means that the first two digits will always be different in a
normalised floating point binary number.
You try:
1. Normalise the following positive numbers (10-bit mantissa and a 6-bit exponent)
:
2. Normalise the following negative numbers (10-bit mantissa and a 6-bit exponent)
:
1000 1100 0100 Separate out the exponent from the mantissa
mantissa exponent Originally this number is given in two’s complement Normalised Form
(most accurate representation possible for a given size of mantissa)
1000 1100 0100 Work out the exponent and write it down (you may get a
mark for this part!). NB: first bit of exponent (like
+4
mantissa) is the sign bit.
In normalise form the binary point always goes after the first significant
digit of the mantissa. This number represents 1.00011 x 24
1000 1100 0100 If the mantissa is negative then work out the complement
(swap 1’s and 0’s) and add 1
0111 0011 (complement)
1+ (add 1)
0111 0100