Computer Science 237
Computer Organization
Williams College
Fall 2005
Lecture 3: Binary Arithmetic, Signed Representations
Date: September 14, 2005
Announcements
Lab continues - ask questions when stuck
Thrown into the deep end and don't know how to swim?
You will soon know what I'm talking about on pages 1 and 2. If not today, then Friday, I promise.
Suggestion: avoid the sqrt function, in fact avoid the math library altogether
Useful C functions: atoi(3), scanf(3).
Useful C ideas: bit shifts and logical operators.
Useful C example: show_bytes from last time.
I will be around much of tomorrow.
TA hours Sunday evening in TCL 312. I hope to be around some then, too.
List of lab computers
now with a bit more detail. Stick with FreeBSD 4.11 machines.
Please don't log into bull or eringer. Those are reserved for server duties.
Agenda
Memory model and pointers
Strings and arrays
Math
unsigned addition and multiplication
signed integer representations
signed addition