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.

TransientBoth Outputs Rise After the Same Input EdgeThe input falls from 1.8 V to 0 V in 50 ps. Every transistor is 1 µm wide and each output drives 10 fF.
  • v(in)
  • v(nand)
  • v(nor)
-0.5 V00.5 V1.0 V1.5 V2.0 VVoltage0100 ps200 ps300 ps400 ps500 ps600 psTimehalf of the supplyNAND: 78.8 ps after the inputNOR: 149.3 ps after the input-0.5 V00.5 V1.0 V1.5 V2.0 VVoltage0200 ps400 ps600 psTimehalf of the supplyNAND: 78.8 ps after the inputNOR: 149.3 ps after the input
  1. 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.

  2. 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.

  3. 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
Timev(in)v(nand)v(nor)
0 s1.8 V1.043 µV260.6 nV
100 ps1.797 V-149.2 µV-140.3 µV
125 ps900 mV-59.12 mV-38.81 mV
200 ps0 V849 mV391.1 mV
203.8 ps0 V900 mV418.4 mV
274.3 ps0 V1.555 V900 mV
300 ps0 V1.66 V1.058 V
400 ps0 V1.786 V1.497 V
500 ps0 V1.799 V1.692 V
600 ps0 V1.8 V1.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 CMOS NAND GateTwo PMOS in parallel form the pull-up network. Two NMOS in series form the pull-down network. Input a controls PA and NA. Input b controls PB and NB.
A CMOS NAND gateVDD1.8 VPAPBNANBababy
  1. VDD · supply1.8 Vvdd → VDD
  2. PA · PMOS transistorgate → n1 · source → VDD · drain → n2
  3. PB · PMOS transistorgate → n3 · source → VDD · drain → n2
  4. NA · NMOS transistorgate → n4 · drain → n2 · source → n5
  5. NB · NMOS transistorgate → n6 · drain → n5 · source → 0
  6. gnd · groundgnd → 0
  7. a · portterminal → n1
  8. b · portterminal → n3
  9. a · portterminal → n4
  10. b · portterminal → n6
  11. y · portterminal → n2
  1. a = 0, b = 0: y = 1

    Both PMOS are on, so two paths connect y to VDD. Both NMOS are off.

  2. a = 0, b = 1: y = 1

    PA is on and holds y at VDD. NB is on, but NA is off, so the path to ground is open.

  3. a = 1, b = 0: y = 1

    PB is on and holds y at VDD. NA is on, but NB is off, so the path to ground is still open.

  4. a = 1, b = 1: y = 0

    Both NMOS are on, so the series path connects y to 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 CMOS NOR GateThe two networks have changed places. Two PMOS in series form the pull-up network. Two NMOS in parallel form the pull-down network.
A CMOS NOR gateVDD1.8 VPAPBNANBababy
  1. VDD · supply1.8 Vvdd → VDD
  2. PA · PMOS transistorgate → n1 · source → VDD · drain → n2
  3. PB · PMOS transistorgate → n3 · source → n2 · drain → n4
  4. NA · NMOS transistorgate → n5 · drain → n4 · source → 0
  5. NB · NMOS transistorgate → n6 · drain → n4 · source → 0
  6. gnd · groundgnd → 0
  7. a · portterminal → n1
  8. b · portterminal → n3
  9. a · portterminal → n5
  10. b · portterminal → n6
  11. y · portterminal → n4
  1. a = 0, b = 0: y = 1

    Both PMOS are on, so the series path connects y to VDD. Both NMOS are off.

  2. a = 0, b = 1: y = 0

    NB is on and pulls y to ground. PB is off, so the series path to VDD is open.

  3. a = 1, b = 0: y = 0

    NA is on and pulls y to ground. PA is off, so the path to VDD is open.

  4. a = 1, b = 1: y = 0

    Both NMOS are on, so two paths connect y to 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.

GatePull-up network (PMOS)Pull-down network (NMOS)Transistors
NAND22 in parallel2 in series4
NOR22 in series2 in parallel4
NAND33 in parallel3 in series6
NOR33 in series3 in parallel6

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 wideCurrent when fully on
NMOS475.6 µA
PMOS183.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.

Which Network Moves the OutputArrows show the path of the charge. The output is a small capacitor: 10 fF in the lab.
  • Power
  • Device
  • I/O
  • Power
CallValueReturnWaiting
Which network moves the outputArrows show the path of the charge. The output is a small capacitor: 10 fF in the lab. power VDD 1.8 V supply power Ground 0 V device Pull-up network PMOS switches device Pull-down network NMOS switches io Output y the load to charge supplycharges yempties yto ground
  1. power VDD1.8 V supply
    • supply → Pull-up network
  2. device Pull-up networkPMOS switches
    • charges y → Output y
  3. io Output ythe load to charge
    • empties y → Pull-down network
  4. device Pull-down networkNMOS switches
    • to ground → Ground
  5. power Ground0 V
  1. 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
    1. data charge: VDD → Pull-up network
    2. data charge: Pull-up network → Output y
  2. The output falls

    Charge leaves y through 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
    1. data charge: Output y → Pull-down network
    2. 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.

GateOutput fallsOutput rises
NAND2, all widths 1 µm50.8 ps78.8 ps
NOR2, all widths 1 µm36.9 ps149.3 ps
NOR2, PMOS widths 4 µm42.2 ps48.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
  1. 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.

  2. 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.

  3. 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.

SPICEngspice 42 · simulator service
Edit the netlist, then run it
Expected measurements: 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-09

Check Yourself

Predict the outputOne PMOS, PB, was left out of the NAND. The program prints y for the rows 00, 01, 10 and 11. Predict the exact line.
module tb;
  logic a, b;
  wire  y, mid;
  supply1 vdd;
  supply0 gnd;
  pmos pa (y, vdd, a);     // pull-up: PB was left out
  nmos na (y, mid, a);     // pull-down: two NMOS in series
  nmos nb (mid, gnd, b);
  initial begin
    for (int i = 0; i < 4; i++) begin
      {a, b} = i[1:0];
      #1 $write("%b", y);
    end
    $display("");
  end
endmodule
ConceptHow many transistors does a 3-input CMOS NAND gate have?
ConceptWhich network of a CMOS NOR gate has its transistors in series?
ConceptA NOR2 with 1 µm transistors rises in 149.3 ps. What made it rise in 48.5 ps in the lab?
ConceptWhy is there no one-stage CMOS AND gate?

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.

Before
pmos pa (mid, vdd, a);   // series
pmos pb (y,   mid, b);
nmos na (y, mid2, a);    // series too
nmos nb (mid2, gnd, b);
After
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.

Practice

Report a problem with this page