Lab 1: Problems based on IEEE754 Floating Point Standard


In this lab, you will use the functions developed by you to convert between floating point numbers and their IEEE 32-bit representations to see how number representation has an impact on performing calculations on floating point numbers.

Problems


  1. Find the IEEE 32-bit floating point representation of the decimal number 32.675605.
  2. Convert the IEEE representation obtained in Problem 1 back into a decimal number using your ieeetofloat() function. Is the answer the same as 32.675605?
  3. What happens if you change the last two bits of the IEEE 32-bit representation of the number in Problem 1 to 11?
  4. Find the IEEE 32-bit floating point representation of the decimal number 326756.05.
  5. Find the IEEE 32-bit floating point representation of the decimal number 326756.075. What did you find when you compare it with the answer from the previous question?
  6. What happens if you change the last two bits in the IEEE representation of the number 326756.0 to 01? Can you calculate it without using a program or the conversion function?
    Hint: what is the smallest difference that you can get when dealing with numbers such as 326756.05? How big is this number as a power of 2?


THE END


In [ ]: