Topics carried over from Exam 1
- Everything! See the Exam 1 review.
Old exams worth reviewing
- Exam 1
- Questions 1–8, 11, 12, maybe 13, and 14–18 from last year’s final exam.
Reference material
- binary numbers reference
- PIC32 reference table
- C Reference Card — though unlikely to be useful
More recent topics
- Finite state machines as in Homework 5
- Computer Science math as in Homework 6
- Pointers and expressions in C as in Homework 7
- Encoding control structures of C (and Java) as in Homework 8 and Assembler-like C lab
- MIPS32 instruction encoding as in Homework 9
- Implementing common C operators in MIPS32 as in Introduction to MIPS32 Assembly lab
- Implementing arrays and functions in C in MIPS32 as in Arrays and Functions with MIPS32 Assembly lab
- Using MPLAB X
Programming questions
The assembly programming questions on this exam will be fairly simple.
None will be more than a single while
or if
—else
with a one or two statement body.
Make sure all your program examples
exit at the end of the implemented statement.
A few more things to get straight
- In C, any non-zero integer is
considered to be
true
and zero is considered to befalse
. - The relational and logical operators return either 0 or 1.
- It doesn’t take many bits to address a memory location.
- If
V
is an array of integers; to accessV[i]
in MIP32 assembler, you need to do a multiplication by 4. - Shift left two places to multiply by 4.
- The unary
&
and*
operators of C are used with pointers. - You can subtract pointers in C if they point to elements of the same array.
- If the MIPS32 instruction starts with 000000, it’s a an R instruction.
- In MIPS32, arguments are passed in
$a0
to$a3
and values are returned in$v0
to$v1
. - Check your answers.
- Explain your reasoning.