Home › Lessons › Digital logic › Half adder

Half adder

Digital logic · Beginner · about 10 minutes · part of Zen’s Electronics Design Mastery

Adding two bits gives a sum bit and a carry bit: 1 + 1 = 10 in binary. The sum is A XOR B, and the carry is A AND B. This is the first step to a computer’s arithmetic unit.

Half adder: the circuit on the simulator's bench

Open this lesson in the labFree, in your browser, no account needed.

How it works

S = A ⊕ B  ·  C = A · B

ABCSbench
0000—
0101—
1001—
1110—

Flip the switches to try every row. “bench” fills in with what the chip actually did.

Read C and S together as a 2-bit number: 1 + 1 gives C S = 1 0, which is two.

Try it on the bench

  1. Set A = 1 and B = 1: the carry lights and the sum goes out, which is binary 10, or two.
  2. A half adder has no carry input, so it can only add the lowest bits. The full adder lesson fixes that.

Parts on the bench

In the course

Zen’s Electronics Design Mastery, module “Digital Electronics”.

More on digital logic