Module 1: Foundations of Digital Logic · 1.3 Logic Gates & Truth Tables

Multi-Input Gates, Compound Cells, Tri-State, and Transmission Gates

Standard cell libraries contain many specialized logic cells beyond the seven basic gates. This article examines multi-input gates, compound cells, tri-state drivers, open-drain circuits, and bidirectional transmission gates.

Multi-Input Gates

The associative property allows multi-input implementations for AND, OR, and XOR operations:

$$A \cdot B \cdot C = (A \cdot B) \cdot C = A \cdot (B \cdot C)$$

$$A + B + C = (A + B) + C = A + (B + C)$$

An $n$-input AND gate outputs logic 1 only when all $n$ inputs evaluate to 1. An $n$-input OR gate outputs logic 0 only when all $n$ inputs evaluate to 0.

An $n$-input XOR gate outputs logic 1 when an odd number of inputs evaluate to 1. This function computes arithmetic parity:

$A$ $B$ $C$ $A \oplus B$ $(A \oplus B) \oplus C$ Active 1s Count Parity Output
0 0 0 0 0 0 0 (Even)
0 0 1 0 1 1 1 (Odd)
0 1 0 1 1 1 1 (Odd)
0 1 1 1 0 2 0 (Even)
1 0 0 1 1 1 1 (Odd)
1 0 1 1 0 2 0 (Even)
1 1 0 0 0 2 0 (Even)
1 1 1 0 1 3 1 (Odd)

Topology Comparison: Linear Chain versus Balanced Tree

Figure 1 illustrates two configurations for a 4-input XOR gate:

Chain versus tree
Figure 1: Comparison between a linear cascade chain and a balanced binary tree

  • Linear Chain: An $N$-input cascade requires $N - 1$ gate delay stages. For a 16-input input bus, this configuration introduces 15 stages of propagation delay.
  • Balanced Tree: A binary tree requires $\lceil \log_2 N \rceil$ gate delay stages. A 16-input tree introduces only 4 stages of propagation delay.

In Verilog RTL, bitwise reduction operators instruct synthesis tools to construct balanced trees:

assign parity = ^data_bus; // Synthesis builds an optimal XOR tree

Compound Cells: AOI and OAI

Compound cells implement two-level logic functions within a single CMOS stage. This design reduces transistor count and propagation delay.

An AND-OR-INVERT (AOI21) cell implements:

$$Y = \overline{(A \cdot B) + C}$$

A discrete gate implementation requires an AND gate (6 transistors), an OR gate (6 transistors), and an inverter (2 transistors), totaling 14 transistors across two logic levels.

A single-stage CMOS AOI21 cell requires only 6 transistors. The pull-down network connects NMOS transistors A and B in series, placed in parallel with NMOS transistor C. The pull-up network implements the complementary PMOS dual.

$A$ $B$ $C$ $A \cdot B$ $(A \cdot B) + C$ AOI21 Output $Y$
0 0 0 0 0 1
0 0 1 0 1 0
0 1 0 0 0 1
0 1 1 0 1 0
1 0 0 0 0 1
1 0 1 0 1 0
1 1 0 1 1 0
1 1 1 1 1 0

Other standard compound cells include:

  • AOI22: $Y = \overline{(AB) + (CD)}$ (8 transistors vs. 20 in discrete gates)
  • OAI21: $Y = \overline{(A + B) \cdot C}$ (Dual of AOI21)

Sum-of-Products expressions map directly to AOI cells. Product-of-Sums expressions map directly to OAI cells.

Tri-State Buffers

A tri-state buffer provides three distinct electrical output states: logic LOW (0), logic HIGH (1), and high impedance (High-Z). In the High-Z state, the output disconnects electrically from the shared wire.

Tri-state buffer
Figure 2: Tri-state buffer schematic symbol and control interface

Enable ($EN$) Data Input ($IN$) Data Output ($OUT$)
0 0 High-Z
0 1 High-Z
1 0 0
1 1 1

Tri-state drivers enable multiple transmitter devices to share a common physical bus line.

Shared bus with tri-state drivers
Figure 3: Shared communication bus using tri-state output drivers

