CS/ECE 552-1: Introduction to Computer Architecture
Spring 2005
Problem Set #5
Due: Wednesday, April 27, 2005
Approximate Weight: 20% of the Homework Grade
You should do this assignment alone--NOT
with your project partner.
Problem 1 (10 points)
(a) Multiply the following signed 2's complement 8-bit numbers using
Booth's Algorithm. Show all the steps as in Figure 4.35 on page 262
of the course text.
Verify your answer by converting A and B and your result (A * B) to
decimal.
A = 1001 1011
B = 0010 1001
(b) Repeat (a) using the modified (2-bit) Booth's algorithm.
Problem 2 (10 points)
(a) Divide the following positive numbers using the restoring division
algorithm. Show all the steps as in Figure 4.38 on page 268 of the
course text.
Verify your answer by converting A and B and your result (A / B) to
decimal.
(b) Repeat using the non-restoring algorithm. Be sure to show all
steps.
Problem 3 (10 points)
Answer the following questions for the floating-point number system:
-
12-bit format with the MSB (bit 11) being a sign bit
-
5-bit exponent (bits 10-6), which is stored in excess-16 format
-
6-bit normalized mantissa (bits 5-0) with base 2 (e.g., the exponent n
represents base x 2n)
(a) What does "normalized" mean in this context?
(b) Represent the following numbers in the given format
(c) Give the smallest and largest positive numbers that can be represented
in this format. Show them in binary and in decimal format (you should
NOT do this by converting from one base to another). Note:
"234 x 216 - 1" is an example of a valid decimal format.
(d) Subtract, multiply, and divide the following: (show all steps)
A = 0 10101 010001
B = 1 01100 101110
Problem 4 (10 points)
A parity check matrix for a (7, 4) Hamming code (m = 4, k = 3) is given
in the ECC
handout.
(a) Create a table with all 16 combinations of data bits encoded with
their check bits.
(b) If the 7 bits read from a memory using this encoding are as given
in each case below, compute the correct data bits, assuming that no more
than a single error has occurred in each.
c1
|
c2
|
b1
|
c3
|
b2
|
b3
|
b4
|
1
|
1
|
1
|
0
|
0
|
1
|
1
|
1
|
1
|
0
|
0
|
0
|
1
|
0
|
1
|
1
|
0
|
1
|
0
|
1
|
1
|
(c) Give an example of 7 bits of data that, if read from this memory,
would appear to be correct but in fact are in error. Explain why
your answer fits this description.
Problem 5 (10 points)
Problem 7.35 (Pg 632) from the text book. You MUST draw a diagram, similar to figure 7.22 on page 584, showing how the two-level page table works to get full credit.
Problem 6 (10 points)
Problem 7.36 (Pg 633) from the text book.