CS 367 midterm info
- Part I: Data representation & C
- Two's complement & unsigned numbers
Note: Will limit midterm questions to 8 (or fewer) bit integers.
You should be able to determine the decimal value of a binary or hex sequence as either a two's complement integer or unsigned integer. You should be able to represent positive (and negative) integers in these two notations.
You should have an understanding of computer addition of both two's complement and unsigned numbers.
- Floating point numbers - You need to understand how to use the notation for some given number of bits for exponents and fractions. Homework #3 is a good example of what you should understand
- C bit level operators
You should be able to understand and use the C bit-level operators (you did this in your second homework).
- C programming language basics (i.e. CS262 level material)
- Part II: Program representation
Remember that the primary focus is on your ability to read and understand assembly.
- Data Movement operators, arithmetic and logical operators & addressing modes
address modes - fig 3.3
data movement - fig 3.4
arithmetic - fig 3.7
- Control Flow - conditionals (including switch statements & jump tables), loops
Set - Fig 3.10
jump - Fig 3.11
- Procedure call/return
Call/ret
%esp, %ebp - you need to understand how they create the procedure frame and where things like arguments are found as offsets to these pointers.
Setup and finish code in a procedure
- Structured data:
Arrays - allocation & addressing for 1 and 2 dimensional arrays
Will leave structs, union, alignment, etc for the final since I want to talk some
more about this.
The slides are a good resource for studying much of this.
Another good idea would be to work through the exercises in the chapters. Solutions to these exercises are given at the end of the chapter.
Here are some old exams: part1 and part2. I will not be releasing answers to the exams - working out the answers is part of the study process.