Half adder
A half adder is a combinational circuit that adds two single bits and produces a sum bit and a carry bit.
Open this circuit in LogicLab →
Boolean expressions
- Sum = A ⊕ B
- Carry = A · B
Truth table
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
How it works
The sum is 1 when exactly one input is 1, which is an XOR. The carry is 1 only when both inputs are 1, which is an AND. It cannot accept a carry from a previous stage, so it is used for the least significant bit; chains of bits need full adders.
Try it yourself
Adds two bits: XOR gives the sum and AND gives the carry. Open the circuit, click the switches to change the inputs, and watch the LEDs and the waveform panel respond. You can edit the circuit, convert it to NAND-only or NOR-only gates, and save or export your version.
Related circuits
Reference: en.wikipedia.org/wiki/Adder_(electronics)#Half_adder