A bus arbiter must ensure that only one driver is active simultaneously. If two drivers assert opposing logic states simultaneously, bus contention occurs. Heavy cross-conduction current flows between $V_{DD}$ and ground, causing intermediate voltage states and potential thermal damage.

Note: Modern FPGA architectures do not support internal tri-state buses. FPGAs replace internal tri-state buses with multiplexer networks. Tri-state buffers remain standard in chip I/O pads and bidirectional PCB buses.

Open-Drain Outputs

An open-drain output contains an active NMOS pull-down transistor but omits the PMOS pull-up network. The output can drive logic LOW (0) or float in High-Z. An external pull-up resistor connected to $V_{DD}$ provides the logic HIGH level.

Open-drain outputs sharing a wire
Figure 4: Multiple open-drain output drivers sharing a communication line with an external pull-up resistor

Connecting multiple open-drain outputs to a single line creates a wired-AND configuration. The line pulls LOW if any connected device activates its pull-down transistor. The line reaches logic HIGH only when all connected devices release the bus.

The $I^2C$ serial communication bus uses open-drain outputs on its Serial Data (SDA) and Serial Clock (SCL) lines to support bidirectional multi-master operation and clock stretching.

CMOS Transmission Gates

A CMOS transmission gate (pass gate) connects one NMOS transistor and one PMOS transistor in parallel, controlled by complementary gate enable signals ($EN$ and $EN’$).

Transmission gate
Figure 4: CMOS transmission gate containing parallel NMOS and PMOS transistors

When $EN = 1$, both transistors conduct and connect terminal A to terminal B through a low-resistance path. When $EN = 0$, both transistors turn off, isolating the terminals.

Transmission gates offer two operational characteristics:

  1. Bidirectional Signal Flow: Signals propagate in either direction between terminals.
  2. Full Voltage Swing: An isolated NMOS device passes logic 0 cleanly but degrades logic 1 by a threshold voltage drop ($V_{DD} - V_{th}$). An isolated PMOS device passes logic 1 cleanly but degrades logic 0. Connecting both devices in parallel passes both logic states across full rail-to-rail voltages.

2:1 mux from transmission gates
Figure 6: A 2:1 multiplexer implemented using two transmission gates and an inverter

A 2:1 multiplexer built with transmission gates requires only six transistors (two transmission gates and one control inverter), compared to twelve transistors in an AND-OR implementation.

Practice Exercises

Exercise 1: You must calculate an even parity bit for a 4-bit data word ($D_3, D_2, D_1, D_0$). State the Boolean equation for the parity bit ($P$).

View Solution

Even parity requires that the total count of 1s in the 5-bit codeword ($P, D_3, D_2, D_1, D_0$) is even. Parity bit $P$ must evaluate to 1 when the 4 data bits contain an odd number of 1s:

$$P = D_3 \oplus D_2 \oplus D_1 \oplus D_0$$

A balanced binary tree implementation uses three 2-input XOR gates across two logic levels.

Exercise 2: Two tri-state drivers connect to a common wire. An arbitration error causes Driver 1 to drive logic 1 ($V_{DD}$) while Driver 2 drives logic 0 (ground). Describe the electrical consequences.

View Solution

A low-impedance short circuit forms between $V_{DD}$ and ground through Driver 1’s PMOS pull-up transistor and Driver 2’s NMOS pull-down transistor. Large current flows through the circuit. The bus voltage settles at an intermediate, indeterminate logic level. This condition causes excessive thermal dissipation and can permanently damage the output driver transistors.

Exercise 3: Compare the transistor count and logic levels of an AOI22 cell versus an equivalent circuit built using discrete standard gates to compute $F = \overline{AB + CD}$.

View Solution
  • Single AOI22 Cell: Implements the function using 8 transistors across 1 logic gate level.
  • Discrete Gates: Requires two 2-input AND gates (6 transistors each = 12), one 2-input OR gate (6 transistors), and one inverter (2 transistors). Total: 20 transistors across 2 logic gate levels.

The AOI22 cell saves 12 transistors and reduces propagation delay by one gate level.

← The Seven Basic Logic Gates Universal Logic Gates: NAND and NOR Implementations →