Skip to content
Tutorials Center
My learning

Topics

Lesson 13 of 57 ยท Logic Gates

Logic Families: TTL vs CMOS, Fan-out and Propagation Delay

Compare TTL and CMOS logic families: voltage levels, noise margin, fan-in and fan-out, propagation delay and power, with Python calculators for each rule.

Until now a gate has been an ideal box: inputs go in, a perfect 0 or 1 comes out, instantly. A real gate is a small circuit of transistors. It has a supply voltage, voltage thresholds, a limited ability to drive other gates, a delay, and a power bill. A set of gate types built with the same technology and compatible electrical rules is called a logic family. Knowing the main families explains why some chips run on 5 V and others on 1 V, why old designs used so much power, and why you can only connect so many gates to one output.

This lesson compares the two families you will meet most often, TTL and CMOS, and then looks at the parameters that matter: voltage levels, noise margin, fan-in, fan-out, propagation delay and power. The numbers below are typical values from classic 5 V data sheets (the 74LS series for TTL and the 74HC series for CMOS). Exact values differ between chips, so always read the data sheet of the part you use.

Two families, two kinds of transistor

TTL (transistor-transistor logic) is built from bipolar junction transistors. Each input draws a small current from the previous gate, and each output sinks or sources current. TTL dominated from the 1960s through the 1980s. It is fast for its age and robust, but every gate burns power even when it is not switching.

CMOS (complementary metal-oxide-semiconductor) uses pairs of field-effect transistors: a P-type transistor that connects the output to the supply, and an N-type transistor that connects it to ground. For any stable input, exactly one of the pair conducts, so there is almost no path from supply to ground. CMOS gates draw current only while they switch. A gate's input is the insulated gate of a transistor, so it draws almost no steady current. Every modern processor and memory chip is CMOS.

flowchart TB
    VDD["Supply +V"] --> P["P-type transistor: on when input is 0"]
    P --> OUT(("Output"))
    OUT --> N["N-type transistor: on when input is 1"]
    N --> GND["Ground"]
    IN["Input"] --> P
    IN --> N

A CMOS inverter. Input 0 turns the upper transistor on and the output goes to +V. Input 1 turns the lower one on and the output goes to ground.

Voltage levels and noise margin

Every family defines four voltage limits, shown in the table. Output levels are what a gate promises to deliver, and input levels are what the next gate promises to accept.

Symbol Meaning 74LS (TTL) 74HC (CMOS, 5 V)
VOH Lowest output voltage guaranteed for a 1 2.7 V 4.4 V
VOL Highest output voltage guaranteed for a 0 0.5 V 0.1 V
VIH Lowest input voltage still read as a 1 2.0 V 3.5 V
VIL Highest input voltage still read as a 0 0.8 V 1.0 V

The gap between what a driver delivers and what a receiver demands is the noise margin, the amount of unwanted voltage the signal can pick up on the wire without being misread. There are two:

TEXT
NM_high = VOH - VIH
NM_low  = VIL - VOL

For the 74LS family NM_high is 0.7 V and NM_low is 0.3 V. For 74HC they are 0.9 V and 0.9 V. CMOS has larger and more balanced margins, one more reason it is popular. For the idea of noise margin, see Digital vs Analog.

Mixing families raises a compatibility question: can output A drive input B? The rule is that the driver's VOH must be at least the receiver's VIH, and the driver's VOL at most the receiver's VIL. An LS output driving an HC input fails on the high level (2.7 V is below 3.5 V), which is why some chips come in "TTL-compatible CMOS" versions with lower input thresholds.

Fan-in and fan-out

Fan-in is the number of inputs of a gate. A 3-input NAND has a fan-in of 3. More inputs mean more transistors in series, so the gate is slower and larger. Wide functions are therefore built from trees of small gates.

Fan-out is the number of gate inputs a single output can drive while keeping its voltage levels within specification. Each connected input loads the output by drawing a little current in the high or low state. The output is able to supply or absorb only so much current, so:

TEXT
fan-out (high) = IOH(max) / IIH
fan-out (low)  = IOL(max) / IIL
fan-out        = the smaller of the two

For TTL the input and output currents are real and limit the fan-out to about 10 to 20 gates. For CMOS the steady input current is almost zero, so the DC fan-out is huge in theory. What really limits CMOS is the capacitance of each input and of the wire: every extra input adds capacitance that the driver must charge and discharge, which makes the signal slower.

