Carry-lookahead: generate and propagate — adders

exam standardtrading gates for depth

Answer

G column 00000011, P column 00111100, C1 column 00010111

Why this example is worth doing

Rewriting the carry chain in terms of generate and propagate turns a linear ripple into a shallow tree: each carry is computed directly from the inputs instead of waiting for its neighbour. The page derives the two-bit case in full and states the general recurrence, then makes the cost explicit — the gate count grows quadratically while the depth grows logarithmically, which is the fundamental trade in arithmetic circuit design.

Try your own input in the Half adder & full adder. Truth tables, K-maps and circuits for both adders, and the ripple-carry chain.

How the answer is reached

Output table

Output table — columns A, B, C0, G, P, C1
ABC0GPC1
000000
001000
010010
011011
100010
101011
110101
111101

Compare with

Open the Half adder & full adder

This input is entered in the tool itself — it is too rich for a link to carry.

Note:

Notation this page assumes

  • Symbols: · is AND, + is OR, ⊕ is XOR, a prime or an overline is NOT. The field also takes ∧ ∨ ¬ ~ ! & | and the words.
  • Operator precedence, tightest first: NOT, then AND (including juxtaposition), then XOR/XNOR, then NAND/NOR, then OR, then IMPLIES, then IFF.
  • Gate symbols follow whichever standard the header toggle is set to: ANSI/IEEE Std 91-1984 distinctive shapes, or IEC 60617-12 rectangles.

Sources

  • Shannon, “A Symbolic Analysis of Relay and Switching Circuits” (1938)
  • ANSI/IEEE Std 91-1984, Graphic Symbols for Logic Functions