Module 2: Combinational Circuit Design · 2.1 Adder Circuits

The Carry-Lookahead Adder

In the previous article, we demonstrated that ripple-carry adders suffer from a serial carry chain dependency. This article examines the Carry-Lookahead Adder (CLA). The carry-lookahead adder eliminates serial carry propagation by calculating all carry signals directly from input operands $A$ and $B$. The design uses two auxiliary Boolean functions: Generate ($G$) and Propagate ($P$).

Generate and Propagate Logic Functions

For bit position $i$, the carry-out is expressed by the majority function:

$$C_{i+1} = A_i B_i + A_i C_i + B_i C_i = A_i B_i + (A_i + B_i)C_i$$

A carry-out asserts under two independent physical conditions:

  1. Carry Generation ($G_i$): If both $A_i = 1$ and $B_i = 1$, the stage produces a carry-out regardless of carry-in $C_i$: $$G_i = A_i \cdot B_i$$
  2. Carry Propagation ($P_i$): If one input is 1 and the other is 0, an incoming carry ($C_i = 1$) passes through to the carry-out ($C_{i+1} = 1$). $$P_i = A_i \oplus B_i \quad (\text{or } A_i + B_i)$$

Using these definitions, the stage carry-out is:

$$C_{i+1} = G_i + P_i C_i$$

Signals $G_i$ and $P_i$ depend exclusively on primary inputs $A_i$ and $B_i$. Therefore, a circuit can compute all $G_i$ and $P_i$ terms simultaneously in a single gate delay.

Mathematical Derivation of Lookahead Carries

We expand the recursive carry equations for a 4-bit block by substitution:

$$C_1 = G_0 + P_0 C_0$$

$$C_2 = G_1 + P_1 C_1 = G_1 + P_1 G_0 + P_1 P_0 C_0$$

$$C_3 = G_2 + P_2 G_1 + P_2 P_1 G_0 + P_2 P_1 P_0 C_0$$

$$C_4 = G_3 + P_3 G_2 + P_3 P_2 G_1 + P_3 P_2 P_1 G_0 + P_3 P_2 P_1 P_0 C_0$$

Notice that no carry equation references an intermediate carry signal ($C_1, C_2, C_3$). Every carry depends strictly on the primary generate signals, propagate signals, and the base carry-in $C_0$. A two-level AND-OR logic network computes all four carries concurrently.

Gate-Level Architecture of a 4-Bit CLA

A 4-bit carry-lookahead adder comprises three operational stages (Figure 1):

4-bit carry-lookahead adder
Figure 1: 4-bit carry-lookahead adder with generate/propagate logic, lookahead generator, and sum XORs

  1. Stage 1 (Generate/Propagate Logic): Computes $G_i = A_i B_i$ and $P_i = A_i \oplus B_i$ for all four bits in parallel (one gate delay).
  2. Stage 2 (Lookahead Carry Generator): Computes $C_1, C_2, C_3, C_4$ using two-level AND-OR logic networks (two gate delays).
  3. Stage 3 (Sum Generation): Computes sum bits $S_i = P_i \oplus C_i$ using parallel XOR gates (one gate delay).

Total latency for a 4-bit carry-lookahead adder is four gate delays:

$$t_{\text{CLA, 4-bit}} = 1\text{ (G/P)} + 2\text{ (Carries)} + 1\text{ (Sum)} = 4 \text{ gate delays}$$

In comparison, a 4-bit ripple-carry adder requires ten gate delays.

Numerical Trace Example

We add $A = 0110_2$ ($6_{10}$) and $B = 0101_2$ ($5_{10}$) with $C_0 = 0$.

Table 1 lists the generate and propagate terms:

Bit ($i$) $A_i$ $B_i$ $G_i = A_i B_i$ $P_i = A_i \oplus B_i$
0 0 1 0 1
1 1 0 0 1
2 1 1 1 0
3 0 0 0 0

Evaluate the lookahead carry expressions:

  • $C_1 = 0 + (1 \cdot 0) = 0$
  • $C_2 = 0 + (1 \cdot 0) + (1 \cdot 1 \cdot 0) = 0$
  • $C_3 = 1 + (0 \cdot 0) + (0 \cdot 1 \cdot 0) + (0 \cdot 1 \cdot 1 \cdot 0) = 1$
  • $C_4 = 0 + (0 \cdot 1) + (0 \cdot 0 \cdot 0) + (0 \cdot 0 \cdot 1 \cdot 0) + (0 \cdot 0 \cdot 1 \cdot 1 \cdot 0) = 0$

Evaluate the sum bits:

  • $S_0 = P_0 \oplus C_0 = 1 \oplus 0 = 1$
  • $S_1 = P_1 \oplus C_1 = 1 \oplus 0 = 1$
  • $S_2 = P_2 \oplus C_2 = 0 \oplus 0 = 0$
  • $S_3 = P_3 \oplus C_3 = 0 \oplus 1 = 1$

