Digital logic
Half adder
Also called: adding two bits · sum and carry · XOR and AND
Definition
A half adder adds two single bits and gives a sum bit (A XOR B) and a carry bit (A AND B).
Picture it
In binary, 1 + 1 = 10: sum 0, carry 1. That is exactly XOR for the sum and AND for the carry. It is 'half' because it cannot accept a carry coming in from a lower column.
The maths
S = A ⊕ B C = A · B
| Quantity | Unit | Symbol |
|---|---|---|
| ratio | dimensionless | 1 |
Worked example
What sum and carry does a half adder give for A = 1, B = 1?
- S = 1 XOR 1 = 0
- C = 1 AND 1 = 1
- Carry-sum reads 10, which is binary for 2
AnswerS = 0, C = 1 (binary 10 = 2).
✓ The 3 numbers in this answer are recomputed from scratch by an automated test.
logic tester
Logic gate tester
Y = 1
Y = A ⊕ B
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 ◀ now |
| 1 | 1 | 0 |
XOR with A = 1, B = 0 gives Y = 1.
Ideal gates: no propagation delay. 1 = true = high, 0 = false = low.
Common misconceptions
- Misconception: Chaining half adders does not make a multi-bit adder, because they ignore incoming carries.
- Misconception: The carry is not an error; it is the next column's input.