Assignment-4 - ODU Computer Science

advertisement
CPS3340 - Computer Architecture
Assignment 4: Multiplication, Division, Floating Point
Due Date: 11/26/ 2013
Q1. Assume A = 50, B = 11
a) Using a table similar to that shown in Figure 3.7, calculate the product of unsigned 6-bit A
and B, (A*B), using the first version multiplication hardware described in Figure 3.4. (20 pts)
b) Using a table similar to that shown in Figure 3.11, calculate the division of unsigned 6-bit A
and B, (A/B), using the first version division hardware described in Figure 3.9. (20 pts)
Q2. Consider the following decimal numbers (20 pts)
63.25
146987.40625
a) Write down the binary representation of the decimal number, assuming the IEEE754 single
precision format.
b) Write down the binary representation of the decimal number, assuming the IEEE754 double
precision format.
Q3. Assuming single precision IEEE 754 format, what decimal number is represent by this word
(10 pts)
1 01111101 00100000000000000000000
Q4. Assume A=0.75, B=-10.125. By hand, calculate the product of the 4-digit binary of A*B.
Show your work. (Hint: see example on Slide #22, Floating Point lecture) (10 pts)
Q5. In a von Neumann architecture, groups of bits have no intrinsic meanings by themselves.
What a bit pattern represents depends entirely on how it is used. Consider the following bit
patterns expressed in hexadecimal notation. (20 pts)
8D28000816
a)
b)
c)
d)
What decimal number does the bit pattern represent if it is an integer?
What decimal number does the bit pattern represent if it is an unsigned integer?
If the bit pattern is in an instruction register, what MIPS instruction will be executed?
What decimal number does the bit pattern represent if it is a floating point number? Use
the IEEE 754 standard.
Download