Spring 2010
Please submit your assignment solutions in class on the due date. Assembly program code for Q.1-3
should be submitted via RamCT and will be evaluated on the MARS simulator for correctness.
Some questions might not have a clearly correct or wrong answer. In such cases, grading is based on your
arguments and reasoning for arriving at a solution.
Exercises are from the 4th edition of Computer Organization and Design by D. Patterson and J.
Hennessey
Use the MARS simulator to write and test programs in questions 1, 2, and 3.
Q1 (25 points) Exercise B.6 (see program zip file)
Q2 (30 points) Exercise B.8 (see program zip file)
Q3 (50 points) Exercise B.9 (see program zip file)
Q4 (55 points) Exercise 3.10
73 127 = -54
Mantissa = 1 .01001100000000000000100
Decimal value = 1.2968755
2-54
Ans = 1.2968755 x 2-54
95 127 = -32
127 + 10 = 137
127 + 9 = 136
1023 + 10 = 1033
1023 + 9 = 1032