Skip to content
digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksBuild a CPUToolsOpen the lab →

2-bit adder: circuit and truth table, live

A 2-bit adder adds two 2-bit numbers, A1 A0 and B1 B0, and outputs a 3-bit sum, Cout S1 S0, from 0 to 6. It takes a half adder for the low bit and a full adder for the high bit, with the half adder's carry feeding the full adder.

The low column has nothing to add but A0 and B0, so a half adder does it: S0 = A0 XOR B0 and its carry is A0 AND B0. The high column adds A1, B1 and that carry, which is the job of a full adder: S1 = A1 XOR B1 XOR carry, and Cout is 1 when at least two of the three are 1. Cout is the sum's third bit, so 3 + 3 = 6 comes out as 110. Chain more full adders the same way and you get the 4-bit ripple-carry adder and the 8-bit adder; try the sums by hand with the binary calculator.

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 →

Embed or cite this circuit

Free to embed on a course page, blog or worksheet: paste this code. The circuit stays live, and the small digiwleea badge links back here.

To cite it: digiwleea, “2-bit adder”, https://digiwleea.wleeaf.dev/tools/build/adder-2bit/

What you need

Step by step

  1. Place inputs A1, A0, B1, B0 and probes Cout, S1, S0.
  2. Bit 0: a half adder. XOR A0 and B0 for S0, and AND them for the carry into bit 1.
  3. Bit 1: a full adder. XOR A1 and B1, then XOR that with the carry for S1.
  4. Cout: OR together A1 AND B1 and carry AND (A1 XOR B1). Step through all 16 inputs: Cout S1 S0 is always A + B in binary.

2-bit adder truth table

A1 A0B1 B0A + BCoutS1S0
00000000
00011001
00102010
00113011
01001001
01012010
01103011
01114100
10002010
10013011
10104100
10115101
11003011
11014100
11105101
11116110

All 16 rows of the live circuit are checked against A + B before the page is built. Cout is 1 only when the sum reaches 4, on the six rows where the two numbers add up to 4, 5 or 6. One bit wider: the 3-bit adder.

You can also read the full theory in the lesson on the full adder. 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.

More builds: Arithmetic

All 246 build guides, by topic

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 2-bit adder in the lab →

Frequently asked

How do you make a 2-bit adder?

With a half adder for the least significant bit and a full adder for the next bit, the half adder's carry feeding the full adder's carry input. The outputs are S0, S1 and the carry out, which is the sum's third bit.

How many outputs does a 2-bit adder have?

Three: S0, S1 and Cout. Two 2-bit numbers add up to at most 3 + 3 = 6, which needs three bits (110).

How many gates are in a 2-bit adder?

Seven in this design: the half adder's XOR and AND, and the full adder's two XORs, two ANDs and an OR.

Can a 2-bit adder be built from two full adders?

Yes: use a full adder for bit 0 too, with its carry input tied to 0 or used as a carry in from an earlier stage. That is how wider ripple-carry adders are built.