A half adder adds two bits. The total can be 0, 1 or 2, so it needs two outputs: the sum bit S (weight 1) and the carry C (weight 2). Read together as the 2-bit number C S, they equal A + B.
Reading the truth table one output column at a time gives the gates directly:
So a half adder is just an XOR gate and an AND gate side by side.
Why "half"? It has no input for a carry from a previous column, so it can only handle a column where nothing comes in, such as the rightmost column of a plain addition. Every other column adds three bits, which needs a full adder. Two half adders plus an OR gate make a full adder (two half adder full adder).
Why XOR and not OR for the sum? 1 + 1 must leave 0 in this column and move the 1 into the carry. OR would output 1.
| S | C | ||
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |