## Provided reference material

- Handy table of numbers
- C Reference Card from University of Texas
- Quick and Dirty Guide to C from University of Washington

To save the Earth, please return with the exam.

## Topics covered

*all*homeworks- Data representation — signed and unsigned
- Bases for numbers — binary, decimal and hexadecimal
- Fixed point representation and the principles of floating point representation
- Addition and bit-wise operators of Java and C
- C programming
`main`

and command line arguments- Java-like control structures —
`if`

,`for`

,`while`

- arrays
*limited*formatted I/O*for integers and strings*- Read in a sequence of integers and print them neatly
- Add up all the numbers in a file and print the sum
- Or Task 1 of the 12/14 February lab
- Use of pointers in function passing, as in
`scanf()`

The most significant topics to study are anything covered in the first four homeworks or the first four labs or the first two quizes.

## Exams to review

Review the questions that are relevant to the exam topics. The most recent exams are the most relevant.

- Fall 2016 Exam 1
- Fall 2015 Exam 1
- Fall 2014 Exam 1
- Fall 2013 Exam 1
- Fall 2012 Exam 1
- Fall 2010 Exam 1

## A few things to get straight

`X``Y``Z`≠`X``Y``Z``!(X && Y && Z) != !X && !Y && !X`

- de Morgan’s law
- It’s the same boolean operators you used in Java.
- It’s the same bitwise operators you might have used in Java.
- Following the principles may result in a longer answer, but the answer is more likely to be correect.
- Check your answers.
- Multiplexers and ROMs are important.
- Learn the powers of 2 up to 2
^{9} - 2
^{n+m}= 2^{n}2^{m} - You can’t look at a string of bits and know if it is signed or twos-complement. Someone has to tell you.
- Overflow occurs when you perform an operation on
`n`-bit numbers and the result can’t be represented in`n`bits. - Overflow
*never*occurs when two`n`-bit twos-complement numbers of*different*signs are added `-n`

is`~n + 1`

in Java.- If in doubt, explain your reasoning.
- Check your answers.