7. Floating point (2)
A number is represented as an 8 bit floating point number. 5 bits are used as the mantissa and 3 bits are used as the exponent. Both the mantissa and the exponent are in twos complement.
The floating point number is 01100010
a) Show the floating point in its denary equivalent
b) What is the number in decimal?
Step 1. Break the floating point number into its two parts and place a decimal point in the mantissa between the most significant bit and the next one:
Mantissa is 0.1100 because the question states it uses the first 5 bits.
Exponent is 010
Both are positive binary numbers because they have a leading zero. So the mantissa in denary form is 1100 -> 12 denary
The exponent is 010 -> 2 denary
Step 2. Slide the decimal point of the mantissa by the exponent value i.e. 2 places to the right
The floating point numbers represents 11.00 binary
or +3.0 decimal
Copyright © www.teach-ict.com