1. The Full Adder as a Basic Building Block
The simplest arithmetic building block is the half adder, which adds two individual bits and produces a sum (the XOR of the inputs) and a carry (the AND of the inputs). Since chaining multiple bit positions also requires accounting for a carry coming in from the previous position, in practice one uses the full adder, which combines three inputs (the two bits A and B to be added, plus the carry-in Cin from the previous position) into a sum and a carry-out Cout. A full adder can be built from two half adders plus an additional OR gate, and typically requires about 20 to 28 transistors in a standard CMOS cell.
The Boolean equation Cout = (A AND B) OR (Cin AND (A XOR B)) can be read intuitively as a majority vote: Cout becomes 1 exactly when at least two of the three inputs (A, B, Cin) are 1 – regardless of which two they are. For A=1, B=1, Cin=0, for instance, A AND B alone already produces the carry; for A=1, B=0, Cin=1, A and B differ (A XOR B = 1), and Cin AND (A XOR B) produces it instead. The sum, by contrast, is 1 when an odd number of the three inputs is 1 (1 or 3 out of 3) – exactly the behavior of a three-input XOR.
Chaining several full adders together, with the carry output of each stage feeding the carry input of the next higher stage, produces the simplest multi-bit adder: the carry-ripple adder.