
CSCE 210: Computer Hardware Foundations Fall 2007
Homework 3 10/08/07
1. (2 points) Write a Little Man program that prints out the sums of the odd values from 1
to 39. That is, the output will consist of 1, 1 + 3, 1 + 3 + 5, 1 + 3 + 5 + 7… . No input is
required. (Hint: You need to use some mailboxes to store initial data values such as 1, 2,
and other needed values.)
2. (1 point)
a. Why are there two different registers (MAR and MDR) associated with
memory? What are the equivalents in the Little Man Computer?
b. Explain why unlike most registers that have two-way copy capability, the
MAR is always used as a destination register; that is, you only copy to the
MAR.
3. (1 point) Using the register operations indicated in Chapter 7, show the fetch-execute
cycle for
a. an instruction that produces the 2’s complement of the number in A ( Hint:
Assume A supports a bit inversion operation which is denoted as Inv(A).)
b. an instruction that clears A (i.e., sets A to 0)
4. (1 point) Explain how each of the main features in a RISC computer solves one or
more of the major bottlenecks of program execution that are discussed in the textbook.
5. (1 point) Discuss the tradeoffs between the memory cache write-through and write-
back techniques.
This homework accounts for 6 points toward your final grade. You need to submit a
hardcopy of your neatly typed answers for the problems. In order to get the points, you
need to explain your answer when you are asked to. This homework is due on Oct. 15 in
class.