Skip to main content

Reference and Selective Reading

You do not need to read the source books front-to-back for this module. Use the concept pages and practice pages first. Open these local chunks only when you need alternate exposition, more worked examples, or a deeper exercise lane.

Source Roles

SourceRoleWhy it is here
The C Programming Language (K&R)Primary teaching sourceBest operational explanations of pointers, arrays, structs, and small allocators
Computer Organization and Design (Patterson & Hennessy)Primary teaching sourceStrongest treatment of signed numbers, IEEE 754, and calling conventions
CODE (Petzold)Selective first-principles supportUnmatched for "why is memory a byte array?" intuition
SICPPeripheralRarely needed for this module; see semester project work
CSAPPLocal supportExcellent companion for machine-level representation and memory behavior alongside K&R and Patterson

Read Only If Stuck

Cluster 1: Bits, Bytes, and Representation

Cluster 2: Pointers and Addresses

Cluster 3: Memory Layout

Cluster 4: Memory Errors and Safety

Cluster 5: Structs, Alignment, and Endianness

Optional Deep Dive

Concept-to-Source Map

Primary conceptBest source if stuckWhy this source
Binary, hex, and the byteCODE: Bit by Bit by BitBest first-principles explanation
Integer representations and overflowCOD: Signed and Unsigned NumbersTightest treatment of two's complement
IEEE 754 floating pointCOD: Floating PointSingle-chapter format overview
Pointers, &, *K&R: Pointers and AddressesCanonical introduction
Pointer arithmeticK&R: Address ArithmeticThe section that makes it click
Pointer-to-pointer and function pointersK&R: Pointer Arrays, Pointers to PointersCanonical via argv and qsort
Virtual address spaceCOD: Translating and Starting a Program (Part 5)Best single-chapter segment summary
Stack frames and calling conventionsCOD: Supporting ProceduresBest operational explanation
Heap allocationK&R: Example - A Storage AllocatorClassic small allocator as reference
Buffer overflowsCWE-121: Stack-based Buffer OverflowAuthoritative taxonomy and examples
Use-after-free, double-freeCWE-416 and CWE-415Authoritative entries
Detection toolsAddressSanitizer and Valgrind MemcheckOfficial documentation
Struct layout and alignmentThe Lost Art of Structure Packing (Raymond)Best short treatment
Endianness and wire formatsBeej's Guide: Byte OrderAccessible introduction with code
Bit manipulation idiomsBit Twiddling Hacks (Anderson)Single best idioms collection