CSci 370 : Final Review

Scope is Comprehensive

The final is comprehensive but weighted toward the later topics, so look over material from the previous exams. Open book and notes. The main topics can be broken down into the following:

Binary Numbers. Unsigned versus 2's complement. Representation in different numbers of bits (for example, what is the largest 4-bit unsigned number? The smallest? What is the largest 5-bit 2's complement number? And so on...)

Floating Point Representation. The IEEE 754 floating point standard, both single-precision and double-precision. Sign, Exponent, and Mantissa/Fractional Part. Converting from decimal to floating point and back. Special cases (denormalized, Not A Number, etc).

x86-64 Instruction Set. Specific issues with respect to the subset of the instruction set we study. Arithmetic&logical instructions, control instructions, cmp, test, and jumps. Stack instructions and how they interact with procedure call and return. Addressing modes.

Conversions from C code to Assembly Language. Arithmetic code, if statements, do/while & while statements, and for statement conversion to intermediate form in C (when applicable) then to assembly instructions.

Procedure Call/Return. How the stack is used to support calling and returning from procedures. Passing arguments on the stack vs. in registers. The steps taken when executing a call or ret instruction.

Stack-based Exploits / Buffer Overruns. How to exploit bad programming practice (and C's lack of a bound check on array accesses) to overwrite important data on the stack. Targeted attacks that cause exploit code to be executed by modifying the return address. Compiler-provided checks to ensure stack integrity.

Datapath and Control Design. The SEQ and PIPE versions of processor design. The simplified Y86 instruction set and its execution by processors. Execution stages within the CPU. The role of combinatory circuits. Issues with SEQ and why PIPE is preferred.

Pipelining. Improving CPU performance by pipelining. How pipeline stages interact. The three pipeline hazards: data, control, structural. Ways of alleviating data&control hazards: pipeline bubbles, data forwarding, branch prediction.

Memory Hierarchy. Caches, Main Memory, and Secondary Storage (hard drives or SSD). Principles of locality: temporal and space. Cache hits/misses; using addresses to locate data in the cache.

Coding. You will be expected to read and write x86-64 code, and read Y86 code (possibly writing short sequences). You will not have to convert between the two on the exam.


Miscellaneous Sources. Concepts from homework, lecture, or the previous exams may show up. Read over some of the exercises not assigned from the chapters covered in the textbook and think about how to solve them.

Questions? If at any time you find that you cannot do a problem or understand a concept or how a question on a previous test should be solved, contact the instructor. Bring as many questions as necessary to clear up anything you can't figure out on your own.

Come Equipped. The most important thing is a set of pencils. You may also bring your own notes and textbook - no sharing of resources between students.  A small calculator may be useful. No laptops, magnifying lenses, iPhones, Androids, etc. needed or allowed for the final.  Caffienated beverages optional.