Table of contents
  1. Generally-useful textbooks
  2. Week 1 reading
  3. Week 2 reading
  4. Week 3 reading

Generally-useful textbooks

This course will use three main textbooks. None of them are required reading, but if you’re having trouble with a concept from lectures then they’re good places to look to see that concept explained in another way.

The Elements of Computing Systems (2021) by Noam Nisan and Shimon Schocken. Like this unit, the book is based around the Hack architecture, and many of our weekly assignments are based around the projects in this book. It’s well-written and pleasantly informal, but also very Hack-centric - it’s not a good place to look for a grounding in more general concepts. It’s available for free in eBook form from the University of Bristol library here.

Digital Design and Computer Architecture (2007) by David and Sarah Harris. Chapters 1-3 and 5 of this book are an outstanding introduction to the digital electronics we cover in the first half of the unit, with plenty of examples and exercises. Chapters 6-8 are based around MIPS, a slightly more complicated architecture than Hack, but still make good references for general concepts not evident in the Hack CPU. It’s available for free in eBook form from the University of Bristol library here.

Crafting Interpreters (2021) by Robert Nystrom. This book may be useful for the second half of the unit, when we’ve learned Hack machine code and assembly and are focusing on the journey from there to a high-level language. It’s unfortunately based around Java rather than C, and focuses on its own toy language (Lox) rather than Hack, but a lot of the concepts carry over (like grammars) and the explanations are very well-done, so this is probably the best place to look for a second opinion compared to Nisan and Schocken. The second half of the book also describes a compiler from Lox into a stack machine somewhat similar to Hack VM, and this compiler is written in C. It’s available for free from the author’s website here.

Introduction to Compilers and Language Design (2023) by Douglas Thain. For our purposes, this book is very interesting but almost entirely overkill - it takes a similar tack to Nystrom’s book but goes farther and is more technical. We’re planning to reference a couple of chapters for introductory concepts, but for the most part this is a book to check out if you want to take a closer look at some of the theoretical concepts we’ll be sweeping under the rug in the name of covering more material (particularly if you have a mathematical background). It’s available for free from the author’s website here.

Week 1 reading

The Elements of Computing Systems: Chapter 1.1 covers Boolean algebra, chapter 1.2 covers logic gates.

Digital Design and Computer Architecture: Chapters 1.5 and 2.4 cover logic gates, chapters 2.2 and 2.3 cover Boolean algebra, chapter 2.5.2 covers bubble pushing, and chapter 2.7 covers Karnaugh maps.

Week 2 reading

The Elements of Computing Systems: Section 1.4.2 covers plexers, chapter 2.2 covers binary numbers, chapter 2.3 covers binary addition, chapter 2.4 covers 2’s complement, chapter 2.5 covers adders and the Hack ALU.

Digital Design and Computer Architecture: Chapter 1.4 covers decimal, binary, and hexadecimal numbers, binary addition, sign-magntide and 2’s complement representation, section 2.8.1 covers multiplexers, chapter 5.2 covers adders, subtraction, and the ALU, chapter 5.3 covers fixed-point and flaoting-point numbers.

What every computer scientist should know about floating-point arithmetic: Found here, provides useful but non-examinable information on floating point rounding errors.

Week 3 reading

The Elements of Computing Systems: Chapter 3 covers timing diagrams, the clock, registers, and memory in general. It takes D flip-flops as a black box (which it calls a DFF) rather than explaining how they work, but does a good job of explaining how they work and how to use them.

Digital Design and Computer Architecture: Chapter 3.2.1 covers R-S latches, 3.2.2 covers D latches, 3.2.3 covers D flip-flops, and 3.2.4 covers registers (minus a load input which is covered in 3.2.5). Chapters 3.3 and 3.5 discuss issues around propagation delay, but in far more detail than this unit requires. Chapter 5.5 covers memory.