Computer
Systems

Fall 2010
course
navigation

Sep 16

Discuss how you spread C code out over several files, and how you compile those files. Mention Makefiles. (Use http://code.google.com/p/jimmahoney/source/browse/#hg/c as an example.)
Have folks discuss issues from last time: Richard and 3/4 ; Isaac and linked list.
Finish up any bit / integer / C questions or comments.
Look at pg 99 32-bit problems.
Discuss IEEE floating point; pg 104 ; wikipedia: floating point
normalized : (exp != 0, exp != all ones) (-1)**sign_bit * (1 + base2_frac) * 2**(exp - bias) single precision : sign is 1 bit ; exp is 8 bits; frac is 23 bits ; bias = 127 special: exp = 0 is 'denormalized' (includes 0); exp =1 are 'special' (+inf, -inf ; frac !=0 => NAN) denormalized : 2**(1-bias) * (base2_frac) ; without leading 'implied' 1
example:
pi = 11.0010010000111111011010101000100010000101101000110000100011010011... = (-1)**(0) * (1.100100...) * 2**(1) so exp = 128 = 100_0000_0 0 100 00000 100 10010000111111011011 (excluding the hidden bit) 0100 0000 0010 1001 0000 1111 1101 1011 = 0x40490FDB Then there's the little endian consideration : does this get flipped ? Try it and find out.
Work through practice 2.48 in class.
Point people toward the assignment.
Next week: heading towards chapter 3 in the text, and assembler.
http://cs.marlboro.edu/ courses/ fall2010/systems/ notes/ Sep_16
last modified Monday September 20 2010 9:28 pm EDT