A floating-point number is stored as a mantissa and an exponent, both in two's complement, just like scientific notation in binary. Learn the format, then convert confidently in both directions, including negative mantissas and negative exponents.
A floating-point number is stored as mantissa × 2exponent. The mantissa holds the significant digits and the exponent says how many places the binary point moves. In 9618 both are in two's complement, and the binary point sits just after the first bit of the mantissa, so the mantissa's place values are −1, ½, ¼, 1/8 and so on. A positive exponent moves the point to the right (a bigger number); a negative exponent moves it to the left (a smaller number). With the same number of bits, floating point gives a far wider range than fixed point.
Fig. 1: an 8-bit mantissa and 4-bit exponent representing 5.5
Section 01
The format.
In fixed point the binary point is in the same place for every number, so a few bits give either a small range or poor precision. Floating point stores where the point is as a separate number, the exponent. Both parts use two's complement, so revise it in the lab first: the leftmost bit has a negative place value.
Part
Bits in the examples
Place values
Meaning
Mantissa
8
−1 . ½ ¼ 1/8 1/16 1/32 1/64 1/128
the significant digits; first bit is the sign
Exponent
4
−8 4 2 1
an integer from −8 to +7: the power of 2
Value = mantissa × 2exponent.
A mantissa starting 0 is positive; starting 1 it is negative.
The exponent being negative makes the number small, not negative: only the mantissa sign makes the number negative.
Examiner trap
Do not treat the mantissa as a whole number. 01011000 is not 88: the point sits after the first bit, so it is 0.1011000 = 0.6875.
Section 02
Floating point to denary.
Work out the exponent first, then either move the binary point that many places or multiply the mantissa's value by the power of 2. Both methods earn the marks if your working is shown.
Step 1: exponent in two's complement, e.g. 0011 = +3, 1110 = −8 + 4 + 2 = −2.
Step 2: mantissa value using −1, ½, ¼, ...; e.g. 10100000 = −1 + ¼ = −0.75.
Step 3: multiply: −0.75 × 22 = −3.
Worked example Negative mantissa
Convert the floating-point number 10100000 0010 (8-bit mantissa, 4-bit exponent, both two's complement) to denary.
Exponent 0010 = +2.
Mantissa 1.0100000: place values −1 and ¼ are set, so the mantissa is −1 + 0.25 = −0.75.
Value = −0.75 × 22 = −0.75 × 4.
Check by moving the point 2 places right: 101.00000, and in two's complement 101 is −4 + 1 = −3.
Answer: −3
Worked example Negative exponent
Convert 01100000 1110 to denary.
Exponent 1110 = −8 + 4 + 2 = −2.
Mantissa 0.1100000 = ½ + ¼ = 0.75.
Value = 0.75 × 2−2 = 0.75 ÷ 4.
Check: move the point 2 places left, 0.0011 = 1/8 + 1/16 = 0.1875.
Four quick checks. Each correct answer earns XP and records this skill on your profile.
Quick check+10 XP
In the 9618 floating-point format, where is the binary point in the mantissa?
Quick check+10 XP
What is the denary value of the 4-bit two's complement exponent 1101?
Quick check+10 XP
What is the value of the mantissa 11000000?
Quick check+10 XP
What does 01000000 0001 represent?
Section 03
Denary to floating point.
Write the number in binary, then slide the point until the mantissa starts 0.1 (positive). The number of places moved is the exponent. For a negative number, find the positive mantissa first and take its two's complement.
Worked example Positive number
Show 13.25 as a floating-point number with an 8-bit mantissa and a 4-bit exponent.
13 = 1101 and 0.25 = .01, so 13.25 = 1101.01.
Move the point 4 places left to get 0.110101: so 13.25 = 0.110101 × 24.
Mantissa: 0.110101 padded to 8 bits = 01101010.
Exponent: +4 = 0100.
Answer: 01101010 0100
Worked example Negative number
Show −6.5 in the same format.
6.5 = 110.1 = 0.1101 × 23, so the positive mantissa is 01101000 and the exponent is 0011.
Two's complement of the mantissa: invert to get 10010111, then add 1 to get 10011000.
Negating a mantissa can leave it starting 11. For −4: 4 = 0.1 × 23, so 01000000 0011 negates to 11000000 0011, which is not normalised. Shift left once and reduce the exponent: the correct answer is 10000000 0010.
Stage 2 · Exam
Exam-style questions
Unlocks once the four checks above are done. Worth more XP, written to A Level Paper 3 and Paper 4 standard.
Finish the four checks above to unlock the exam questions
Exam style+20 XP
An 8-bit mantissa and 4-bit exponent are both in two's complement. What is the denary value of 01110000 0010?
Exam style+20 XP
Using the same format, what is the value of 10100000 0011?
Exam style+20 XP
Which is 2.75 in the same format?
Exam style+20 XP
Why is the exponent stored in two's complement?
Skill unlocked
Floating-point representation, mastered.
This skill is now recorded on your profile. Keep the chain going.