NAND, NOR and Why NAND Wins
Draw the CMOS NAND and NOR gates as series and parallel switches, and explain with measured delays why NAND is preferred.
You Will Be Able To
- Draw the pull-up and pull-down networks of a NAND and a NOR.
- Predict the output of a switch network for each input row.
- Explain with numbers why a NOR is slower to rise than a NAND.
- State what it costs to make the NOR as fast as the NAND.
- Lesson
- G9.2
- Time
- 25 min
- Runs on
- ngspice
- Check
- 5 questions
A cell library held a NAND2 and a NOR2 with transistors of the same size. On the same load the NAND output rose in 78.8 ps. The NOR output needed 149.3 ps. Both gates have four transistors, so the count does not explain it.
- v(in)
- v(nand)
- v(nor)
- Time 125 psv(in) = 900 mV · v(nand) = -59.12 mV · v(nor) = -38.81 mV
The input crosses 0.9 V, half of the supply. Delay is counted from this moment.
- Time 203.8 psv(in) = 0 V · v(nand) = 900 mV · v(nor) = 418.4 mV
The NAND output crosses 0.9 V, 78.8 ps after the input. One PMOS charges the load.
- Time 274.3 psv(in) = 0 V · v(nand) = 1.555 V · v(nor) = 900 mV
The NOR output crosses 0.9 V, 149.3 ps after the input. It charges through two PMOS in series.
Read the plot as a table
| Time | v(in) | v(nand) | v(nor) |
|---|---|---|---|
| 0 s | 1.8 V | 1.043 µV | 260.6 nV |
| 100 ps | 1.797 V | -149.2 µV | -140.3 µV |
| 125 ps | 900 mV | -59.12 mV | -38.81 mV |
| 200 ps | 0 V | 849 mV | 391.1 mV |
| 203.8 ps | 0 V | 900 mV | 418.4 mV |
| 274.3 ps | 0 V | 1.555 V | 900 mV |
| 300 ps | 0 V | 1.66 V | 1.058 V |
| 400 ps | 0 V | 1.786 V | 1.497 V |
| 500 ps | 0 V | 1.799 V | 1.692 V |
| 600 ps | 0 V | 1.8 V | 1.764 V |
Measured with ngspice 42 on SKY130, 1.8 V (400 of 614 points).
Series and Parallel Switches
A transistor in a logic gate works as a switch. An NMOS is on when its gate is 1. A PMOS is on when its gate is 0. G9.1 built the inverter from one of each.
Two switches in series form a path only when both are on. Two switches in parallel form a path when either one is on.
a controls PA and NA. Input b controls PB and NB.- a = 0, b = 0: y = 1
Both PMOS are on, so two paths connect
yto VDD. Both NMOS are off. - a = 0, b = 1: y = 1
PA is on and holds
yat VDD. NB is on, but NA is off, so the path to ground is open. - a = 1, b = 0: y = 1
PB is on and holds
yat VDD. NA is on, but NB is off, so the path to ground is still open. - a = 1, b = 1: y = 0
Both NMOS are on, so the series path connects
yto ground. Both PMOS are off.
Read the circuit as text
- PA PMOS transistor: gate →
n1, source →VDD, drain →n2 - PB PMOS transistor: gate →
n3, source →VDD, drain →n2 - NA NMOS transistor: gate →
n4, drain →n2, source →n5 - NB NMOS transistor: gate →
n6, drain →n5, source →0 - a port: terminal →
n1 - b port: terminal →
n3 - a port: terminal →
n4 - b port: terminal →
n6 - y port: terminal →
n2
For every input row, one network conducts and the other is open.
The NAND output is 0 only when a and b are both 1. "And" asks for series, so the two NMOS are in series. In the three other rows a PMOS holds the output at 1.
The NOR Gate Swaps the Two Networks
- a = 0, b = 0: y = 1
Both PMOS are on, so the series path connects
yto VDD. Both NMOS are off. - a = 0, b = 1: y = 0
NB is on and pulls
yto ground. PB is off, so the series path to VDD is open. - a = 1, b = 0: y = 0
NA is on and pulls
yto ground. PA is off, so the path to VDD is open. - a = 1, b = 1: y = 0
Both NMOS are on, so two paths connect
yto ground. Both PMOS are off.
Read the circuit as text
- PA PMOS transistor: gate →
n1, source →VDD, drain →n2 - PB PMOS transistor: gate →
n3, source →n2, drain →n4 - NA NMOS transistor: gate →
n5, drain →n4, source →0 - NB NMOS transistor: gate →
n6, drain →n4, source →0 - a port: terminal →
n1 - b port: terminal →
n3 - a port: terminal →
n5 - b port: terminal →
n6 - y port: terminal →
n4
The rising output must charge through PA and PB, one after the other.
The NOR output is 0 when a or b is 1. "Or" asks for parallel, so the two NMOS are in parallel. The output is 1 only when both inputs are 0, so the two PMOS are in series.
In both gates the pull-up network is the dual of the pull-down network: where one has series, the other has parallel. So exactly one network conducts for every input row.
| Gate | Pull-up network (PMOS) | Pull-down network (NMOS) | Transistors |
|---|---|---|---|
| NAND2 | 2 in parallel | 2 in series | 4 |
| NOR2 | 2 in series | 2 in parallel | 4 |
| NAND3 | 3 in parallel | 3 in series | 6 |
| NOR3 | 3 in series | 3 in parallel | 6 |
Each input adds one PMOS and one NMOS. The transistor count is the same for NAND and NOR.
Why the NOR Is Slower to Rise
The two transistor types are not equally strong. At the same size, a PMOS carries less current. Its charge carriers are holes, and holes move more slowly than electrons.
| Transistor, 1 µm wide | Current when fully on |
|---|---|
| NMOS | 475.6 µA |
| PMOS | 183.3 µA |
Measured on SKY130 with 1.8 V across the switch and on its gate. The NMOS carries 2.59 times as much.
Transistors in series make it worse: the current must pass through both. A NAND puts the strong NMOS in series. A NOR puts the weak PMOS in series, and that path must charge the output.
- Power
- Device
- I/O
- Power
- The output rises
Charge flows from VDD through the PMOS to
y. In a NAND one PMOS is enough. In a NOR it passes two PMOS in series: 149.3 ps.Follow the calls, values and waits
- data charge: VDD → Pull-up network
- data charge: Pull-up network → Output y
- The output falls
Charge leaves
ythrough the NMOS to ground. In a NAND it passes two NMOS in series: 50.8 ps. In a NOR one NMOS is enough: 36.9 ps.Follow the calls, values and waits
- data charge: Output y → Pull-down network
- data charge: Pull-down network → Ground
Read the diagram as text
- VDD: 1.8 V supply
- Ground: 0 V
- Pull-up network: PMOS switches
- Pull-down network: NMOS switches
- Output y: the load to charge
- VDD → Pull-up network: supply
- Pull-up network → Output y: charges y
- Output y → Pull-down network: empties y
- Pull-down network → Ground: to ground
Series NMOS cost the NAND about 14 ps on the falling edge. Series PMOS cost the NOR about 70 ps on the rising edge.
| Gate | Output falls | Output rises |
|---|---|---|
| NAND2, all widths 1 µm | 50.8 ps | 78.8 ps |
| NOR2, all widths 1 µm | 36.9 ps | 149.3 ps |
| NOR2, PMOS widths 4 µm | 42.2 ps | 48.5 ps |
Measured: 10 fF load, 50 ps input edge, delay from 50 % of the input to 50 % of the output.
The lab holds the second input still and switches the transistor next to the output. Switching the other transistor is a little slower: 87.6 ps for the NAND rise and 159.6 ps for the NOR rise.
Wider PMOS make the NOR faster. With 2 µm it rises in 81.6 ps, with 3 µm in 59.8 ps and with 4 µm in 48.5 ps. That NOR has 8 µm of PMOS where the NAND has 2 µm.
Why There Is No One-Stage AND Gate
In a CMOS stage the NMOS pull the output down and the PMOS pull it up. A 1 on an input turns an NMOS on, so it can only help to make the output 0. Every single stage inverts.
An AND gate is therefore a NAND followed by an inverter: six transistors. An OR gate is a NOR followed by an inverter.
A stage that does not invert would need NMOS in the pull-up network. Measured here, such an output reaches only 1.203 V of 1.8 V. G9.3 shows why.
One stage can do more than NAND or NOR. A compound gate mixes series and parallel. The AOI21 gate computes NOT(a AND b OR c) with six transistors. Its pull-down network has a and b in series, with c in parallel to both.
Asked in interviews
Why is NAND preferred over NOR in CMOS?
A NAND has its NMOS in series and its PMOS in parallel. A NOR has its PMOS in series. A PMOS is weaker than an NMOS of the same size, so series PMOS make the rising output slow. To match a NAND, a NOR needs much wider PMOS, which costs area.
How many transistors does an N-input NAND have?
Two per input: one PMOS in the parallel pull-up network and one NMOS in the series pull-down network. A 3-input NAND has six transistors.
Why can a single CMOS stage not be an AND gate?
NMOS can only pull the output down and they turn on with a 1, so a stage always inverts. AND is a NAND plus an inverter. An NMOS in the pull-up network would pass only a weak 1.
Try It
Each line is one delay in seconds: nor_rise = 1.492998e-10 is 149.3 ps. The first number is the delay. trig and targ are the times when the input and the output crossed 0.9 V.
The NAND rises in 78.8 ps and the NOR in 149.3 ps, at the same widths. The third gate is the NOR with 4 µm PMOS: it rises in 48.5 ps.
Change W=4 to W=2 on the two lines that start with XWP, then run. norw_rise becomes 81.6 ps. Try W=3 as well: 59.8 ps.
Run the netlist to draw its plots here.
nand_fall = 5.081575e-11 targ= 1.075816e-09 trig= 1.025000e-09 nand_rise = 7.876479e-11 targ= 3.153765e-09 trig= 3.075000e-09 nor_fall = 3.689854e-11 targ= 1.061899e-09 trig= 1.025000e-09 nor_rise = 1.492998e-10 targ= 3.224300e-09 trig= 3.075000e-09 norw_fall = 4.217311e-11 targ= 1.067173e-09 trig= 1.025000e-09 norw_rise = 4.849241e-11 targ= 3.123492e-09 trig= 3.075000e-09Check Yourself
Common Mistakes
Wrong Swap series and parallel: PMOS in series and NMOS in series, or both in parallel.
Some rows then turn on both networks or neither, so the output is shorted or floats.
Fix Make the pull-up network the opposite of the pull-down network: series against parallel.
pmos pa (mid, vdd, a); // series
pmos pb (y, mid, b);
nmos na (y, mid2, a); // series too
nmos nb (mid2, gnd, b);pmos pa (y, vdd, a); // parallel
pmos pb (y, vdd, b);
nmos na (y, mid, a); // series
nmos nb (mid, gnd, b);Wrong Build an AND gate in one stage, with NMOS in the pull-up network.
An NMOS passes a weak 1: measured here, the output reaches 1.203 V of the 1.8 V supply.
Fix Build AND as a NAND followed by an inverter: six transistors.
Wrong Say "the NOR is slower because it has more transistors".
A NAND2 and a NOR2 both have four transistors; the NOR is slower because its PMOS are in series.
Fix Look at which transistor type is in series. Series PMOS costs more than series NMOS.
Wrong Fix a slow NOR by widening the PMOS and forget the cost.
To rise in 48.5 ps the NOR needs 4 µm PMOS, four times the width, which its inputs must also drive.
Fix Prefer NAND in the logic where you can, and count width as area.
Remember
- NAND: PMOS in parallel, NMOS in series. NOR: PMOS in series, NMOS in parallel.
- The pull-up network is the dual of the pull-down network, so exactly one conducts.
- At equal size a PMOS is weaker than an NMOS: 183.3 µA against 475.6 µA here.
- Series PMOS make the NOR slow to rise: 149.3 ps against 78.8 ps for the NAND.
- Every CMOS stage inverts, so AND is a NAND plus an inverter.