question archive Decode the following bit patterns using the floating-point format discussed in the text: a
Subject:Computer SciencePrice:2.89 Bought3
Decode the following bit patterns using the floating-point format discussed in the text:
a. 01001010
b. 01101101
c. 00111001
d. 11011100
e. 10101011
The sign is stored in bit 8. The exponent can be computed from bits 5-7 by subtracting 3. The mantissa (also known as significant or fraction) is stored in bits 1-4. An invisible leading bit (i.e. it is not actually stored) with value 1.0 is placed in front, then bit 4 has a value of 1/2, bit 3 has value 1/4, bit 2 has value 1/8, and bit 1 has value 1/16.
a. 0 101 1001
sign: 0 (+ve number.)
exp: 101 = 5-3 = 2.
mant: 1.1001.
Therefore: 1.1001 * 22 = 110.012 = 22+21+2-2 = 6.25.
b. 1 100 1000
sign: 1 (-ve number.)
exp: 100 = 4-3 = 1.
mant: 1.1000.
Therefore: 1.1000 * 21 = 11.0002 = 21+20 = -3.
c. 1 010 1100
sign: 1 (-ve number.)
exp: 010 = 2-3 = -1.
mant: 1.1100.
Therefore: 1.1100 * 2-1 = 0.111002 = 2-1+2-2+2-3 = -0.875.
d. 0 011 1001
sign: 0 (+ve number.)
exp: 011 = 3-3 = 0.
mant: 1.1001.
Therefore: 1.1001 * 20 = 1.10012 = 20+2-1+2-4 = 1.5625.