Introduction

A combinational circuit computes outputs from current inputs only: no memory, no clocks. Design means turning a worded specification into a gate network (or a chip-level connection of MSI blocks) whose truth table matches the specification. Analysis is the reverse: reading a given network back into equations and a truth table.

This note covers the design and analysis procedures, propagation delay and the critical path, and the standard small designs that GATE uses as exercises: comparators, parity generators and checkers, and code converters. Adders, multiplexers and decoders are specialised instances treated in their own notes.

Prerequisites

  • Karnaugh Maps: minimization of the equations you obtain from a truth table.

Core concepts

Definition and restrictions

  • Outputs Z=F(X)Z = F(X) for input vector XX. No feedback that creates state (pure feed-forward logic, an acyclic network).
  • Timing: after inputs settle, wait for the propagation delay of the longest path; then outputs are valid.

Propagation delay and the critical path

Model every gate gg with a delay tgt_g. The delay of a path is the sum of the gate delays along it, and the circuit's delay is the longest input-to-output path, the critical path. In the unit-delay model every gate costs 1, so the delay equals the number of gate levels on the deepest path.

  • A two-level SOP has delay 2 (plus 1 if complemented inputs need an inverter level).
  • A balanced tree of two-input gates, with leaves distributed to attain minimum depth, combining nn signals with an associative operation has ⌈lg⁡n⌉\lceil \lg n \rceil levels; a chain of the same gates has n−1n - 1 levels. Both use n−1n - 1 gates.

Convention used in all Gate CS Mastery DL notes. Unless a question gives other values, gate delays are counted in the unit-delay model, and complemented inputs are assumed available (no inverter level).

