CS208 Introduction to Computer Systems Monday, 29 September 2025 + Homework debrief - Grace period: resubmission (if you want) through Wednesday night (10/1) - Major issues - Testing - 0xffffffc3 - + args.c + Try this char ch1 = 0x41; printf("ch1 = 0x%x\n", ch1); char ch2 = 0xC3; printf("ch2 = 0x%x\n", ch2); + What have we done so far? - bits, bytes - integer writing systems: decimal, binary, hexadecimal, octal - bitwise operations in C - fixed-size integers - C's int with gcc on mantis is 4 bytes / 32 bits - two's complement - how to recognize negative ints - how to negate an int (i.e., what's the 2's comp representation of -x if x is an int?) - addition works normally! - ...but, you only have 32 bits, so problems can occur [to be continued] - C's char type - byte order for ints - little-endian (what Intel and Apple Silicon use) - big-endian (what most people find easier to read (so sad)) - ASCII - Unicode & codepoints - Encodings of Unicode codepoints - UTF-16LE - UTF-16BE - UTF-8 - BOM (byte order mark) - The basic idea of memory - addresses - "char *" as a parameter type + This week - More C - catch-up - command-line arguments - struct - pointers - pointer syntax: &, *, **, [], -> - arrays, pointer variables, literals, etc. - string library functions - ... - Thinking more about memory