Homeworks will be given approximately every week. They will usually be available on the webpage on Tuesday and due the next Tuesday right BEFORE the lecture.
There will be two parts to each homework assignment: required problems and recommended problems. You will submit only the required problems. The recommended problems are meant to reinforce the material and enrich your learning. While you can get full credit on homeworks doing only the required problems, to do well on exams, you will want to do the recommended problems also.
Required problems (i.e. the ones you turn in) must be done ON YOUR OWN. You are, however, encouraged to work with others on the recommended problems (and any other problems from the book that weren't assigned).
Homeworks must be typed or clearly handwritten. Illegible/unreadable answers will receive no credit.
Please note that, unless otherwise stated, all problems are from the Patterson & Hennessy (P&H) textbook.
Remember that you should turn in only the required problems (i.e. not the recommended ones). Show your work! All assembly language instructions should be commented. Binary and hex should be separated into the appropriate fields depending on instruction format (See example on page 65 in P&H)
Homework 1. Due: Tuesday, October 7
Required Problems:
Problem 1: P&H 2.47
Problem 2: Translate following MIPS assembly language into machine language (binary or hex)
lw $t7, 24($s0)
add $t7, $s1, $t7
sw $t7, 72($s1)
Recommended Problems:
P&H 2.3, 2.13, 4.1, 4.2, 4.14, 4.19
Homework 2. Due: Thuesday, October 14
Required Problems:
Problem 1: P&H 4.8
Problem 2: P&H 4.11
Problem 3: Machine B runs at 2 GHz and has a CPI of 1.3 for a particular program. Machine C, which runs at 5 GHz, has a CPI of 2.4 for that program, while executing 33% more instructions. Which machine is faster? What is the speedup over the slower machine?
Problem 4: You are going to enhance a computer, and there are two possible improvements: either make multiply instructions run four times faster than before, or make memory access instructions run two times faster than before. You repeatedly run a program that takes 100 seconds to execute. Of this time, 20% is used for multiplication, 50% for memory access instructions, and 30% for other tasks. What will the speedup be if you improve only multiplication? What will the speedup be if you improve only memory access? What will the speedup be if both improvements are made?
Problem 5:P&H 4.17
Recommended Problems:
P&H 4.22-4.24
Homework 3. Due: Tuesday, October 21
Required Problems:
Problem 1: P&H 5.3
Problem 2: P&H 5.8
Problem 3: P&H 5.11
Problem 4: P&H 5.14
Homework 4. Due: Monday, November 3
Required Problems:
Problem 1: P&H 5.27
Problem 2: P&H 5.34
Problem 3: P&H 5.35
Problem 4: P&H 5.36
Homework 5. Due: Thursday, November 13
Required Problems:
Problem 1: P&H 6.4
Problem 2: P&H 6.14
Problem 3: P&H 6.17
Problem 4: P&H 6.21
Problem 5: P&H 6.22
Problem 6: P&H 6.36
Problem 7: P&H 6.38
Homework 6. Due: Tuesday, December 2
Required Problems:
Problem 1: P&H 7.9
Problem 2: P&H 7.20
Problem 3: P&H 7.14
Problem 4: P&H 7.32