Skip to content
BetterDL

Ripple-carry adder

Also called: RCA, carry chain, n-bit adder, ripple adder

An n-bit adder built from n full adders in a chain, where each stage's carry-out feeds the next stage's carry-in, so the carry ripples from LSB to MSB.

A ripple-carry adder adds two n-bit numbers the way you do by hand: one column at a time, passing the carry left. It's n full adders in a row. Full adder i adds Aᵢ, Bᵢ and the carry Cᵢ, outputs the sum Sᵢ, and passes Cᵢ₊₁ to stage i + 1.

Carry numbering in this course: Cᵢ is the carry into bit i. So C0 is bit 0's carry-in (0 for plain addition, 1 when subtracting), C1 comes out of bit 0, and in a 4-bit adder C4 is the final carry out.

If C0 is always 0, bit 0 only adds two bits, so a half adder is enough there.

Strength: it's simple and small, just n identical cells.

Weakness: it's slow for wide numbers. Bit i can't settle until Cᵢ is right, which waits for Cᵢ₋₁, and so on down the chain. In the course's gate delay model, Cᵢ is guaranteed correct at 2i + 1 gate delays, so the delay grows linearly with n (see ripple carry delay). A carry lookahead adder removes that chain.

The same adder works for unsigned and twos complement numbers. With XOR gates on B it becomes an adder subtractor.

A1A0B1B0S1S0C2

Worked example

Example

Tracing 1010 + 0111 (10 + 7), C0 = 0

Work right to left; each stage needs the carry from the one before.

  1. 1.

    Bit 0: A0 = 0, B0 = 1, C0 = 0. Total 1, so S0 = 1, C1 = 0.

  2. 2.

    Bit 1: A1 = 1, B1 = 1, C1 = 0. Total 2, so S1 = 0, C2 = 1.

  3. 3.

    Bit 2: A2 = 0, B2 = 1, C2 = 1. Total 2, so S2 = 0, C3 = 1.

  4. 4.

    Bit 3: A3 = 1, B3 = 0, C3 = 1. Total 2, so S3 = 0, C4 = 1.

  5. 5.

    Result: C4 = 1 and S = 0001. As a 5-bit number, 10001 = 17 = 10 + 7.

Common mistakes

  • Numbering carries by the bit they come out of. In this course Cᵢ goes into bit i.

  • Assuming all sum bits are ready at the same moment. Higher bits settle later.

  • Using n − 1 full adders when a carry-in C0 is needed. It takes n.

Practice Ripple-carry adder

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

Learn it step by step

Ripple-carry adder is taught in Adders and ALUs.