Half Adder and Full Adder
In the previous article, we established that multi-bit binary addition requires repetitive single-column addition slices. This article derives the two fundamental building blocks of digital arithmetic: the half adder and the full adder. A half adder adds two 1-bit operands without a carry-in. A full adder adds two 1-bit operands and an incoming carry bit. Every multi-bit digital adder cascades these fundamental cells.
Definition and Operation of the Half Adder
A half adder receives two 1-bit inputs ($A$ and $B$). It computes a 1-bit sum ($S$) and a 1-bit carry-out ($C_{\text{out}}$). The circuit cannot accept a carry-in from a preceding stage. Table 1 lists the functional truth table:
| $A$ | $B$ | $S$ | $C_{\text{out}}$ |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
The sum output $S$ is 1 when exactly one input is 1. This corresponds to the exclusive-OR (XOR) logic operation. The carry output $C_{\text{out}}$ is 1 only when both inputs are 1. This corresponds to the AND logic operation.
The Boolean equations are:
$$S = A \oplus B$$
$$C_{\text{out}} = A \cdot B$$
Figure 1 shows the gate-level schematic. The circuit requires one 2-input XOR gate and one 2-input AND gate.
Both outputs evaluate in a single logic gate delay.
Definition and Operation of the Full Adder
A full adder adds three 1-bit inputs: operand $A$, operand $B$, and carry-in $C_{\text{in}}$. The maximum arithmetic sum of three bits is $1 + 1 + 1 = 3_{10} = 11_2$. The output requires a 1-bit sum ($S$) and a 1-bit carry-out ($C_{\text{out}}$). Table 2 lists the complete truth table:
| $A$ | $B$ | $C_{\text{in}}$ | $S$ | $C_{\text{out}}$ |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Boolean Minimization of Full Adder Outputs
We derive minimized logic expressions using Karnaugh maps.
Sum Bit Derivation
Mapping output $S$ on a 3-variable Karnaugh map with rows $C_{\text{in}}$ and columns $AB$ produces a checkerboard pattern:
$$\begin{array}{c|cccc} S & AB=00 & AB=01 & AB=11 & AB=10 \\hline C_{\text{in}}=0 & 0 & 1 & 0 & 1 \ C_{\text{in}}=1 & 1 & 0 & 1 & 0 \end{array}$$
No adjacent 1s exist. This checkerboard pattern represents an odd parity function:
$$S = A \oplus B \oplus C_{\text{in}}$$
Output $S$ asserts high when an odd number of inputs are logic 1.
Carry-Out Bit Derivation
Mapping output $C_{\text{out}}$ on a 3-variable Karnaugh map yields:
$$\begin{array}{c|cccc} C_{\text{out}} & AB=00 & AB=01 & AB=11 & AB=10 \\hline C_{\text{in}}=0 & 0 & 0 & 1 & 0 \ C_{\text{in}}=1 & 0 & 1 & 1 & 1 \end{array}$$
Grouping adjacent pairs produces three 2-cell terms:
- Column $AB = 11$ yields $AB$.
- Row $C_{\text{in}} = 1$, columns 01 and 11 yield $BC_{\text{in}}$.
- Row $C_{\text{in}} = 1$, columns 11 and 10 yield $AC_{\text{in}}$.
The canonical Boolean equation is:
$$C_{\text{out}} = AB + BC_{\text{in}} + AC_{\text{in}}$$
This expression represents the majority function: $C_{\text{out}}$ asserts high when at least two of the three inputs are logic 1.
Circuit Implementations of the Full Adder
Digital systems implement full adders using two primary topologies:
Implementation 1: Cascaded Half Adders
You can construct a full adder using two half adders and one 2-input OR gate:
- Half Adder 1: Computes intermediate sum $S_1 = A \oplus B$ and intermediate carry $C_1 = AB$.
- Half Adder 2: Adds intermediate sum $S_1$ and $C_{\text{in}}$. Generates final sum $S = S_1 \oplus C_{\text{in}} = A \oplus B \oplus C_{\text{in}}$ and secondary carry $C_2 = S_1 C_{\text{in}} = (A \oplus B)C_{\text{in}}$.
- Carry Combining: Computes $C_{\text{out}} = C_1 + C_2 = AB + (A \oplus B)C_{\text{in}}$.
Figure 2 illustrates the schematic:
This topology requires five gates: two XOR gates, two AND gates, and one OR gate. Reusing the $A \oplus B$ term reduces total gate count compared to independent Sum-of-Products implementations.
Implementation 2: Direct Two-Level Logic
Direct implementation uses two XOR gates for the sum ($S$) and three AND gates plus one 3-input OR gate for the carry ($C_{\text{out}}$). This configuration requires six total gates.
Propagation Delay Analysis
Table 3 summarizes the gate delay along each input-to-output path for the cascaded half-adder configuration:
| Input Signal | Target Output | Logic Gate Sequence | Total Gate Delays |
|---|---|---|---|
| $A$ or $B$ | $S$ | $\text{XOR}_1 \to \text{XOR}_2$ | 2 |
| $C_{\text{in}}$ | $S$ | $\text{XOR}_2$ | 1 |
| $A$ or $B$ | $C_{\text{out}}$ | $\text{XOR}_1 \to \text{AND}_2 \to \text{OR}$ | 3 |
| $C_{\text{in}}$ | $C_{\text{out}}$ | $\text{AND}_2 \to \text{OR}$ | 2 |
Notice that the carry propagation path from $C_{\text{in}}$ to $C_{\text{out}}$ requires two gate delays ($\text{AND} \to \text{OR}$). In a multi-bit chained adder, this $C_{\text{in}}$-to-$C_{\text{out}}$ path forms the critical timing path.
Practice Exercises
Problem 1: Verify the equivalence between $C_{\text{out}} = AB + (A \oplus B)C_{\text{in}}$ and the majority expression $C_{\text{out}} = AB + BC_{\text{in}} + AC_{\text{in}}$ algebraically.
View Solution
Expand the XOR term: $$A \oplus B = A\overline{B} + \overline{A}B$$
Substitute into the carry equation: $$C_{\text{out}} = AB + (A\overline{B} + \overline{A}B)C_{\text{in}} = AB + A\overline{B}C_{\text{in}} + \overline{A}BC_{\text{in}}$$
Apply consensus and absorption theorems: $$AB + A\overline{B}C_{\text{in}} = A(B + \overline{B}C_{\text{in}}) = A(B + C_{\text{in}}) = AB + AC_{\text{in}}$$ $$AB + \overline{A}BC_{\text{in}} = B(A + \overline{A}C_{\text{in}}) = B(A + C_{\text{in}}) = AB + BC_{\text{in}}$$
Combining these terms yields: $$C_{\text{out}} = AB + BC_{\text{in}} + AC_{\text{in}}$$
Both formulations evaluate to identical logic values across all input combinations.
Problem 2: Determine what happens if a digital designer uses a half adder instead of a full adder at bit position 1 when computing $11_2 + 01_2$ ($3_{10} + 1_{10}$).
View Solution
- Bit 0: $A_0 = 1, B_0 = 1$. The half adder produces $S_0 = 0$ and $C_{\text{out}} = 1$.
- Bit 1 with Half Adder: $A_1 = 1, B_1 = 0$. Because a half adder lacks a carry-in port, the carry from bit 0 is disconnected. The half adder computes $S_1 = 1 \oplus 0 = 1$ and $C_{\text{out}} = 0$.
- Result: The circuit reports $01_2 = 1_{10}$, which is incorrect ($3 + 1 \ne 1$).
- Bit 1 with Full Adder: Computes $S_1 = 1 \oplus 0 \oplus 1 = 0$ and $C_{\text{out}} = 1$. The correct sum is $100_2 = 4_{10}$.
Every bit position above bit 0 requires a full adder to process incoming carries.
Problem 3: Calculate the worst-case propagation delay of a single full adder cell assuming an XOR gate delay of 1.5 units and an AND/OR gate delay of 1.0 unit.
View Solution
Evaluate the distinct paths:
- $A/B \to S$: Two XOR gates $= 1.5 + 1.5 = 3.0$ units.
- $C_{\text{in}} \to S$: One XOR gate $= 1.5$ units.
- $A/B \to C_{\text{out}}$: One XOR, one AND, one OR $= 1.5 + 1.0 + 1.0 = 3.5$ units.
- $C_{\text{in}} \to C_{\text{out}}$: One AND, one OR $= 1.0 + 1.0 = 2.0$ units.
The worst-case delay from primary inputs $A$ or $B$ to $C_{\text{out}}$ is 3.5 delay units. The critical carry-propagation delay ($C_{\text{in}} \to C_{\text{out}}$) is 2.0 delay units.
In the next article, we cascade $N$ full adders together to construct a ripple-carry adder and calculate its total latency.