Assignment 5
Due: 9:10am, at the start of class, Thu Oct 12th, 2006
Note: Make reasonable assumptions where necessary and clearly state them.
Each of the 7 problems is worth an equal number of points.
Feel free to discuss problems with classmates, but the only written material
that you may consult while writing your solutions are the textbook
and lecture slides.
You may hand in solutions on paper at the start of class. You may also hand in
homeworks electronically on one of the CADE Lab machines. Place your solution
in a text file called "homework5" (if you use a different file name, our
print script may not find it) and use the following command:
handin cs3810 hw5 homework5
Show all your steps in the following problems to get full credit. It is not
acceptable to simply use a calculator to compute the conversions.
-
- Convert the decimal numbers 17 into the following formats:
32-bit unsigned integer, 32-bit signed integer (also known as 2's
complement format).
- Convert the decimal number -14 into a 32-bit signed integer format.
- What decimal number is represented by the following binary 8-bit
unsigned integer representation: 1101 0010?
- What decimal number is represented by the following binary 8-bit
signed integer representation: 1101 0010?
- For the following two binary 8-bit signed integer numbers (also known as
2's complement format),
x = 1101 0010 and y = 0010 1101, show the steps involved in performing the
following computations:
-
- Represent the decimal number -20.45 in IEEE 754 binary single
precision floating-point format. (for the fraction field, only
show the first 10 bits and don't bother representing the
entire 23-bit field -- show steps)
- Represent the decimal number -20.45 in IEEE 754 binary double
precision floating-point format. (for the fraction field, only
show the first 10 bits and don't bother representing the
entire 52-bit field -- show steps)
- What decimal number is represented by the following IEEE 754
binary single precision floating-point number:
1 0010 1101 0101 0000 0000 0000 0000 000
- For the two IEEE 754 binary single precision floating-point numbers,
x = 1 0010 1101 0101 0000 0000 0000 0000 000 and
y = 1 0011 0000 0101 0000 0000 0000 0000 000,
show the steps involved in the following computations:
- Problem 4.9 (express your answer as a percentage improvement over the slower processor)
- Problem 4.11
- Problem 4.15 (express your answer as a percentage improvement over the slower processor)