Result: $S = 1011_2$ ($11_{10}$) with $C_{\text{out}} = C_4 = 0$. All carries evaluated in parallel without ripple latency.

Fan-In Limits and Practical Constraints

In a flat single-level CLA, the number of gate inputs increases with word width. For bit position $k$, the carry equation requires:

  • An AND gate with $k + 1$ inputs.
  • An OR gate with $k + 1$ inputs.

For a 64-bit adder, computing $C_{64}$ requires a 65-input OR gate and a 65-input AND gate. Physical CMOS standard cells cannot implement gates with fan-in exceeding four or five inputs due to propagation delay degradation and capacitive loading. Implementing wide gates with multi-level gate trees reintroduces logarithmic delay. Therefore, flat single-level CLAs are restricted to 4-bit blocks.

Hierarchical Multi-Level Lookahead Architecture

To support wide operands without excessive gate fan-in, designers construct Hierarchical Carry-Lookahead Adders. A 4-bit block defines Block Generate ($G^*$) and Block Propagate ($P^*$) signals:

$$G^{[3:0]} = G_3 + P_3 G_2 + P_3 P_2 G_1 + P_3 P_2 P_1 G_0$$

$$P^{[3:0]} = P_3 P_2 P_1 P_0$$

A 16-bit adder combines four 4-bit CLA blocks with a second-level Lookahead Carry Unit (LCU):

  1. Each 4-bit block computes internal $G_i$ and $P_i$, and generates block terms $G^$ and $P^$.
  2. The second-level LCU evaluates block carries $C_4, C_8, C_{12}, C_{16}$ using the block $G^$ and $P^$ signals.
  3. The block carries feed back into each 4-bit module to evaluate internal carries and sum bits.

Delay Comparison

Table 2 compares propagation delays between ripple-carry adders and hierarchical lookahead adders:

Word Width ($N$) Ripple-Carry Adder ($2N + 2$) Hierarchical CLA Latency
4 bits 10 gate delays 4 gate delays
16 bits 34 gate delays 8 gate delays
32 bits 66 gate delays 10 gate delays
64 bits 130 gate delays 12 gate delays

The hierarchical CLA reduces latency growth from $O(N)$ to $O(\log N)$.

Practice Exercise

Given input operands $A = 1011_2$ ($11_{10}$), $B = 0110_2$ ($6_{10}$), and carry-in $C_0 = 1$:

  1. Calculate $G_i$ and $P_i$ for each bit position.
  2. Calculate lookahead carries $C_1, C_2, C_3, C_4$.
  3. Compute the 4-bit sum and verify the decimal arithmetic.
View Solution

Step 1: Compute $G_i$ and $P_i$:

  • Bit 0: $A_0 = 1, B_0 = 0 \implies G_0 = 0, P_0 = 1$.
  • Bit 1: $A_1 = 1, B_1 = 1 \implies G_1 = 1, P_1 = 0$.
  • Bit 2: $A_2 = 0, B_2 = 1 \implies G_2 = 0, P_2 = 1$.
  • Bit 3: $A_3 = 1, B_3 = 0 \implies G_3 = 0, P_3 = 1$.

Step 2: Evaluate Carries:

  • $C_1 = G_0 + P_0 C_0 = 0 + (1 \cdot 1) = 1$.
  • $C_2 = G_1 + P_1 G_0 + P_1 P_0 C_0 = 1 + (0 \cdot 0) + (0 \cdot 1 \cdot 1) = 1$.
  • $C_3 = G_2 + P_2 G_1 + P_2 P_1 G_0 + P_2 P_1 P_0 C_0 = 0 + (1 \cdot 1) + 0 + 0 = 1$.
  • $C_4 = G_3 + P_3 G_2 + P_3 P_2 G_1 + P_3 P_2 P_1 G_0 + P_3 P_2 P_1 P_0 C_0 = 0 + 0 + (1 \cdot 1 \cdot 1) + 0 + 0 = 1$.

Step 3: Evaluate Sums:

  • $S_0 = P_0 \oplus C_0 = 1 \oplus 1 = 0$.
  • $S_1 = P_1 \oplus C_1 = 0 \oplus 1 = 1$.
  • $S_2 = P_2 \oplus C_2 = 1 \oplus 1 = 0$.
  • $S_3 = P_3 \oplus C_3 = 1 \oplus 1 = 0$.

Result: $S = 0010_2$, with final carry $C_{\text{out}} = C_4 = 1$. Decimal Verification: $11 + 6 + 1 = 18_{10} = 10010_2$. The result is correct.

In the next article, we examine the Carry-Select Adder, which speculatively computes dual sums to reduce latency.

← The Ripple-Carry Adder The Carry-Select Adder →