Skip to content
Tactiverge

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
SI units used in this entry
QuantityUnitSymbol
ratiodimensionless1

Worked example

What sum and carry does a half adder give for A = 1, B = 1?

  1. S = 1 XOR 1 = 0
  2. C = 1 AND 1 = 1
  3. 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

Truth table for XOR; the current row is marked.
ABY
000
011
101 ◀ now
110
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.