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
- Trace the execution of a MIPS assembly program
- Translate C code to MIPS assembly, including
- Assignment statements
- Basic arithmetic (+,-) and bitwise operations (~, &,
| , < <, and > >)
- if-else statements and the ternary conditional operator
( ? : )
- for, while, and do-while loops
- Boolean logical expressions (&&, | | , !)
- Array accesses (reads and writes)
- Pointer arithmetic and dereferencing
- Function calls with parameters and return values
- Distinguish MIPS instructions from pseudoinstructions
- Convert between a MIPS assembly instruction and its machine code representation
- Identify the format of a given MIPS instruction (e.g., R, I, or J)
- Identify the value of a load byte operation on a big-endian or little-endian
MIPS architecture after a store word operation
- Write MIPS procedures that obey calling conventions
- Save/retrieve values onto/from the call stack
- Identify the addressing mode of any MIPS instruction that changes
the PC
- Identify the range of addresses available to a jump or branch instruction
- Calculate the numerical value of BranchAddr for a branch
address in a branch instruction, given MIPS assembly code including
the target label
- Explain the tasks of the compiler, assembler, and linker (respectively)
- 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