2-bit ripple-carry adder: build and simulate it online
Chain two full adders: the carry out of bit 0 ripples into bit 1.
Build the 2-bit ripple-carry adder in the free online simulator — it checks your circuit automatically.
What you need
- 4 logic switches labelled A1, A0, B1, B0
- 3 probes labelled S1, S0, Cout
- 2 XOR gates or 2 adder blocks
Step by step
- Inputs and outputs. From the Logic section of the library, drop digital inputs (0/1 boxes) or logic switches for the inputs, and digital outputs or probes for the outputs; give each its label in the inspector (the checker finds them by label). Tie bit 0's carry-in to a Logic 0. Switches A1, A0, B1, B0; Probes S1, S0, Cout; A Logic 0 for Cin
- Two full adders. Each full adder is 2 XOR, 2 AND and 1 OR — or use the Adder block set to 1 bit. 10 gates, or 2 Adder blocks
- Chain the carry. Bit 0 adds A0 + B0 + 0; its carry out is bit 1’s carry in. C0 → Cin of bit 1; Bit 1’s carry out → Cout
- Prove it. All 16 additions of two 2-bit numbers. e.g. 11 + 11 = 110
Truth table
| A1 | A0 | B1 | B0 | Cout | S1 | S0 |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 1 | 0 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 | 1 | 0 |
Frequently asked questions
How do you build a 2-bit ripple-carry adder?
Chain two full adders: the carry out of bit 0 ripples into bit 1. In short: inputs and outputs, then two full adders, then chain the carry, then prove it.
What is the truth table of a 2-bit ripple-carry adder?
It has 4 inputs (A1, A0, B1, B0) and 3 outputs (Cout, S1, S0), so 16 rows. The full table is on this page; the Embedded Lab checks all of them against your circuit.
What parts do you need for a 2-bit ripple-carry adder?
2 XOR gates or 2 adder blocks — plus logic switches for the inputs and probes for the outputs.
Can I simulate a 2-bit ripple-carry adder online for free?
Yes. Open it in the BitForBytes Embedded Lab, a free browser-based circuit and logic simulator: drag in the gates, wire them, and press "Check my circuit" — every input combination is simulated and marked for you. No download or sign-up needed.
Part of DSD 10 · Ripple-carry adder in the free BitForBytes digital system design course.