Python Noise margins, compatibility and fan-out

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The DC fan-out of 74HC comes out as 4000 and looks absurd. No designer drives four thousand inputs from one pin, because the capacitance of that many inputs would make the signal crawl. Treat the DC number as the electrical ceiling, not the practical limit.

Propagation delay

A gate cannot change its output at the same moment the input changes. The time between the input crossing its threshold and the output crossing its own is the propagation delay, written tp. Rising and falling transitions often take different times, so data sheets give tPLH (low to high) and tPHL (high to low); designs use the larger one, or their average for estimates.

Delays add up along a path. The speed of a combinational circuit is set by its critical path, the slowest input-to-output chain of gates. For a flip-flop-based system, this path decides the shortest clock period, as shown in timing and metastability. Typical values: about 10 ns per gate for 74LS, about 8 ns for 74HC at 5 V, and well below 100 picoseconds for gates inside a modern chip.

Delay grows with the load. A gate that drives many inputs and a long wire must charge more capacitance, so its output edge is slower. A common model is delay = intrinsic delay + k * load, with k depending on the drive strength. This is also why wide fan-out is solved with buffers: a tree of buffers drives many loads faster than one gate straining on its own.

Power

Power matters as much as speed, and the two families differ greatly:

  • Static power is drawn while nothing switches. TTL has a large one, because current flows from supply to ground inside every gate in at least one logic state. CMOS has a near-zero static power, only a small leakage current (although leakage becomes important in the smallest modern transistors).
  • Dynamic power is drawn while signals change. Each switching event charges and discharges the load capacitance. The standard formula is P = a * C * V^2 * f, with a the fraction of gates that switch in a clock cycle, C the switched capacitance, V the supply voltage and f the clock frequency.

The formula explains the history of supply voltages. Power grows with the square of the voltage, so dropping from 5 V to 3.3 V cuts dynamic power to 44 percent, and dropping to 1 V cuts it to 4 percent. Chips moved from 5 V to 3.3 V, 1.8 V, and about 1 V and below for exactly this reason.

Python Delay along a path and dynamic power

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Practical points

  • Unused inputs. A CMOS input left unconnected floats and can pick up noise and waste current, so tie it to the supply or to ground. TTL inputs left open tend to float high, but connecting them properly is still the right habit.
  • Decoupling. Gates switching together draw sharp current spikes, so every chip gets a small capacitor between supply and ground close to it.
  • Mixed voltages. When parts with different supplies talk, you need a level shifter, or an open-drain output with a pull-up to the receiver's supply.
  • Other families. ECL (emitter-coupled logic) was the fastest in the old days and used a lot of power. Today CMOS has absorbed almost everything, and its sub-families (for example "low-voltage CMOS") mainly differ in supply and speed.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A driver has VOH = 2.7 V and VOL = 0.5 V. The receiver needs VIH = 2.0 V and VIL = 0.8 V. What are the noise margins?

    NM_high = VOH - VIH = 0.7 V and NM_low = VIL - VOL = 0.3 V. The smaller margin sets how much noise the connection tolerates.
  2. 2. Why does a CMOS gate use almost no power when its inputs are stable?

    In a CMOS gate the pull-up and pull-down networks are never both on in a steady state, so only leakage current flows.
  3. 3. A gate output can sink 8 mA when low, and each connected input draws 0.4 mA when low. What is the low-state fan-out?

    Fan-out is the output current capability divided by the input current: 8 / 0.4 = 20.
  4. 4. Dynamic power is proportional to the square of the supply voltage. By what factor does it drop when the supply goes from 3.3 V to 1.65 V?

    Halving the voltage multiplies power by (1/2)^2 = 1/4, with everything else equal.

Summary

  • A logic family is a set of gate types that share one technology and electrical rules. TTL (bipolar) was the classic; CMOS (complementary FETs) is used in all modern chips.
  • Noise margins are VOH - VIH (high) and VIL - VOL (low). A driver can feed a receiver only if its output levels satisfy the receiver's input thresholds.
  • Fan-in is the number of inputs of a gate. Fan-out is how many inputs one output can drive, set by current for TTL and in practice by capacitance for CMOS.
  • Propagation delay (tp) adds up along the critical path and grows with load. Buffers speed up large fan-outs.
  • CMOS has almost no static power. Its dynamic power is a * C * V^2 * f, which is why supply voltages keep falling.

Next, put gates to work in Boolean laws.