A half adder is a combinational logic circuit that adds two single bits and produces two outputs: a sum bit and a carry bit. It has no input for a carry from another addition stage, which distinguishes it from a full adder. Half adders are basic building blocks of digital arithmetic and are commonly introduced through their implementation using two logic gates.
Operation and truth table
Let the inputs be and , the sum output be , and the carry output be . Each input and output can take the binary value 0 or 1.
| Input | Input | Sum | Carry |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
The outputs satisfy the arithmetic identity
where addition is ordinary integer addition. The two-bit binary number , with as the more significant bit, represents the result.
For example, adding 1 and 1 produces the binary result : the sum bit is 0 and the carry bit is 1. If the inputs represent digits at position in a larger binary number, the sum retains weight , while the carry has weight .
Boolean equations and implementation
The sum is the exclusive OR of the inputs:
The carry is their logical AND:
An XOR gate therefore generates the sum, while an AND gate generates the carry. Both gates receive the same two inputs and operate in parallel; neither output logically depends on the other.
The sum can also be written as
This expression allows implementation with AND, OR, and NOT gates. Implementations using only NAND gates or only NOR gates are also possible. A common shared-logic NAND implementation uses five two-input NAND gates to produce both outputs.
The familiar description “one XOR gate and one AND gate” specifies a logical organization, not a fixed physical size. Within an integrated circuit, transistor count, area, power consumption, and delay depend on the circuit technology and the chosen gate implementation. In CMOS designs, synthesis may map the function to a dedicated arithmetic cell or to a combination of available logic cells.
Relationship to a full adder
A full adder adds three bits: , , and an incoming carry . A half adder cannot directly perform that operation because it has only two inputs.
Two half adders and an OR gate can implement a full adder. The first half adder adds and :
The second adds the intermediate sum to the incoming carry:
The final carry is
This construction explains how half adders can form a more general arithmetic circuit. It is not necessarily the fastest or smallest physical implementation of a full adder.
Applications
In a simple ripple-carry adder with no external carry input, a half adder can handle the least significant pair of operand bits. Higher positions require full adders because each must include a carry from the preceding position. Alternatively, every position can use a full adder, with the first carry input fixed at zero.
Half adders also appear in incrementers and binary multiplication circuits. In an incrementer, each stage can add an operand bit to a carry representing the continuing increment. In a multiplier, half adders can combine pairs of equal-weight partial-product bits, while full adders combine groups of three.
Their small truth table and direct correspondence between arithmetic and logic also make half adders useful examples in digital-circuit education and formal verification.
Timing and limitations
A half adder has no internal memory and requires no clock to perform its logical function. Its outputs settle after a propagation delay following an input change. The sum and carry paths can have different delays, and input transitions may cause temporary output changes before the circuit settles.
The carry output indicates that the result requires a second binary position; it is not, by itself, a general signed-overflow indicator. Detecting signed integer overflow in a multi-bit adder requires examining the overall arithmetic operation and its sign or carry relationships.
The main functional limitation remains the absence of a carry input: half adders alone cannot simply be chained as ordinary multi-bit addition stages without additional logic to incorporate incoming carries.