next up previous
Next: Floating Point Problems Up: nasty-nums Previous: nasty-nums

Fixed Point Problems

  1. Give three different base 10 interpretations of the bit string:


    \begin{displaymath}1101 \;\;\; 1001 \;\;\; 1000 \;\;\; 0001\end{displaymath}

  2. 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?

    1. 256.75
    2. 0.908
    3. -4099.125
    4. $0.0000\;\;\;0004$ (hint: multiply by 16 and accumulate integers)
    5. $-64.0000\;\;\;0004$

  3. 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.)

    1. $-12,598 - (0.908)$
    2. $-4099.125 + 4097.375$
    3. $1- 0.0000\;\;\;0004$
    4. $256.75 - 264.00$


next up previous
Next: Floating Point Problems Up: nasty-nums Previous: nasty-nums
MM Hugue 2004-09-08