Carry-save adder: add three 4-bit numbers, live
A carry-save adder adds three numbers at once by not passing carries along: a row of full adders turns the three bits of each column into a sum bit and a carry bit, giving two numbers, S and C, with S + 2C = A + B + C. One ordinary adder then adds S and C shifted left by one place.
Each full adder in the carry-save row works on its own column, so the row takes one full-adder delay however wide the numbers are; the slow carry chain happens only once, in the final adder. That is why multipliers use trees of carry-save adders (Wallace and Dadda trees) to reduce many partial products to two numbers before a single fast adder finishes the job. Here A, B and C are 4-bit numbers, so the result R5 to R0 goes up to 45. All 4,096 combinations of A, B and C are checked against A + B + C before the page is built. Compare the ripple-carry adder and the carry-lookahead adder, which add two numbers.
Open this circuit in the lab →
What you need
- 4× full adder: the carry-save row: a sum bit Si and a carry bit Ci for each column i
- 2× full adder: bits 2 and 3 of the final adder
- 2× half adder: bits 1 and 4 of the final adder; R0 = S0 needs no gate
Step by step
- Place inputs
A3toA0,B3toB0andC3toC0, and probesR5toR0. - Carry-save row: one full adder per column i takes Ai, Bi and Ci and gives a sum bit Si and a carry bit worth 2 to the power i + 1.
- Final adder: R0 = S0; a half adder adds S1 and the carry from column 0; full adders add S2 and S3 to the carries from columns 1 and 2 with the rippling carry; a half adder adds the carry from column 3 to the last ripple carry, and its carry is R5.
- Try 7 + 5 + 6: the row gives S = 0100 and carries 0111, and 4 + 14 = 18 = 010010.
Worked example: 7 + 5 + 6
| Row | Bit 3 | Bit 2 | Bit 1 | Bit 0 | Value |
|---|---|---|---|---|---|
| A | 0 | 1 | 1 | 1 | 7 |
| B | 0 | 1 | 0 | 1 | 5 |
| C | 0 | 1 | 1 | 0 | 6 |
| Sum bits S | 0 | 1 | 0 | 0 | 4 |
| Carry bits | 0 | 1 | 1 | 1 | 7, worth 14 |
S + 2 x carries = 4 + 14 = 18, which is 7 + 5 + 6. Each full adder here is two XOR, two AND and one OR gate, and each half adder one XOR and one AND.
You can also read the full theory in the lesson on the multiplier. Prefer to build it yourself from scratch? Open the digiwleea lab and place the gates on the canvas, or start from the logic gate simulator.
Build more parts from gates
Each of these is one step from a transistor to a working CPU. Build every gate from CMOS transistors and work all the way up in the free digiwleea lab, with the free theory reference alongside.
Open the 4-bit carry-save adder in the lab →Frequently asked
What is a carry save adder?
An adder that reduces three numbers to two without propagating carries: each column's full adder outputs a sum bit and a carry bit, and the carry bits are kept as a separate number to be added later.
Why is a carry save adder fast?
No carry travels from column to column, so the carry-save step costs one full-adder delay regardless of the width. Only the final addition of the two resulting numbers has a carry chain.
Where are carry save adders used?
In multipliers and anywhere many numbers are summed: trees of carry-save adders (Wallace and Dadda trees) reduce all the partial products to two numbers, which one fast adder then adds.
What is the difference between a carry save adder and a ripple carry adder?
A ripple-carry adder adds two numbers and passes the carry through every bit. A carry-save adder takes three numbers and outputs two, with no carry passing between bits, so it needs a normal adder at the end.