Topics carried over from Exam 1 and 2
Old exams worth reviewing
More recent topics
- Memory caches as in Homework 11
- Basics of circuit connection as in Homework 12
- “Short definition” basics of GPIO and I2C as in Raspberry Pi GPIO and I2 C labs
The assembly programming questions on this exam will be fairly simple, no more than a function with a loop and a conditional.
Be sure you know how to the following.
- Initialize a variable to a constant
- Add a constant to a variable
- Access the i’th element of an integer array
- Implement the conditional
- Access function parameters
- Return function result
A few more things to get straight
- In C, any non-zero integer is
considered to be
trueand zero is considered to be
- The relational and logical operators return either 0 or 1.
- It doesn’t take many bits to address a memory location.
- In twos complement, the most significant bit has negative weight.
- Adding a positive and a negative number never results in overflow.
- 8 Mi / 128 is 64 ki.
Vis an array of integers; to access
V[i]in MIP32 assembler, you need to do a multiplication by 4.
- Shift left two places to multiply by 4.
&operator of C is used on an l value.
- The unary
*operator of C is used with a pointer.
- 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
$a3and values are returned in
- Check your answers.
- Explain your reasoning.