The Benedict Year › The workshop
Project 2 · Weeks 10–12
The adders
Out of the gates you built, a chip that adds, and then the arithmetic logic unit, the part of the computer that calculates.
The kind of answer
Made. Every chip is NAND gates given a shape. The maker arranges them, and the gates are still gates: the adder has nothing in it that the gates did not have, except the order you gave them. That is the unit’s rule in silicon.
On paper first
Count from 0 to 15 in binary on the fingers of one hand, a raised finger for 1. Then add two binary numbers on paper the long way, carrying as you do with ordinary numbers.
What you build
In the Hardware Simulator, choose Project 2 from the list at the top, then each chip in turn.
HalfAdderFullAdderAdd16Inc16ALU
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 10 | 2.1; 2.2 | Binary numbers and binary addition, on paper. Then the HalfAdder and the FullAdder. |
| Week 11 | 2.3; 2.4 | Negative numbers in binary, then Add16 and Inc16. |
| Week 12 | 2.5; 2.6 | The ALU. Fill in its table of six control bits on paper before you build it. |
The lectures
6 lectures, about 66 minutes in all, by Nisan and Schocken. Watch with your parent, one or two at a sitting.
- 2.1 Binary Numbers 7:47
- 2.2 Binary Addition 12:13
- 2.3 Negative Numbers 11:10
- 2.4 Arithmetic Logic Unit 16:47
- 2.5 Project 2 Overview 7:47
- 2.6 Perspectives 10:35
For the parent
HDL has no “if”. When the ALU must do one thing or another, a Mux chooses, so the ALU is mostly Muxes and the chips from last term. Drawing it large on graph paper, one box per part, helps more than staring at the editor.
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.