Level 6: Half Adder
Task
Build a Half Adder.
A half adder adds two bits and produces two results: Sum and Carry.
Solution
Think of school column addition: - 0+0=0 (carry 0) - 0+1=1 (carry 0) - 1+0=1 (carry 0) - 1+1=0 (carry 1)
Two independent logic functions: - Sum = A XOR B (output 1 when bits differ — 0+1 or 1+0 gives 1). - Carry = A AND B (output 1 only when both bits are 1 — a carry occurs).
Build two circuits in parallel: 1. Take XOR and AND. 2. Connect both inputs A,B to both gates. 3. XOR output is Sum, AND output is Carry.