CSCI 2321 (Computer Design), Spring 2021:
Reading Quiz 5

Credit:
15 points.

Reading

Be sure you have read, or at least skimmed, sections 2.9 through 2.11 of the textbook, plus appendices A.2 through A.4.

Instructions

Answer the questions below using only the course textbook (i.e., no Web searches). Please work independently rather than in groups, and include the Honor Code pledge in what you turn in, either the full pledge or just the word “pledged”. (Please put this in the same document as your answers, so I don't overlook it.)

You may write out your answers by hand and scan them, or you may use a word processor or other program, but please submit a PDF or plain text via e-mail to my TMail address. (No links to shared files on Google Drive please.) Please use a subject line that mentions the course and the assignment (e.g., “csci 2321 quiz 5” or “computer design quiz 5”).

Questions

  1. (2.5 points) Given a 32-bit value, how can you tell what it represents (integer, machine language, etc.)?

  2. (2.5 points) Instructions are 32 bits long. It would seem to be impossible, then, to have an instruction that loads a 32-bit constant, such as la. How does MIPS get around this?

  3. (2.5 points) Several architectures provide single instructions that can be useful in locking. Why does MIPS instead provide a pair of instructions?

  4. (2.5 points) What is the register called $at used for?

  5. (2.5 points) Assembly-language macros sound like they'd be useful, but in fact they're rarely included. Why?

  6. (2.5 points) Appendix A.4 discusses the load process under UNIX. What does it say about “arguments to the program” (command-line arguments)?




2021-04-02