Half adder
A half adder adds two bits. Its Sum is on when exactly one input is on, which is an XOR gate, and its Carry is on when both are, which is an AND gate. 1 + 1 is 10 in binary: Sum 0, carry 1.
How it works
- 01
Each input is one bit: a switch that's off is 0, on is 1.
- 02
Sum is A XOR B: on when one input is on, off when neither or both are.
- 03
Carry is A AND B: on only for 1 + 1, the one case that doesn't fit in a single bit.
- 04
It's called half because it can't take a carry in from the column before it. Two of them and an OR make a full adder.
Truth table
- Sum = A ⊕ B
- Carry = A·B
| A | B | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |