This task is a text-based task but automatically checked. You are required to write your answers into solutions.txt by replacing the question marks with the correct solution. Please, do not change the structure of solutions.txt and be consistent with its syntax (comment-lines start with #)
Task
We examine the normalized binary representation of floating point numbers in the normalized floating point system F*(2,4,-3,3)
.
-
Convert the following decimal numbers to the normalized binary representation. For each number, choose the appropriate exponent
e
and round to the nearest value if you cannot represent the exact value. If the exact number falls exactly midway between two bracketing finite floating point representations, round to the number with an even least significant bit.0.75_{10}
3.1416_{10}
2.718_{10}
7_{10}
0.11_{10}
-
For each number of (2), convert the binary representation back to their decimal form, and determine the absolute rounding error of the conversion.
-
Calculate
2.718_{10} + 3.1416_{10} + 0.11_{10}
in the binary representation. What do you observe?
Note: The question of how to round floating point numbers is non-trivial. The IEEE standard lists 5 different modes of rounding of which we only mentioned the most common one at the beginning of this exercise. If you are interested to learn more, you can access the most recent standard through the ETH network.