| Homework 4DetailsFor each problem make sure you clearly and neatly show all of your work!
Each part/problem is worth 5 points.
-
Add the floating-point numbers
00110101100001001000111110001000
and
00101101010110010010111111110100
by converting to fixed point, doing the appropriate shift, adding,
performing an appropriate shift (if necessary), and converting back to
floating-point.
- Let x = 1.23456×1012
and y = 9.87654×10-5.
- What is x+y?
(Compute it by hand or use something like WolframAlpha to compute the exact answer directly using this representation)
- If x and y where stored in 32-bit floating-point notation and
we computed x+y and stored the result in 32-bit floating point, what would the answer be and why?
(Hint: You should not have to actually do the conversion, but just enough work to justify what is happening.)
- Compute the sum
of the following 2 numbers that are represented in 12 bit two's complement:
111100001010 and
110011010111.
Clearly indicate whether or not overflow occurred and explain how you know.
|