Work individually, but I strongly recommend working with someone in the class nearby so you can help each other when you get stuck, with consideration to the course collaboration policy. Please send me email if something isn't clear and I will update the assignment. Changes are logged at the bottom of this page.
Notes:
Do not include the problem statement in your submission, just your answers. Or if you really want to include it, show it in a different font such as italics.
5 +-------+
a ------/-----| |
5 | | ?
b ------/-----| + |-----/------ out
5 | |
c ------/-----| |
+-------+
6 +--------+
mantissa ------/-----| float | ?
| to |-----/------ out
exp ------/-----| fixed |
3 +--------+
Keep the maximum possible number of bits from the input in the output mantissa. For example in base ten, 3.641 x 10^4 is much better than 0.036 x 10^6. Note that for some input values, the output may not be able to represent all bits in the input and it may be necessary to reduce the number of bits through rounding or truncation. Truncation is simpler, so use it for this problem. The output must never be denormalized.
+--------+ 3
7 | fixed |-----/----- mantissa
in ------/-----| to |
| float |-----/----- exp
+--------+ ?
a b c d
| | | |
| | | |
+--------+
| |
co --| 4:2 |-- ci
| |
+--------+
| |
| |
c1 s
inputs outputs
c | c c
a b c d i | o 1 s
-----------+-------
0 0 0 0 0 | 0 0 0
0 0 0 0 1 | 0 0 1
0 0 0 1 0 | 1
0 0 0 1 1 | 0
0 0 1 0 0 | 1
0 0 1 0 1 |
0 0 1 1 0 |
0 0 1 1 1 |
0 1 0 0 0 |
0 1 0 0 1 |
0 1 0 1 0 |
0 1 0 1 1 |
0 1 1 0 0 |
0 1 1 0 1 |
0 1 1 1 0 |
0 1 1 1 1 |
1 0 0 0 0 |
1 0 0 0 1 |
1 0 0 1 0 |
1 0 0 1 1 |
1 0 1 0 0 |
1 0 1 0 1 |
1 0 1 1 0 |
1 0 1 1 1 |
1 1 0 0 0 |
1 1 0 0 1 |
1 1 0 1 0 |
1 1 0 1 1 |
1 1 1 0 0 |
1 1 1 0 1 |
1 1 1 1 0 |
1 1 1 1 1 | 1 1 1
= 0 + 0 + 0 + 0 + 0 + 0
= 1 + 0 + 0 + 0 + 0 + 0
= 0 + 1 + 0 + 0 + 0 + 0
= 0 + 0 + 1 + 0 + 0 + 0
= 0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