CS208 Introduction to Computer Systems Monday, 8 January 2024 + This week - No office hours Wednesday - Job candidate talk: underwater robots! 4:30-5:30 Tuesday, AND 329 + Questions + Bases - Ten (decimal), sixteen (hexadecimal), two (binary) 39 : 3 tens and 9 ones = 3 * 10^1 + 9 * 10^0 0x27 : 2 sixteens and 7 ones = 2 * 16^1 + 7 * 16^0 0b100111 : 1 * 2^5 + 0 * 2^4 + 0 * 2^3 + 1 * 2^2 + 1 * 2^1 + 1 * 2^0 32 0 0 4 2 1 Base sixteen: 0 1 2 3 4 5 6 7 8 9 A B C D E F (or a b c d e f) Base two : 0 1 Convert 0xA5 to decimal 0xA5 = 10*16 + 5 = 165 Convert 0xA53 to decimal 0xA53 = 10*256 + 5*16 + 3 = 2643 = 16*(165) + 3 Why? - Converting between bases + Memory - Bits - Bytes - Memory = big bunch of bytes with addresses 0, 1, 2,..., 2^N - 1 - char, byte, character - ASCII + Strings and pointers - strings.c - sizes.c - charstar.c - pointers.c + Debugging lab