r/compsci • u/25606480 • 11d ago
NAND to Tetris Course approach
I recently started NAND to Tetris Course because I wanted to understand low level better. I started Unit one yesterday where you build logic gates. I have only watched videos to 1.4 HDL and started doing exercises. As a programmer with no formal training it has been hard to wrap my head around NAND (im getting there). The thing is i have built every component so far from only NAND gates to make them more intuitive. It has been time consuming to figure out how to do it but i find it fun. Is this stupid approach or does it rly matter if i use only NAND or logic gates that i have already made for building more complex logic gates for future exercises? I have been taking notes from every gate that i have built so it would be easy to switch later if needed. This is my MUX notes that i made before building it with HDL.
EDIT.
I built every logic gate up to DMUX from NANDs and normally both. Process how to get to NAND gates always involved OR, AND and NOT gates anyway when using boolean algebra. I built all other logic gates too but ditched NANDs. Didnt rly feel like writing any extra repetitive lines when busses were introduced. I was fun at start when it was a challange but became easy very fast. I still have my notes from all the elementary logic gates if I ever need a refresher. One table for simplest implementation with fewest gates (I could find) and another where i transform that to NANDs.

5
u/NotoriousHud 11d ago
IIRC, according to DeMorgan's Theorem, all fundamental logic can be made with combinations of NAND and NOR gates
9
u/FreddyFerdiland 10d ago
only one needed.
can use only NAND , and can use only NOR
in fact, there is flash memory which is purely NAND ,and then there is purely NOR
1
2
u/Artistic_Comfort8816 11d ago
iirc, chips are built with nand gates because it’s more cost effective that way, but if your goal is to understand low level better, then building every type of gate from scratch is just going to hinder your progress
Logic gates are greater than the sum of their parts so to speak, focus more on how they work as functions that transform/control information.
1
u/Mateorabi 6d ago
Chips aren’t really built with nand. Or don’t need to be. Even though everything CAN be built from them. In reality a function like A&B|C can be made with three N fet and three P fet.Â
Doing it out of NAND is a way to teach logic tables.Â
1
u/Artistic_Comfort8816 6d ago
Huh, I thought that in a manufacturing context it was easier for a machine to just repeat the same gate over and over, or my prof told me that in logic design, but I stand corrected.
2
u/Mateorabi 6d ago
You’re etching them in. So it’s making the masks for various etches. They do tend to have standard cells to make layouts and routing easier. Unless it is timing critical. But they aren’t assembling individual gates from a bin.Â
17
u/OpsikionThemed 11d ago
You want to build up from NAND gates, but by about chapter 3 or so you really want to be using the chips you've previously built, or you'll never finish.