Test #1 will be given in class on Friday, Feb 20th.
The test is closed book, no notes or computers are allowed.
An IA32 Instruction reference will be distributed with the test
(this includes the instructions that we have covered so
far). Here is the reference: cribsheet.pdf
| Topic |
What to know |
What to expect on the test |
|
| Integer representation |
Binary representation (base 2)
Hexadecimal (base 16)
Unsigned integers
Two's Complement Integers
C programs and integer data types.
|
Conversion between integer representations
Understand or write small C programs that deal
with integers
Know how to use printf!
|
|
| IEEE Single Precision |
Sign, Exponent & Significand
Exponents are stored using bias representation
Normalization
Significands are represented as normalized without the
leading 1
|
Be able to show the bits of an IEEE single precision
floating point number given a decimal floating point
number.
Be able to discuss the issues involved with designing
a binary representation for floating point numbers (the
tradeoff between the number of bits used to store the exponent
vs. the number of bits used to store the significand).
Understand what normalization is, and why it is important
in IEEE single precision representation.
|
|
| Computer Arithmetic & Logic Operations |
Bitwise logic operations (& / | / ~)
Boolean logic operations (&& / || / !)
Unsigned addition
Signed addition
Overflow
|
Be able to write and/or understand C programs using the C
operators &, |,
~, &&, || and !
Understand the limitations of integer arithmetic when using
a fixed size representation.
Be able to write/understand C programs that do integer
arithmetic operations.
|
|
| Unix |
Be able to spell Unix.
Be able to list at least 4 Unix commands (things like
"ls", "cd", "mkdir", "chmod", ...)
|
|
|
| C Programming |
printf
C programming data types (char, int, etc)
C logic operation usage
pointers, pointers, pointers
|
Be able to determine what a C program prints out (know printf!).
Be able to write small C programs that deal with pointers,
logic operations, printf, etc.
|
|
| Instruction Sets |
Instruction Set Architecture (stack, accumulator, general
purpose register)
Machine-Level Code (program representation)
C -> Assembly -> Machine Code
|
Be able to compare instruction set architectures and
some of the tradeoffs (instruction size vs flexibility).
Understand that machine code is a binary representation of
instructions. Be able to design a machine code (a binary
encoding), given a small set of operations. This is like the
example we did in class (Machine language for Life: eat,
play, study, watch TV,...).
Be able to discuss (at a general level) what a compiler
does, and what an assembler does.
|
|
| IA32 Instructions |
Registers
movl instruction
leal instruction
Addressing Modes
Arithmetic/Logic instructions
Condition Codes
Set instructions
Compare instructions
Jump instructions
|
Be able to decipher (explain what happens) some
small assembly language program segments that include the
instructions we have covered.
Be able to write some assembly language given a small
segment of C code.
Be able to do some assembly language optimization. Given
some assembly language code - write a more efficient
version.
Be able to create assembly language for C If statements,
but don't worry about loops...
The test will include a list of the instructions we have
covered (you don't need to memorize names). The complete
instruction reference that will be attached to the test is
here: cribsheet.pdf
|
Test Info, What to Study
Practice Problems:
- 2.1, 2.2, 2.3, 2.6, 2.8, 2.11, 2.13, 2.14, 2.15, 2.20, 2.21, 2.23, 2.29, 2.30, 2.31, 2.33
- 3.1, 3.3, 3.4, 3.6, 3.9, 3.10, 3.11, 3.12
Practice assembly language! Try to work out some of the Practice
Problems in the text. Also look at homework problems 3.31 and
3.32.
Play with C computer arithmetic (on the computer!). Make sure you
understand what happens when you add signed/unsigned
values.
Make sure you know how to extract bits from any C variable!
Two's complement, Two's complement, Two's complement
Look at last semester's test: Fall 2003 Test 1
(with answers)