Reading Computer Systems: A Programmer's Perspective? See the hardware live
Computer Systems: A Programmer's Perspective (CS:APP), by Randal E. Bryant and David R. O'Hallaron of Carnegie Mellon University, explains computer systems from a programmer's point of view. It grew out of the Introduction to Computer Systems course Carnegie Mellon began in 1998 (15-213), and the third edition (Pearson, 2016) has twelve chapters: A Tour of Computer Systems; Representing and Manipulating Information; Machine-Level Representation of Programs; Processor Architecture; Optimizing Program Performance; The Memory Hierarchy; Linking; Exceptional Control Flow; Virtual Memory; System-Level I/O; Network Programming; and Concurrent Programming. Its processor chapter designs sequential and pipelined processors for Y86-64, a simplified subset of x86-64, describing their control logic in a small hardware language, HCL, that compiles into simulators provided with the book. This page maps the hardware chapters of CS:APP to lessons and live circuits in digiwleea's free browser lab, as a hands-on companion to the reading.
What the book does best
It connects the programs you write to the machine that runs them: how numbers are really stored, what the compiler turns your C into, why caches decide performance, and how linking, processes, virtual memory and concurrency work underneath. Its lab assignments are well known in their own right. (digiwleea is an independent project, not affiliated with Pearson, Carnegie Mellon University or the authors.)
Where digiwleea helps
CS:APP looks at hardware from the programmer's side; digiwleea lets you build it. Chapter 4 opens with combinational and sequential logic before it builds the Y86-64 processors, and in digiwleea those blocks are live circuits: gates from CMOS transistors, multiplexers, an ALU, flip-flops, a register file and memory, then a small 8-bit CPU that runs a stored program, built in a 40+ level course where every part is checked against its truth table, with an AI tutor (Wleea). It is a far simpler machine than Y86-64 and does not use HCL, but the datapath, control signals and fetch, decode and execute steps are the same ideas. Chapters 7 to 12 (linking, processes, I/O, networking and concurrency) are software topics digiwleea does not cover.
| Computer Systems: A Programmer's Perspective | digiwleea | |
|---|---|---|
| Format | A textbook (print and e-book), with lab assignments | A browser lab, theory lessons and a guided course |
| Processor | Y86-64, sequential and five-stage pipelined, in HCL | A small 8-bit CPU you build from gates |
| Logic design | Section 4.2, as groundwork for the processor | The starting point: transistors to gates to every block |
| Software topics | Machine code, linking, processes, virtual memory, I/O, networking, concurrency | Machine code and assembly basics only |
| Price | Paid textbook | Free lab and Act I; Premium for the full course |
Chapter by chapter: what to try live
Chapter titles are the third edition's. The hardware chapters map to live circuits; for the textbook on the same ground from the hardware side, see Computer Organization and Design.
- 1. A Tour of Computer Systems. The whole machine in one pass: how a CPU works and the memory hierarchy.
- 2. Representing and Manipulating Information. Binary, hexadecimal, two's complement and the two's complement calculator, overflow, sign extension, the bitwise calculator, and floating point with the IEEE 754 converter.
- 3. Machine-Level Representation of Programs. The ideas under x86-64, on a smaller machine: machine code, assembly, addressing modes and branches and loops.
- 4. Processor Architecture. The logic design of section 4.2, live: multiplexers, the 8-bit ALU, flip-flops and the register file. Then a processor from those blocks: the datapath, control, the fetch, decode and execute steps, the program counter and control unit, and pipelining with its hazards. Step a program through in the CPU simulator.
- 5. Optimizing Program Performance. The hardware side of it: performance and pipelining.
- 6. The Memory Hierarchy. RAM, the memory hierarchy, caches and a live direct-mapped cache.
- 9. Virtual Memory and 10. System-Level I/O. The hardware ideas only: virtual memory and memory-mapped I/O.
- 7, 8, 11 and 12. Linking, exceptional control flow, network programming and concurrent programming are software topics outside digiwleea.
No sign-up is needed to start: open the lab and place your first transistor, or read the free theory course. The account (and the AI tutor) are optional.
More comparisons: Books, courses and projects
See for yourself: build a logic gate from transistors in the simulator, then follow the path from sand to an 8-bit CPU.
Open the digiwleea lab →Frequently asked
Is there a simulator for CS:APP's Y86-64 processor?
Yes. The book's Y86-64 processor designs, written in HCL, compile into simulators provided with the textbook (section 4.6.1 covers them). digiwleea does not run Y86-64; it shows the gate-level blocks those designs are made of.
What are the chapters of Computer Systems: A Programmer's Perspective?
In the third edition: 1 A Tour of Computer Systems, 2 Representing and Manipulating Information, 3 Machine-Level Representation of Programs, 4 Processor Architecture, 5 Optimizing Program Performance, 6 The Memory Hierarchy, 7 Linking, 8 Exceptional Control Flow, 9 Virtual Memory, 10 System-Level I/O, 11 Network Programming, 12 Concurrent Programming.
Which course uses CS:APP?
The book was written for Carnegie Mellon's Introduction to Computer Systems course, 15-213, and the authors dedicate it to that course's students and instructors.
Is digiwleea's CPU like Y86-64?
No. It is a small 8-bit teaching CPU with a short instruction set, built from parts you make in earlier levels. The ideas carry over: instructions as bits, a datapath, control signals, and fetch, decode and execute.