Skip to content
digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksToolsOpen the lab →

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.

Big circuit: pinch, scroll or tap + to zoom in, then drag to move around.

Live circuit: click the inputs to toggle them and watch the outputs update. It runs the real simulator, right here on the page.

Open this circuit in the lab →

What you need

Step by step

  1. Place inputs A3 to A0, B3 to B0 and C3 to C0, and probes R5 to R0.
  2. 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.
  3. 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.
  4. Try 7 + 5 + 6: the row gives S = 0100 and carries 0111, and 4 + 14 = 18 = 010010.

Worked example: 7 + 5 + 6

RowBit 3Bit 2Bit 1Bit 0Value
A01117
B01015
C01106
Sum bits S01004
Carry bits01117, 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

half adderfull adderhalf subtractorfull subtractor2:1 multiplexer4:1 multiplexerXOR gate from NAND gates2-to-4 decoderSR latchD flip-flopJK flip-flopT flip-flop4-bit shift register4-bit ripple carry adderD latch1-to-4 demultiplexer4-bit magnitude comparator4-bit ring counter4-bit Johnson counter4-to-2 priority encoder4-bit synchronous counter3-to-8 decoder8-to-1 multiplexer4-bit carry lookahead adderhalf adder from NAND gates2-bit comparatorBCD to 7-segment decoder4-bit up/down counterdecade counter2-bit multiplier4-bit ALU4-bit array multiplierNOT, AND, OR and NOR from NANDNOT, OR, AND and XOR from NORfull adder from NAND gatesSR latch from NAND gatesparity generator and checker4-bit adder/subtractorBCD adder4-bit universal shift registermod-6 counter4-bit ripple counterbinary to Gray code converterhalf adder from NOR gatesfull adder from NOR gates4-bit register with parallel load1011 sequence detectorbinary to BCD converterD flip-flop from NAND gates1-bit ALUCMOS inverterCMOS NAND gateCMOS NOR gatePISO shift registerSR flip-flop from NAND gatesBCD to excess-3 code converterHamming (7,4) code encoder and correctortraffic light controller4-bit barrel shifterCMOS AND gateCMOS OR gateCMOS XOR gate1-bit magnitude comparatorhalf subtractor from NAND gatesfull subtractor from NAND gates8-to-3 encoderGray to binary converter4-to-16 decoderfull adder using 4:1 multiplexersedge detectorserial adder4-bit carry-select adderMealy machine (1011 detector)master-slave JK flip-flop (NAND)half subtractor from NOR gates1-to-8 demultiplexerexcess-3 to BCD code convertervending machine FSM3-bit synchronous counter (JK)CMOS transmission gatetri-state buffer (CMOS)2-to-1 mux from transmission gatesmod-5 counterflip-flop conversion (JK to D)8-bit ALUdecimal to BCD encoderBCD to decimal decoder4-to-1 mux from 2-to-1 muxes

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.