Skip to main content

Learning Resources

This module is populated from the local chunked books in library/raw/semester-04-systems-programming/books and a small number of carefully chosen external references. Use this page as a source map, not as an instruction to read everything.

Source Stack

BookRoleHow to use it in this module
The C Programming Language (K&R)Primary teaching source for pointers, arrays, structsDefault escalation for any pointer, array-pointer, or struct topic
Computer Organization and Design (Patterson & Hennessy)Primary teaching source for representation and call conventionsUse for signed numbers, IEEE 754, procedure calling conventions, and memory addressing
CODE (Petzold)Selective first-principles supportUse when you want bits, bytes, and two's complement explained from scratch
SICPPeripheralRarely needed here; useful if you want a meta-view of abstraction but not operationally required
Computer Systems: A Programmer's Perspective (CSAPP)Local supportUse it when you want a second systems-level pass on representation, memory, and machine-level consequences after K&R and Patterson

Resource Map by Cluster

Cluster 1: Bits, Bytes, and Representation

NeedBest local chunkWhy
bits and bytes from scratchCODE: Bit by Bit by BitBest first-principles introduction to binary
hexadecimal notationCODE: Bytes and HexadecimalShort, clear motivation for hex
bitwise operators in CK&R: Bitwise OperatorsCanonical operator rundown
signed vs unsigned integersCOD: Signed and Unsigned NumbersTightest treatment of two's complement in hardware context
two's complement worked mechanicsCODE: But What About SubtractionStep-by-step subtraction via two's complement
IEEE 754COD: Floating PointBest single-stop explanation of the format

Cluster 2: Pointers and Addresses

NeedBest local chunkWhy
what a pointer isK&R: Pointers and AddressesTight, canonical first treatment
pointer argumentsK&R: Pointers and Function ArgumentsWhy C passes by value and how pointers undo that
pointer arithmetic and arraysK&R: Address ArithmeticThe section that makes pointer arithmetic click
arrays versus pointers (hardware view)COD: Arrays versus PointersWhat the compiler actually does
pointers to pointers, argvK&R: Pointer Arrays, Pointers to PointersCanonical explanation via argv
function pointersK&R: Pointers to FunctionsThe reference for dispatch tables and qsort

Cluster 3: Memory Layout

NeedBest local chunkWhy
what program loading looks likeCOD: Translating and Starting a Program (Part 5)Covers how segments end up in memory
procedure calling conventionCOD: Supporting Procedures in Computer HardwareBest single chapter on call/return mechanics
frames in a real exampleCOD: A C Sort ExampleWalks through a full C function in assembly
memory as an assemblageCODE: An Assemblage of MemoryHardware view of RAM as addressable bytes
toy storage allocatorK&R: Example - A Storage AllocatorThe classic small malloc / free implementation

Cluster 4: Memory Errors and Safety

NeedBest local chunk or resourceWhy
overflow risks in CK&R: Character Pointers and FunctionsWhere unsafe string idioms appear
self-referential structuresK&R: Self-Referential StructuresSets up common UAF patterns (linked lists)
ASan documentationClang AddressSanitizerAuthoritative reference
Valgrind MemcheckValgrind Memcheck manualAuthoritative reference
CWE classificationsCWE Memory Safety CategoryGood to know the vocabulary

Cluster 5: Structs, Alignment, and Endianness

NeedBest local chunkWhy
struct basicsK&R: Basics of StructuresCanonical introduction
arrays of structs, pointers to structsK&R: Arrays of StructuresTied together with layout reasoning
bit fieldsK&R: Bit FieldsLanguage-level reference
hardware addressingCOD: MIPS Addressing for 32-Bit Immediates and AddressesGives the underlying reason for endianness and alignment

External Resources (Validated)

These are read-only, freely available, and stable. Use when the local chunks do not suffice.

Exercise Support Chunks

Use these when the concept pages are understood but fluency is weak:

Use Rules

  • If you are stuck on syntax or a pointer idiom, go to K&R first.
  • If you are stuck on a representation question, go to COD or CODE first.
  • For tool questions (ASan, Valgrind, clang --analyze), go straight to the official documentation.
  • Open one chunk for one concept gap; do not wander through a whole chapter sequence by default.
  • If rereading is not fixing the problem, stop and draw the memory diagram in your own hand before reading more.