3.2.1 · D2CMOS Circuit Design

Visual walkthrough — CMOS inverter structure and operation

2,020 words9 min readBack to topic

Step 1 — What a single MOSFET actually does: a valve

WHAT. Forget transistors for a moment. Picture a garden tap (a valve) on a pipe. Water flows only when you open the tap. A MOSFET is an electrical valve: a small control terminal decides whether current is allowed to flow through the main channel.

The three terminals we care about:

  • Gate (G) — the tap handle. It carries almost no current; it only controls.
  • Source (S) — where the carriers come from.
  • Drain (D) — where they flow to.

WHY introduce a valve first. The whole inverter is two of these valves stacked. If you understand one valve's ON/OFF rule, the rest is bookkeeping. We need one number to describe "how hard is the tap being turned": the gate-to-source voltage, written , which just means "gate voltage minus source voltage."

PICTURE. The red handle is the gate. When we push it past a critical amount, the channel opens.

Figure — CMOS inverter structure and operation

Step 2 — Two valves, opposite handles: the complementary pair

WHAT. Take two valves and wire them so the same wire drives both handles. Call that shared wire the input, . Stack them between the power rail (the "full tank") and ground GND (the drain, 0 V).

  • Top valve = PMOS: its source sits at .
  • Bottom valve = NMOS: its source sits at GND.
  • The point where they meet is the output, .

WHY wire them to the same input. This is the trick that makes inversion automatic. Because NMOS opens on a high handle and PMOS opens on a low handle, one input can never open both the same way. Let us prove it with the actual gate-to-source voltages.

For the NMOS (source at ):

For the PMOS (source at ):

The PMOS condition rearranges to . Since , that means " low enough." So a high input opens the bottom, a low input opens the top — never the same one.

PICTURE. The red input wire feeds both handles at once.

Figure — CMOS inverter structure and operation

Step 3 — Input LOW: the top valve wins

WHAT. Set . Check each valve.

  • NMOS: , which is not OFF (bottom shut).
  • PMOS: , which is ON (top open).

WHY this gives HIGH out. With the top open and the bottom shut, the output is connected straight to the full tank and disconnected from ground. Charge flows in until the output sits at , then stops. No path exists from to GND, so no steady current flows — this is the near-zero static power the parent note promised.

PICTURE. Red = the live path from to the output. The bottom is a broken (shut) valve.

Figure — CMOS inverter structure and operation

Step 4 — Input HIGH: the bottom valve wins

WHAT. Set . Check each valve.

  • NMOS: ON (bottom open).
  • PMOS: , which is not OFF (top shut).

WHY this gives LOW out. Now the output is connected to ground and cut off from the tank. Any charge sitting on the output drains away until . Again exactly one valve is shut, so no -to-GND current flows in steady state.

Steps 3 and 4 together are the inversion, derived not assumed:

PICTURE. Red = the live pull-down path to ground; the top is shut.

Figure — CMOS inverter structure and operation

Step 5 — The messy middle: sweeping from 0 to

WHAT. Real inputs don't teleport from 0 to ; they slide. As rises, we pass through five regimes. Plot against — this is the Voltage Transfer Characteristic (VTC).

  1. : NMOS OFF, PMOS fully ON → flat top, .
  2. NMOS just cracks open, PMOS still strong → output eases down a little.
  3. Both valves half-open and fighting → the curve plunges steeply.
  4. PMOS weakening, NMOS strong → output eases toward 0.
  5. : PMOS OFF, NMOS fully ON → flat bottom, .

WHY it is an S (backwards) shape. In regions 1 and 5 one valve is fully shut, so the output is pinned to a rail — nothing to change, hence flat. In the middle both are partly open and small input changes tip the balance hard, hence steep. The steep middle is what makes a digital device out of analog transistors: it hates the in-between and snaps to a rail.

PICTURE. The red curve is the VTC; the five regions are labelled along it.

Figure — CMOS inverter structure and operation

Step 6 — The switching threshold : where the two valves tie

WHAT. Somewhere in the plunge, equals — the VTC crosses the 45° line. Call that input the switching threshold . Here both transistors are saturated (fully "trying") and carry equal current, because at this crossing neither is winning.

WHY set the currents equal. If more current flowed down (NMOS) than in (PMOS), the output would keep falling — so it isn't the balance point. Balance means the pull-up current equals the pull-down current. Writing both saturation currents and setting them equal gives:

Term by term:

  • — the supply and the two thresholds (with ).
  • — the NMOS "strength": mobility (how fast its electrons move) times oxide capacitance times width-over-length shape .
  • — the same for the PMOS (uses hole mobility ).
  • — the strength ratio that tilts toward whichever valve is stronger.

For a symmetric inverter we want (equal noise margins, equal rise/fall). Plug in and it demands .

WHY PMOS must be wider. Holes are 2–3× slower than electrons, so . To make with the same , widen the PMOS:

PICTURE. Red dot = the crossing of the VTC with the 45° line at .

Figure — CMOS inverter structure and operation

Step 7 — The degenerate cases: rails, and the brief both-on spike

WHAT. Two edges the reader must never be surprised by.

Rail inputs (already covered, now on the picture). At and the output sits exactly on a rail: , . This full-rail swing is why CMOS has the largest possible noise margins — see Noise margins in digital logic.

The transition spike. Right at both valves are momentarily open, so a small current does briefly flow from to GND — the short-circuit current. It exists only during the nanosecond of switching, not in steady state. Together with charging the load, it makes the switching (dynamic) power:

The is why lowering the supply is the strongest power lever — see Dynamic power and clock frequency. And "static power " holds only ideally; real chips leak, per Leakage and short-channel effects.

WHY show this as a step. The naive story "one valve always shut" is steady-state true but skips the transition. A complete picture must show the spike so the reader knows where power actually goes.

PICTURE. Red = the current spike, plotted against , peaking exactly at .

Figure — CMOS inverter structure and operation

The one-picture summary

Everything above collapses into one figure: the input wire feeds both valves; the VTC shows the flat rails and the steep middle; the balance point sits on the 45° line; and the current spike lives exactly there.

Figure — CMOS inverter structure and operation
Recall Feynman: the whole walkthrough in plain words

A transistor is a valve with a handle. Stack two valves between a full tank (power) and a drain (ground), and wire both handles to the same wire (the input). One valve is built to open when you push the handle up; the other opens when you push it down. So whichever way you push, one opens and one shuts — and the meeting point in the middle gets pulled to the opposite rail from where you pushed. Push up (input HIGH) → bottom opens → output drains to ground (LOW). Push down (input LOW) → top opens → output fills to the tank (HIGH). Because one valve is always shut, no water runs straight through in steady state — that's the near-zero power. If you slide the handle slowly, there's a moment in the exact middle where both valves crack open at once and current briefly rushes through; that middle point is , ideally halfway. To make that middle sit dead-center, we widen the slower valve (the PMOS, ~2.5×) so both are equally strong. That's the entire inverter — and every other CMOS gate is just more valves wired by the same up/down logic (see CMOS logic gates (NAND NOR)).

Recall

The condition for the NMOS to conduct ::: The condition for the PMOS to conduct ::: (input low enough, ) What happens at ::: both transistors saturated, equal current, VTC crosses the 45° line Why widen the PMOS ~2.5× ::: hole mobility is ~2.5× lower, so wider restores