CSC 211: Exam 2

CSC 211 - Computer Organization and Architecture - Weinman

1  Learning Outcomes

At the end of this unit you should be able to
  1. Trace an execution of a MIPS assembly program
  2. Translate C code to MIPS assembly, including
    1. Assignment statements
    2. Basic arithmetic (+,-) and bitwise operations (~, &, | , < <, and > >)
    3. if-else statements
    4. switch statements
    5. for, while, and do-while loops
    6. Boolean logical expressions (&&, | | , !)
    7. Array accesses (reads and writes)
    8. Pointer arithmetic and dereferencing
    9. Function calls with parameters and return values
  3. Distinguish MIPS instructions from pseudoinstructions
  4. Identify the value of a load byte operation on the big-endian MIPS architecture after a store word operation
  5. Identify the format of a given MIPS instruction (e.g., R, I, or J)
  6. Write MIPS procedures that obey calling conventions
  7. Save/retrieve values onto/from the call stack
  8. Convert between a MIPS assembly instruction and its machine code representation
  9. Identify the addressing mode of any MIPS instruction that changes the PC
  10. Calculate the numerical value of BranchAddr for a branch address in a branch instruction, given MIPS assembly code including the target label
  11. Identify the range of addresses available to a jump or branch instruction
  12. Explain the tasks of the compiler, assembler, and linker (respectively)
  13. Provide the contents of the relocation and symbol tables in an object file, given a C or MIPS program

2  Study Problems

The following exercises are from Patterson and Hennessy (Fifth Edition)
Chapter 2
1-5, 7, 9-36, 38-42
The following exercises are from Patterson and Hennessy (Sixth Edition)
Chapter 2
1-5, 7-33, 35