2.88 Floating-Point III
★★
Problem:
Consider the following two 9-bit floating-point representations basesd on the IEEE floating-point format.
Format A
There is one sign bit.
There are k=5 exponent bits. The exponent bias is 15.
There are n=3 fraction bits.
Format B
There is one sign bit.
There are k=4 exponent bits. The exponent bias is 7.
There are n=4 fraction bits.
Below, you are given some bit patterns in Format at A, and your task is to convert them to the closest value in Format B. If rounding is necessary, you should round toward +∞. In addition, give the values of numbers given by the Format A and Format B bit patterns. Give these as whole numbers or as fractions.
Format A Bits | Format A Value | Format B Bits | Format B Value |
1 01110 001 | -9/16 | 1 0110 0010 | -9/16 |
0 10110 101 | 208 | 0 1110 1010 | 208 |
1 00111 110 | -7/1024 | 1 0000 0111 | -7/1024 |
0 00000 101 | 5/2^11 | 0 0000 0001 | 1/2^11 |
1 11011 000 | -2^12 | 1 1110 1111 | -208 |
0 11000 100 | 3*2^8 | 0 1111 0000 | +∞ |
Last updated