The Benedict Year › The workshop
Project 5 · Weeks 25–30
The computer
Everything comes together: memory, the processor that runs the instructions, and the whole computer, which runs any program in the language you learned.
The kind of answer
Judged, and supplied. At each tick the processor decodes one instruction and acts on it, and what it does is settled by that instruction alone. The computer is a small city of parts, each given what the whole needs from it and nothing more.
On paper first
Write one instruction, for example D=M+1, as its sixteen bits. Underline the bits that choose what the ALU computes, and circle the ones that say where the answer goes.
What you build
In the Hardware Simulator, choose Project 5 from the list at the top, then each chip in turn.
MemoryCPUComputer
Each one is done when its test passes in the IDE. A pass cannot be argued with, and neither can a fail.
Week by week
About an afternoon a week. If a week runs long, let it: the strand keeps its own order, not the calendar’s.
| Week | Watch | Do |
|---|---|---|
| Week 25 | 5.1; 5.2 | The idea of a stored-program computer, and the fetch-execute cycle: fetch an instruction, carry it out, fetch the next. |
| Week 26 | 5.3 | The CPU, explained. Copy the course’s CPU diagram large onto graph paper. |
| Week 27 | 5.4 | The whole Hack computer: memory, CPU and the program’s memory together. |
| Week 28 | 5.5 | Build Memory: the RAM, the screen and the keyboard joined into one address space. |
| Week 29 | — | Build the CPU, one part of the diagram at a time. Label every control wire with the instruction bit that drives it. |
| Week 30 | 5.6 | Build the Computer, and run its tests: your computer runs the course’s programs. |
The lectures
6 lectures, about 95 minutes in all, by Nisan and Schocken. Watch with your parent, one or two at a sitting.
- 5.1 Von Neumann Architecture 9:08
- 5.2 The Fetch-Execute Cycle 8:19
- 5.3 Central Processing Unit 27:27
- 5.4 The Hack Computer 28:00
- 5.5 Project 5 Overview 12:47
- 5.6 Perspectives 9:01
For the parent
The CPU is the hardest chip in Part I. Let it take two weeks if it needs them, and spend the extra time on the diagram, not on the editor. Every wire in the drawing is a line of HDL.
Public domain I have dedicated this page to the public domain under CC0 1.0. Copy it, change it, translate it, print it and share it, for any purpose, without asking. Quotations from other writers keep their own terms.