Skip to content
BetterDL

Carry-lookahead adder

Also called: carry-lookahead, CLA, lookahead adder, carry look-ahead adder

A fast adder that computes every carry directly from the generate and propagate signals and C0, instead of waiting for carries to ripple through each stage.

A ripple carry adder is slow because each carry waits for the one below it. But each carry is just a Boolean function of the inputs, so a carry-lookahead adder (CLA) computes all of them directly, in parallel.

Start from the generate and propagate recurrence Cᵢ₊₁ = Gᵢ + PᵢCᵢ, and keep substituting the carry below until only G's, P's and C0 remain:

  • C1 =
  • C2 =
  • C3 =
  • C4 =

Read each product term as a story: a carry starts somewhere (at a G, or at C0), and every position above it propagates it.

Speed. In the course's gate delay model, with gates as wide as needed: G and P are ready at 1, every carry (a two-level AND-OR) at 3, and every sum Sᵢ = Pᵢ ⊕ Cᵢ at 4, for any width. A 4-bit ripple adder needs 9 for C4.

Cost. Cᵢ has i + 1 product terms, the longest with i + 1 inputs. At 64 bits that would mean a 65-input AND gate, and building one from small gates adds the delay back. Real designs use small lookahead blocks, typically 4 bits, and repeat the G/P idea between blocks (block carry lookahead).

G1P1G0P0C0C2

Worked example

Example

Lookahead carries for 0110 + 0011

6 + 3 with C0 = 0.

  1. 1.

    G (bitwise AND): G3 = 0, G2 = 0, G1 = 1, G0 = 0.

  2. 2.

    P (bitwise XOR): P3 = 0, P2 = 1, P1 = 0, P0 = 1.

  3. 3.

    C1 = G0 + P0C0 = 0 + 1·0 = 0.

  4. 4.

    C2 = G1 + P1G0 + P1P0C0 = 1.

  5. 5.

    C3 = G2 + P2G1 + P2P1G0 + P2P1P0C0 = 0 + 1·1 + 0 + 0 = 1.

  6. 6.

    C4: every term contains G3 or P3, and both are 0, so C4 = 0.

  7. 7.

    Sums: S0 = 1 ⊕ 0 = 1, S1 = 0 ⊕ 0 = 0, S2 = 1 ⊕ 1 = 0, S3 = 0 ⊕ 1 = 1. Result 1001 = 9.

Common mistakes

  • Thinking C3 has to wait for C2. In a CLA every carry is computed directly from G, P and C0.

  • Assuming lookahead is free. The gates grow with the width.

  • Expecting different answers from ripple and lookahead. They compute the same carries; only the timing differs.

Practice Carry-lookahead adder

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Carry-lookahead adder is taught in Adders and ALUs.