CS208 Introduction to Computer Systems Wednesday, 13 September 2023 + Memory - Bits - Bytes - Memory = big bunch of bytes with addresses 0, 1, 2,..., 2^N - 1 + C samples: get out your laptop and play along - output.c - stdout, stderr, and their command-line friends > and 2> - strings.c - how are char strings stored in memory? - pointers, char *, char [],... - args.c - charstar.c - array2d.c -- grid, grid[j], grid[j][k] + Questions - & in printf? (no) int k; scanf("%d", &k); // because scanf needs to know where k is in memory + Integers (if we have time) - Base 2 (binary) 111011 - Base 8 (octal) 73 - Base 10 (decimal) 59 - Base 16 (hexadecimal) 3b - Octal: 3-bit chunks, 0 notation, %o in printf - Hexadecimal: 4-bit chunks, 0x notation, %x and %X in printf, RGB color representation + char, byte, character - ASCII - Unicode (much more next week) - od (Unix command) - hexdump (Unix command)