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?
Step by Step Answer:
Digital Design and Computer Architecture
ISBN: 978-0123944245
2nd edition
Authors: David Harris, Sarah Harris