Next: Floating Point Problems
Up: nasty-nums
Previous: nasty-nums
- Give three different base 10 interpretations of the bit
string:
- Convert the following ``decimal fractions'' to 24-bit fixed point
equivalents, where the ``binary fraction'' is the lower
12 bits, and the ``binary
integer'' part is the upper 12 bits. The ``binary integer'' part is stored
as a sign magnitude number. You may give your answer in hexadecimal for
convenience. Also indicate which representations are exact, which are
approximations because of truncations, and which cannot be expressed
because of overflow. Is underflow present anywhere?
- 256.75
- 0.908
- -4099.125
-
(hint: multiply by 16 and accumulate integers)
-
- Express both operands in 32-bit fixed point, with 16 bits for
``binary integer'' part (including sign), and 16 bits for the ``binary
fraction'' part.
Then, perform the
indicated operations.
Remember,
subtraction is implemented by adding the 2's complement of the number
being subtracted.
(Hint: some of the numbers to be converted were used in previous problems.)
-
-
-
-
Next: Floating Point Problems
Up: nasty-nums
Previous: nasty-nums
MM Hugue
2004-09-08