CSCI 2321 (Principles of Computer Design), Spring 2002:
Homework 3

Assigned:
February 6, 2002.

Due:
February 15, 2002, at the start of class.

Credit:
40 points.

Problems

Do the following problems.

  1. (4 points) Do problem 3.1 on p. 197 of the textbook.

  2. (6 points) Do problem 3.2 on p. 197 of the textbook.

  3. (6 points) Do problem 3.6 on p. 198 of the textbook. Note that you must also submit your assembler source by e-mail, as described below.

  4. (8 points) Do problem 3.7 on p. 198 of the textbook. Also write out the binary machine language for each instruction (i.e., the ones and zeros).

  5. (16 points) Do problem 3.11 on p. 200 of the textbook. Note that you must also submit your assembler source by e-mail, as described below.

Helpful hints

You will probably find it useful to use the MIPS simulator SPIM. It is installed on the department lab machines as command xspim (GUI version) and spim (CLI version). Appendix A of the textbook describes how to use this program. To obtain a version for your own machine, see the course links page. You may also find it useful to look at some of the sample programs linked from the course sample programs page, especially the starter program.

What to turn in

Turn in hardcopy answers to all problems. Problems 3.6 and 3.11 require that you write fragments of MIPS assembler code. For these two problems, also submit your assembler code (two files, perhaps called problem_3_6.s and problem_3_11.s) by e-mail, as described in the Guidelines for Programming Assignments, using a subject header of ``cs2321 hw 3''.



Berna Massingill
2002-02-06