Floating point binary A Level Computer Science
Floating point binary A Level Computer Science
FLOPS,
& HALF/FULL ADDERS
LET’S RECAP!
KARNAUGH MAPS
KARNAUGH MAPS
0 1 0 1 0 1
A A A
B B B
0 0 0
1 1 1
A XOR B A AND B OR NOT NOT A AND (NOT B OR A)
B
AB 00 01 11 10
1
NOT C OR (NOT A AND NOT
KARNAUGH MAPS
AB 00 01 11 10 AB 00 01 11 10
CD CD
00 00
01 01
11 11
10 10
NOT (C OR D) AND (NOT A OR (NOT A OR NOT D) OR NOT (B AND
B) C)
NOT B KARNAUGH MAPS
0 1 0 1 0 1
A A A
B B B
0 1 1 0 1 0 0 1 1
1 0 0 1 0 1 1 0 1
AB 00 01 11 10 AB 00 01 11 10
CD CD
00 1 1 1 1 00 1 1 1 1
01 0 0 0 0 01 1 1 1 1
11 0 0 1 1 11 0 1 1 0
10 0 0 1 1 10 0 0 1 0
KARNAUGH MAPS
AB 00 01 11 10 AB 00 01 11 10
CD CD
00 0 1 1 1 00 1 0 1 1
01 0 1 1 1 01 1 0 1 1
11 1 0 1 1 11 0 1 1 0
10 0 0 1 1 10 0 0 1 0
FLOATING POINT BINARY
Why might we want to use more bits for the mantissa than the
exponent or vice versa?
FLOATING POINT BINARY
Mantissa
Indicates whether the number is going to be positive or
negative
More mantissa bits will give more precision
Exponent
Will decide the magnitude of the number
Will decide if the number is a fraction or not
More exponent bits give larger range
FLOATING POINT BINARY
When converting floating point binary to denary – get into good habits and follow these
steps:
1. First write down if the answer is going to be positive or negative by looking at the
Mantissa
2. Convert the Exponent to Decimal using 2s complement (MSB negative)
3. Write down the decimal value of the exponent.
4. If the exponent is positive we move the binary point to the right – increasing the
magnitude, if the exponent is negative we move the binary point to the left – decreasing
the magnitude.
5. Move the binary point to the correct position. Label the bits with their values
remembering 2s complement so MSB is negative.
6. Add up the valuesMantissa
as standard Binary to Denary conversion.Exponent
7. Check your final answer is positive or negative as expected! 0110
0.1011101
0.1100000 1111
1.0111011 0011
1.0110000 1110
Watch out for: Take care when adding fractions to a negative number!
DECIMAL TO FLOATING POINT BINARY
1. Check how many bits the exam paper wants you to use for the
mantissa and the exponent!
2. Write the number using 2s complement (MSB negative).
3. Ensure the number begins 01 (positive) or 10 (negative).
4. Count how many places you need to move the binary point to
create the correct number.
5. Write this value the correct number of bits for the exponent in 2s
complement.
DECIMAL TO FLOATING POINT BINARY
1. Check how many bits the exam paper wants you to use for the
mantissa and the exponent!
2. Write the number using 2s complement (MSB negative).
3. Ensure the number begins 01 (positive) or 10 (negative).
4. Count how many places you need to move the binary point to
create the correct number.
5. Write this value the correct number of bits for the exponent in 2s
complement.
CONVERT THE FOLLOWING DECIMAL NUMBERS INTO FLOATING POINT BINARY
USING AN 8BIT MANTISSA AND 4 BIT EXPONENT
a) 22.25
b) 16.75
c) -12.5
d) -0.25
e) -31.5