Half adder: build and simulate it online

Add two bits: Sum = A ⊕ B, Carry = A · B — one XOR and one AND.

Build the half adder in the free online simulator — it checks your circuit automatically.

What you need

  • 2 logic switches labelled A, B
  • 2 probes labelled Sum, Carry
  • 1 XOR gate
  • 1 AND gate

Step by step

  1. Place the 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). Two switches: A and B; Two probes: Sum and Carry
  2. Place the gates. Sum is 1 when exactly one input is 1 — that is XOR. Carry is 1 only when both are — that is AND. One XOR gate; One AND gate
  3. Wire it. Each input fans out to both gates. A and B into the XOR, XOR out → Sum; A and B into the AND, AND out → Carry
  4. Prove it. Press Check: the lab tries all four input combinations for you. 0+0 = 0, 0+1 = 1, 1+0 = 1, 1+1 = 10

Truth table

ABSumCarry
0000
0110
1010
1101

Frequently asked questions

How do you build a half adder?

Add two bits: Sum = A ⊕ B, Carry = A · B — one XOR and one AND. In short: place the inputs and outputs, then place the gates, then wire it, then prove it.

What is the truth table of a half adder?

It has 2 inputs (A, B) and 2 outputs (Sum, Carry), so 4 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 half adder?

1 XOR gate; 1 AND gate — plus logic switches for the inputs and probes for the outputs.

Can I simulate a half 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 7 · Half adder in the free BitForBytes digital system design course.

More adders builds