Chip Name
Nand
Chip Name
Not
Chip Name
And
Chip Name
Or
Chip Name
Xor
Chip Name
Mux
Chip Name
DMux
Chip Name
Not16
Chip Name
And16
Chip Name
Description
Nand gate (primitive)
Description
Not gate
Description
And gate
Description
Or gate
Description
Xor gate
Description
Mux gate
Description
DMux gate
Description
16-bit Not
Description
16-bit And
Description
Or16
Chip Name
Mux16
Chip Name
Or8Way
Chip Name
Mux4Way16
Chip Name
Mux8Way16
Chip Name
DMux4Way
Chip Name
DMux8Way
Chip Name
16-bit Or
Description
16-bit multiplexor
Description
Or(in0,in1,...,in7)
Description
16-bit/4-way mux
Description
16-bit/8-way mux
Description
4-way demultiplexor
Description
8-way demultiplexor
Description
Test Scripts
Compare File
Test Scripts
Compare File
Not.tst
Test Scripts
And.tst
Test Scripts
And.cmp
Compare File
Or.tst
Test Scripts
Or.cmp
Compare File
Xor.tst
Test Scripts
Xor.cmp
Compare File
Mux.tst
Test Scripts
Mux.cmp
Compare File
DMux.tst
Test Scripts
DMux.cmp
Compare File
Not16.tst
Test Scripts
Not16.cmp
Compare File
And16.tst
Test Scripts
And16.cmp
Compare File
Or16.tst
Test Scripts
Or16.cmp
Compare File
Mux16.tst
Test Scripts
Mux16.cmp
Compare File
Or8Way.tst
Test Scripts
Or8Way.cmp
Compare File
Mux4Way16.tst
Test Scripts
Mux4Way16.cmp
Compare File
Mux8Way16.tst
Test Scripts
Mux8Way16.cmp
Compare File
DMux4Way.tst
Test Scripts
DMux4Way.cmp
Compare File
DMux8Way.tst
Test Scripts
DMux8Way.cmp
Compare File
Not.cmp
Compare File
When loaded into the supplied Hardware Simulator, your chip design (modified .hdl program), tested on the supplied .tst script, should produce the outputs listed in the supplied .cmp file. If that is not the case, the simulator will let you know. This contract must be satisfied for each chip listed above, except for the Nand chip, which is considered primitive, and thus there is no need to implement it.
See Chapter 1 (from the book's 1st edition) the HDL Guide (except for A2.4), and the Hack Chip Set.
For each chip, we supply a skeletal .hdl file with a place holder for a missing implementation part. In addition, for each chip we supply a .tst script that instructs the hardware simulator how to test it, and a .cmp ("compare file") containing the correct output that this test should generate. Your job is to complete and test the supplied skeletal .hdl files.
If you've downloaded the Nand2Tetris Software Suite (from the Software section of this website), you will find the supplied hardware simulator and all the necessary project files in the nand2tetris/tools folder and in the nand2tetris/projects/01 folder, respectively, on your PC. To get acquainted with the hardware simulator, see the Hardware Simulator Tutorial (PPT, PDF)
Prerequisite: If you haven't done it yet, download the Nand2Tetris Software Suite from the Software section of this website to your computer. Read Chapter 1 and Appendix 2 (not including A2.4), and go through parts I-II-III of the Hardware Simulator, before starting to work on this project.
Built-in chips: The Nand gate is considered primitive and thus there is no need to implement it: whenever a Nand chip-part is encountered in your HDL code, the simulator automatically invokes the built-in tools/builtInChips/Nand.hdl implementation. We recommend implementing all the other gates in this project in the order in which they appear in Chapter 1. However, note that the supplied hardware simulator features built-in implementations of all these chips. Therefore, you can use any one of these chips before implementing it: the simulator will automatically invoke their built-in versions.
For example, consider the supplied skeletal Mux.hdl program. Suppose that for one reason or another you did not complete the implementation of Mux, but you still want to use Mux chips as internal parts in other chip designs. You can easily do so, thanks to the following convention. If the simulator fails to find a Mux.hdl file in the current folder, it automatically invokes the built-in Mux implementation, which is part of the supplied simulator's environment. This built-in Mux implementation has the same interface and functionality as those of the Mux chip described in the book. Thus, if you want the simulator to ignore one or more of your chip implementations, rename the corresponding chiPname.hdl file, or remove it from the project folder. When you are ready to develop this chip in HDL, put the file chipName.hdl back in the folder, and proceed to edit it with your HDL code.
All the chips mentioned projects 1-5 can be implemented and tested using the supplied hardware simulator. Here is a screen shot of testing a Xor.hdl chip implementation on the Hardware Simulator: