CS 473 - HW1

Floating Point

Due Wednesday, January 22, 2003, 9:30 AM

For this assignment, you need to show all your work. In particular, for the number base conversions you need to show the table you use for the conversion; for the floating point arithmetic you need to divide the numbers into sign-exponent-mantissa fields and manipulate the fields explicitly. Yes, I really mean it, and the TA will take points off if you don't do it.

  1. (32 points) Conversion from decimal to binary fractions.
    None of these result in a repetend.
    a) 0.125 b) 0.25 c) 0.625 d) 0.4375
  2. (32 points) Conversion from binary to decimal fractions.
    a) 0.0101 b) 0.1101 c) 0.111 d) 0.011
  3. (32 points) Floating Point Interpretation
    What are the values, in decimal, of the following IEEE floating point numbers?
    a) 42158000 b) c1990000 c) 00000000 d) bf800000
  4. (32 points) Conversion to Floating Point
    What is the IEEE floating point representation of the following decimal floating point numbers?
    a) 17.125 b) -11.375 c) 0.175 d) -31.5
  5. (64 points) Floating Point Arithmetic
    Perform the following arithmetic operations in IEEE floating point (use the algorithms as presented in class; don't convert to decimal, calculate the result, and convert back). Your final result should be an eight digit hexadecimal number
    a) 41250000 + c1120000 b) c0cc0000 - 40080000 c) 41250000 * c1120000 d) 41ec0000 / c1600000

Last modified: Mon Jan 13 08:54:38 MST 2003