Level 6: Half Adder

Open the level →Where it fits in the machine →

Task

Goal: build a Half Adder.

A half adder adds two bits and produces two results: Sum and Carry.

The main idea: arithmetic is logic too: break adding two bits down by truth table, and the sum turns out to be XOR while the carry is AND. Each output bit of the result is computed by its own circuit.

Path to this level

The competencies this level develops and their formation levels.

Related Materials

Solution for self-check

Try building the circuit yourself first. The solution below is a way to check yourself if you're stuck or have already solved it.

What you should get: two outputs — Sum and Carry. Adding two bits the school way: 0+0=0, 0+1=1, 1+0=1, and 1+1=10 — the low bit is zero, the one goes to the carry.

Two independent logic functions live here:

  • Sum = A XOR B — 1 on different inputs and 0 on identical ones, exactly the low bit of the sum.
  • Carry = A AND B — 1 only on two ones, exactly the carry.
  1. Take XOR and AND.
  2. Connect both inputs A and B to both of them.
  3. The XOR output is Sum, the AND output is Carry.

XOR is the only gate that models "1+1=0 with a carry": sum 0, carry 1. That is why no adder can do without XOR.

Solution circuit for level 6 — Half Adder
The authored solution for level 6 in the simulator (dark theme)

Check yourself

Why does the sum specifically need XOR?

Only XOR gives 1 on different inputs and 0 on identical ones — exactly the low-bit behavior: 1+1 gives 0.