Design procedure

  1. State the problem: list inputs, outputs, and the meaning of each.
  2. Assign 0/1 encodings to symbolic values if needed.
  3. Build a truth table (or leave don't-cares for unused input combinations).
  4. Minimize each output (K-map or QM), choose SOP or POS to match available gates.
  5. Draw the gate diagram (or map onto MUX/decoder/ROM/PLA).
  6. Check the table against the circuit on every row, including don't-care decisions.
Flowchart of combinational design: specification, truth table, minimized SOP or POS, gate network or MSI map, verification of all rows.
Figure 1. Combinational design flow from specification to verified gate network.

Analysis versus design

Analysis starts from a diagram and produces equations or a truth table: label every gate output, write each as a function of its inputs, and substitute from the inputs forward. Design goes the other way. Both are used in this note.

Technology mapping (exam level)

TargetWhat it stores or computesSize measure
Two-level gatesminimized SOP (AND-OR, NAND-NAND) or POS (OR-AND, NOR-NOR)gates, literals
MultiplexerShannon expansion on the select inputsone 2k2^k-to-1 MUX per output
Decoder plus ORone OR per output over the decoder lines of its mintermsone nn-to-2n2^n decoder
ROMthe whole truth table: 2n2^n words of mm bits2n×m2^n \times m bits
PLAprogrammable AND array and programmable OR arraynn inputs, kk shared products, mm outputs
PALprogrammable AND array, fixed OR arrayproducts per output are fixed

A ROM is a decoder (fixed AND array generating all minterms) followed by a programmable OR array, so its size does not depend on how simple the functions are. A PLA pays only for the distinct product terms the minimized outputs use, so multi-output sharing matters.

How it works

Analysis of a NAND network

Gates: t1=(ab)′t_1 = (ab)', t2=(bc)′t_2 = (bc)', t3=(ca)′t_3 = (ca)', f=(t1t2t3)′f = (t_1 t_2 t_3)'. Substituting and applying De Morgan once, f=ab+bc+caf = ab + bc + ca: the majority function. A two-level NAND-NAND network is always the SOP obtained by reading every NAND as an AND in the first level and as an OR in the second.

Magnitude comparator

For nn-bit unsigned AA and BB, let xi=aibi+ai′bi′x_i = a_i b_i + a_i' b_i' (ai⊙bia_i \odot b_i, bit ii equal). For n=2n = 2:

EQ=x1x0,GT=a1b1′+x1a0b0′,LT=a1′b1+x1a0′b0.EQ = x_1 x_0,\qquad GT = a_1 b_1' + x_1 a_0 b_0',\qquad LT = a_1' b_1 + x_1 a_0' b_0 .

The pattern extends to nn bits: A>BA > B when, at the most significant position where they differ, ai=1a_i = 1 and bi=0b_i = 0. So GT=∑iaibi′∏j>ixjGT = \sum_{i} a_i b_i' \prod_{j > i} x_j. Exactly one of EQEQ, GTGT, LTLT is 1 on every row, so any one of them can be derived from the other two: LT=(EQ+GT)′LT = (EQ + GT)'.

Parity generator and checker

An even-parity generator for data bits d1,…,dnd_1, \ldots, d_n outputs P=d1⊕⋯⊕dnP = d_1 \oplus \cdots \oplus d_n, so that the n+1n + 1 transmitted bits contain an even number of 1s. The checker recomputes C=P⊕d1⊕⋯⊕dnC = P \oplus d_1 \oplus \cdots \oplus d_n; C=1C = 1 signals an error.

  • For data 10111011, P=1P = 1 and the transmitted word 1011 11011\,1 has four 1s.
  • A single flipped bit makes C=1C = 1. Two flipped bits leave C=0C = 0: parity detects every odd number of bit errors and no even number.
  • nn data bits need n−1n - 1 two-input XOR gates in the generator; as a balanced tree the delay is ⌈lg⁡n⌉\lceil \lg n \rceil XOR levels (2 levels for 4 bits, 3 for 8).

Odd parity uses P′P' instead of PP.

Code converter: BCD to Excess-3

Inputs ABCDABCD (a BCD digit, AA the MSB), outputs wxyzwxyz equal to the digit plus 3. The six codes 1010 to 1111 never occur, so they are don't-cares. Minimizing each output with them:

w=A+BC+BD,x=B′C+B′D+BC′D′,y=CD+C′D′,z=D′.w = A + BC + BD,\quad x = B'C + B'D + BC'D',\quad y = CD + C'D',\quad z = D'.

Note y=(C⊕D)′y = (C \oplus D)' and z=D′z = D'. If every output is forced to 0 on invalid inputs, the example ww becomes AB′C′+A′BC+A′BDAB'C' + A'BC + A'BD (9 literals instead of 5).

Binary to Gray converter

gn−1=bn−1g_{n-1} = b_{n-1} and gi=bi+1⊕big_i = b_{i+1} \oplus b_i: n−1n - 1 XOR gates in one level, delay 1. The Gray-to-binary converter bi=bi+1⊕gib_i = b_{i+1} \oplus g_i is a chain, so its delay is n−1n - 1 XOR levels (see the Binary Codes note).

Algorithms and pseudocode

Pseudocode uses <- for assignment; a circuit is a directed acyclic graph of gates.

Text
COMB-DESIGN(spec)
1  (inputs, outputs, rules) <- parse spec
2  table <- empty
3  for each input assignment x
4      if x is impossible then mark outputs don't-care
5      else set outputs from rules
6  for each output z
7      expr[z] <- minimize(column z of table)
8  circuit <- synthesize(expr)
9  assert EVAL(circuit) agrees with table on all care rows
10 return circuit

CRITICAL-PATH(circuit)              // gates in topological order
1  for each primary input v: arrival[v] <- 0
2  for each gate g in topological order
3      arrival[g] <- t_g + max over inputs u of g of arrival[u]
4  return max over outputs o of arrival[o]

COMB-DESIGN takes Θ(2n)\Theta(2^n) rows to fill the table, plus the minimization cost. CRITICAL-PATH is a longest-path computation on a DAG: Θ(V+E)\Theta(V + E) time for VV gates and EE wires.

Mathematical explanation

Counting circuits by behaviour. An nn-input, mm-output combinational circuit computes a map {0,1}n→{0,1}m\{0,1\}^n \to \{0,1\}^m. There are (2m)2n=2m 2n(2^m)^{2^n} = 2^{m\,2^n} such maps, and a ROM with nn address bits and mm-bit words can hold any one of them, which is why its size is 2n×m2^n \times m bits regardless of the function.

ROM sizing. A 4-bit by 4-bit unsigned multiplier has 8 inputs and an 8-bit product (the largest product is 15⋅15=225<25615 \cdot 15 = 225 < 256), so a ROM realization needs 28×8=20482^8 \times 8 = 2048 bits. A 4-bit adder with carry-in has 9 inputs and 5 outputs: 29×5=25602^9 \times 5 = 2560 bits.

Why parity misses even errors. Flipping bit ii toggles CC because CC is the XOR of all received bits. Flipping kk bits toggles CC kk times, so CC ends at k mod 2k \bmod 2.

Worked examples

Example 1: majority of three

f(a,b,c)=1f(a,b,c)=1 when at least two inputs are 1. Minterms m(3,5,6,7)m(3,5,6,7). K-map: f=ab+bc+caf=ab+bc+ca. Three 2-input ANDs and one 3-input OR; delay 2 levels.

Example 2: analysis of a product of sums

Given f=(a+b)(a′+c)f=(a+b)(a'+c). Expanding, f=aa′+ac+a′b+bc=ac+a′b+bc=ac+a′bf=aa'+ac+a'b+bc = ac + a'b + bc = ac + a'b, since bcbc is the consensus of acac and a′ba'b. The minterms are {2,3,5,7}\{2, 3, 5, 7\}. It is not the majority function: at a=b=1,c=0a = b = 1, c = 0 the majority is 1 but f=0f = 0.

Example 3: don't-care driven shrink

A three-input function is 1 on m(0,2,5,7)m(0,2,5,7) and don't-care on m(1,3)m(1,3). As in Karnaugh Maps, the don't-cares give f=A′+Cf = A' + C (2 literals) instead of A′C′+ACA'C' + AC (4 literals).

Example 4: critical path with unequal gate delays

Network: g1=abg_1 = ab (AND, 2 ns), g2=g1+cg_2 = g_1 + c (OR, 2 ns), g3=g2′g_3 = g_2' (NOT, 1 ns), f=g3⊕df = g_3 \oplus d (XOR, 3 ns). Arrival times: g1g_1 at 2, g2g_2 at 4, g3g_3 at 5, ff at 8 ns. The critical path is aa (or bb) through all four gates, 8 ns; the path from dd is only 3 ns. In the unit-delay model the depth is 4.

Example 5: comparator values

For A=102A = 10_2 and B=012B = 01_2: x1=0x_1 = 0, x0=0x_0 = 0, so EQ=0EQ = 0; GT=a1b1′=1GT = a_1 b_1' = 1; LT=0LT = 0. For A=B=112A = B = 11_2: x1=x0=1x_1 = x_0 = 1, EQ=1EQ = 1, GT=LT=0GT = LT = 0. Over all 16 input rows the three outputs are 1 on 4, 6 and 6 rows respectively.

Example 6: PLA sharing

Outputs F1=ab+a′cF_1 = ab + a'c and F2=ab+bc′F_2 = ab + bc'. A PLA needs only the three distinct products abab, a′ca'c, bc′bc' (the product abab is shared), while two separate two-level circuits would build four AND gates.

Important properties and observations

  • Feedback with delay can create latches unintentionally; keep combinational diagrams acyclic.
  • Related material. Static-1 hazards: a single input change can momentarily drop an SOP output that should stay 1 when the two adjacent 1-cells lie in different product terms. For f=ab′+bcf = ab' + bc with a=c=1a = c = 1, a change of bb can glitch; adding the redundant consensus term acac removes the hazard (see Karnaugh Maps).
  • Multi-output sharing: extract common product terms once; it matters for PLAs, not for ROMs.
  • Gate count and delay trade off: a balanced tree and a chain of n−1n - 1 two-input gates have the same gate count but delays ⌈lg⁡n⌉\lceil \lg n \rceil and n−1n - 1.

Common misconceptions.

  • "Combinational circuits can use flip-flops for pipelining and stay combinational." Pipelining inserts state; the block between registers is combinational, the system is sequential.
  • "Don't-cares mean the output is 0." They mean the designer may choose.
  • "Circuit delay is the number of gates." It is the longest path, which can be much shorter than the gate count.
  • "A ROM for a simple function is smaller." ROM size is 2n×m2^n \times m for every function of nn inputs and mm outputs.
  • "Parity detects all double errors." It detects none of them.

GATE examination perspective

  • TRUTH TABLE FIRST. Half the marks are encoding the word problem correctly.
  • MINIMIZE EACH OUTPUT. Shared terms are a bonus when options show them.
  • MSI IMPLEMENTATION. "Realize using 8:1 MUX" means Shannon expand on three select bits.
  • ANALYSIS. Read a gate figure into an equation; simplify; match options.
  • CRITICAL PATH. Add delays along every path and take the maximum; with unequal gate delays the deepest path need not be the slowest.
  • ROM SIZE. 2inputs×outputs2^{\text{inputs}} \times \text{outputs} bits; count the output width carefully (an unsigned product of two kk-bit numbers fits in 2k2k bits, required in the worst case for k≥2k\ge2; for k=1k=1, one bit suffices).
  • PARITY. Generator n−1n - 1 XORs; detects odd numbers of errors only.

Summary

Sources

  1. M. Morris Mano, M. D. Ciletti, Digital Design, 5th ed., Pearson, 2013: Chapter 3, Section 3.8 (exclusive-OR function, parity generation and checking); Chapter 4, Sections 4.2 to 4.4 (combinational circuits, analysis, design procedure) and 4.8 (magnitude comparator).

Next steps