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
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?
Step by Step Solution
3.45 Rating (155 Votes )
There are 3 Steps involved in it
a 245 11110101 11110101 x 2 7 0 1000 0110 111 0101 0000 0000 ... View full answer
Get step-by-step solutions from verified subject matter experts
