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

Credit:
10 points.

Reading

Be sure you have read, or at least skimmed, sections 1 through 4 of Chapter 2.

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 2” or “computer design quiz 2”).

Questions

  1. (2.5 points) Why do all ISAs have so much in common?

  2. (2.5 points) Write MIPS assembly code for the following C program fragment:

            	a = (b + c) + (d + e)
    

    Assume we have b, c, d, e in $s1 through $s4 and want to have a in $s0.

    Can you think of more than one way to do it? If you can, does one seem better than the other, and why?

  3. (2.5 points) Like many, the MIPS instruction set allows access to any individual byte in its memory. Does this mean you can load and store words starting at any address? if not, what's not allowed?

  4. (2.5 points) Why do computers use base 2 and not base 10?




2021-02-24