Hacker News new | ask | show | jobs
by tankenmate 2767 days ago
And one thing that is said even less is why NAND? You can do it all with NOR gates as well if you want. The reason for NAND has to do with the switching speed, pMOS switches quicker in parallel (either transistor can get the current flowing) and nMOS switches quicker in series (either transistor can stop the current flowing); this is how a NAND gate is wired. NOR gates on the other hand have the worst of both.

The fact that nMOS switches off quicker is why the most common form of dynamic logic (as opposed to static logic) implements, in effect, the bottom half of the CMOS in nMOS and the upper half using a capacitor; which holds the charge and hence pull up for the length of the clock cycle (which is why dynamic logic CPUs can't be single stepped in hardware, the clock speed is too low to hold a charge).

3 comments

You can do it all with NOR gates as well if you want.

The Apollo computer, which used bipolar instead of CMOS, indeed did use all NOR gates:

http://klabs.org/history/ech/agc_schematics/

http://mikestewart.hcoop.net/2015/09/21/interpreting-the-sch...

During my intro to computer engineering course, lectures touched on why NAND gates, and the conclusion was that you can build anything you need in a basic computer using NAND gates. It boils down to expense. A BOM (bill of materials) with fewer line items tends to be cheaper.

This doesn't really hold in today's world of silicon prints, but at the start I think it was price that drove the decision.

Actually if you take an XOR gate with a naive translation into NAND gates you would use 20 transistors, but if you don't need a large fan out from the output you can actually do it with 6 transistors using a pass gate layout (which is neither NAND nor NOR). So typically you don't use NAND vs NOR because of transistor count.
Oh! Good to know. Thank you!
Don’t NAND take up less room too? It took a CMOS course several years ago, and laid out a 16x16 shift register. The NAND was simple, orthogonal strips of gate metal and channel. The NOR required a parallel structure with more area.