Consider the following decimal numbers: 245 and 0.0625. (a) Write the two numbers using single-precision floating-point notation.

Question:

Consider the following decimal numbers: 245 and 0.0625.
(a) Write the two numbers using single-precision floating-point notation. Give your answers in hexadecimal.
(b) Perform a magnitude comparison of the two 32-bit numbers from part (a). In other words, interpret the two 32-bit numbers as two’s complement numbers and compare them. Does the integer comparison give the correct result?
(c) You decide to come up with a new single-precision floating-point notation. Everything is the same as the IEEE 754 single-precision floating-point standard, except that you represent the exponent using two’s complement instead of a bias. Write the two numbers using your new standard. Give your answers in hexadecimal.
(d) Does integer comparison work with your new floating-point notation from part (c)?
(e) Why is it convenient for integer comparison to work with floating-point numbers?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: