A complex CMOS gate implements a whole inverted sum-of-products or product-of-sums in a single stage. An AND-OR-INVERT (AOI) gate computes NOT((A AND B) OR C); an OR-AND-INVERT (OAI) gate computes NOT((A OR B) AND C). They are built with the same rule as NAND and NOR: the pull-down network implements the function, and the pull-up network is its structural dual. The result uses fewer transistors and less delay than a cascade of simple gates.

14 min read | Intermediate Level

What You'll Learn

  • How to build any inverting function as one CMOS stage using series and parallel networks
  • How to derive the pull-up network as the dual of the pull-down
  • Why AOI and OAI cells save transistors, delay, and power
  • How common functions map to AOI/OAI cells in a standard-cell netlist, and where they are used

The Recipe: Pull-Down First, Then the Dual

Building a single-stage CMOS gate for  Y = NOT( F )

  1. Write F using only AND and OR of the inputs (no inversions inside F)
  2. Pull-down network (NMOS), between Y and GND:
       AND  -> transistors in SERIES
       OR   -> transistors in PARALLEL
  3. Pull-up network (PMOS), between VDD and Y:
       the DUAL: every series becomes parallel, every parallel becomes series
  4. Check: for every input combination exactly one network conducts

  Example: Y = NOT( (A AND B) OR C )     -> AOI21
     pull-down: (NA series NB) in parallel with NC
     pull-up:   (PA parallel PB) in series with PC
pull-upPMOS (dual) pull-downNMOS VDD PA A PB B PC C Y NA A NB B NC C
AOI21: Y = NOT((A AND B) OR C) in one stage of six transistors. The pull-down implements (A AND B) OR C; the pull-up is its dual, with series and parallel swapped.

Check the dual for one case: A = 1, B = 1, C = 0. In the pull-down, NA and NB are both ON, so the series branch conducts and Y is pulled LOW. In the pull-up, PA and PB are both OFF, so the parallel pair blocks the path to VDD even though PC is ON. Exactly one network conducts, as required.

NameFunctionPull-downPull-upTransistors
AOI21NOT((A·B) + C)(A series B) || C(A || B) series C6
OAI21NOT((A + B)·C)(A || B) series C(A series B) || C6
AOI22NOT((A·B) + (C·D))(A series B) || (C series D)(A || B) series (C || D)8
OAI22NOT((A + B)·(C + D))(A || B) series (C || D)(A series B) || (C series D)8

The digits in the name give the size of each group: AOI21 has one 2-input AND group and one single input; AOI22 has two 2-input AND groups.

Why One Complex Gate Beats Several Simple Ones

FunctionAs one complex gateAs simple gatesStages
NOT((A·B) + C)AOI21: 6 transistorsNAND2 + inverter + NOR2: 10 transistors1 vs 3
NOT((A·B) + (C·D))AOI22: 8 transistorsNAND2 + NAND2 + AND2: 14 transistors1 vs 3

Fewer transistors means less area and less switched capacitance, so less dynamic power. Fewer stages usually means less delay. There is a cost: stacked transistors must be widened, so a complex gate's inputs present more capacitance than an inverter's. With the usual sizing, the stacked A and B inputs of an AOI21 have a logical effort of 2 and the C input 5/3, compared with 4/3 for a NAND2. As long as stacks stay short, the saving in stages outweighs this.

Quick Check

Q: Derive the pull-up network for Y = NOT((A + B) · C), and name the cell.

Show Answer

Pull-down: A and B in parallel, that pair in series with C. Pull-up (dual): A and B in series, that pair in parallel with C. The cell is an OAI21.

Checking the AOI21 on Every Input

The truth table of the AOI21 shows that exactly one network conducts for each of the eight input combinations. That is the property that makes a static CMOS gate: no direct path from VDD to ground, and an output that is never left floating.

ABCConducting networkY = NOT((A·B) + C)
000Pull-up1
001Pull-down0
010Pull-up1
011Pull-down0
100Pull-up1
101Pull-down0
110Pull-down0
111Pull-down0

How Functions Map to Complex Cells

Synthesis tools recognize inverted sum-of-products and product-of-sums patterns and map them to complex cells:

FunctionCellTransistors
Y = NOT((A·B) + C)AOI216
Y = NOT((A + B)·C)OAI216
Y = NOT((A·B) + (C·D))AOI228
2:1 multiplexer, Y = A·S' + B·SMUX2 cell, or an AOI22 with an inverted select plus an output inverterdepends on the cell; the AOI22 version is 8 + 2 + 2 = 12

Non-inverted versions such as (A·B) + C often come out as an AOI21 followed by an inverter (some libraries call that an AO21 cell), or the tool pushes the inversion into the next stage and uses the AOI directly. This is why synthesized netlists are full of AOI and OAI cells even though designers rarely write inverted sum-of-products explicitly.

Where Are Complex Gates Used?

Multiplexers, carry logic in adders, comparators, and next-state logic in state machines all contain AND-OR patterns, and synthesized versions of these blocks rely heavily on AOI and OAI cells. The carry of a full adder, for example, is a majority function that maps naturally onto a single complex gate, which is why fast adder cells are built from them.

Where Do Complex Gates Show Up When Reading Netlists?

Engineers debugging gate-level simulations, equivalence-checking failures, or ECO (engineering change order) fixes read netlists full of cells like AOI21, OAI22, and AOI222. Knowing that each is one inverting stage with a known series-parallel structure makes it much easier to trace a signal and to reason about which input is on the slow, stacked side of the gate.

Limits: How Complex Can a Gate Get?

Any inverting function can in principle be built as one stage, but tall stacks become slow:

Stack height trade-off

  more inputs in series  ->  each transistor must be wider
                         ->  more input capacitance, more internal node capacitance
                         ->  slower, especially for the input farthest from the output

  practical limit: about 3-4 transistors in series in either network
  beyond that: split into two stages (e.g. AOI + NAND)

Within a stack, input order matters too. The input connected to the transistor nearest the output switches fastest, because the internal nodes below it are already charged or discharged. Libraries document which pin is fastest, and timing tools route the latest-arriving signal to it when they can swap logically equivalent pins.

Common Mistakes

Mistake #1: Forgetting that complex gates are inverting

An AOI21 computes NOT((A · B) + C), not (A · B) + C. Reading netlists without accounting for the built-in inversion leads to wrong conclusions about signal polarity when debugging.

Mistake #2: Copying the pull-down structure into the pull-up

The pull-up must be the dual: series and parallel swapped. If both networks have the same structure, some input combinations turn both on (a direct short from VDD to GND) and others turn both off (a floating output).

Mistake #3: Putting inversions inside the function

A single CMOS stage can only produce NOT(F) where F uses the inputs directly. A term such as (A · NOT B) needs NOT B from a separate inverter first. Complex gates are built from true inputs; inversions come from elsewhere.

Mistake #4: Building very tall stacks to save a stage

A gate with five or six transistors in series is slower than two well-sized stages. Keep stacks to about three or four and split larger functions.

Practice Exercise

Challenge: Design an OAI22

Y = NOT((A + B) · (C + D)).

  1. Describe the pull-down and pull-up networks.
  2. How many transistors does it need, and how many would the same function need using two OR2 cells and a NAND2?
  3. Check that your two networks are duals by testing the input A = 1, B = 0, C = 1, D = 0.
Hint

OR groups become parallel pairs in the pull-down, and the AND between groups becomes series. Then take the dual for the pull-up.

Solution
1. Pull-down: (NA || NB) in series with (NC || ND)
   Pull-up:   (PA series PB) in parallel with (PC series PD)

2. OAI22: 8 transistors, one stage
   OR2 = NOR2 + inverter = 6 transistors each
   2 x OR2 + NAND2 = 6 + 6 + 4 = 16 transistors, 3 stages

3. A = 1, B = 0, C = 1, D = 0: (A + B) = 1 and (C + D) = 1, so the series
   pair of parallel groups conducts and the pull-down pulls Y low.
   In the pull-up, PA is OFF (A = 1), so the series path PA-PB is open;
   PC is OFF (C = 1), so PC-PD is open too. Exactly one network conducts.
  

Summary

In this tutorial, you learned:

  • Any inverting function NOT(F) can be built as one CMOS stage from series (AND) and parallel (OR) transistors
  • The pull-up network is always the structural dual of the pull-down network
  • AOI and OAI gates save transistors, area, power, and stages compared with cascades of simple gates
  • Stacked inputs have higher logical effort, so stacks are kept to about three or four transistors
  • Synthesis tools map inverted sum-of-products and product-of-sums patterns to AOI and OAI cells
  • Complex gates are inverting and cannot contain internal inversions
Did you find what you were looking for?

Quiz

No quiz questions available for this article.