CS208 Introduction to Computer Systems Friday, 26 September 2025 + Thanks for the LLM.txt + Questions? + Memory, char *, etc. + Byte order - What's the problem? - "byte order" = "endianness" - "Gulliver's Travels" and "On Holy Wars & a Plea For Peace" - Bits are bits; context determines meaning - Intel x86_64 architecture (mantis & most Windows computers) uses little-endian; therefore, so will we + UTF-16LE, UTF-16BE, and UTF-8 + Bit operations - Turning individual bits on and off 0110 0101 = x & 1101 1111 = mask --> turns off the 3rd bit from the left in x build the mask: mask = ~(0x20) 0100 0101 = x | 0010 0000 = mask --> turns on the 3rd bit from the left Interpret those examples as x == an ASCII character 0110 0101 == 'e' & 1101 1111 --------- 0100 0101 == 'E' - Masking 0110 0101 & 0000 1111