What Is a Half Adder and How Does It Work?

A half adder is a simple digital circuit that adds two single-bit binary numbers together and produces two outputs: a sum and a carry. It’s one of the most fundamental building blocks in digital electronics, forming the basis for how computers perform arithmetic. The circuit uses just two logic gates, making it easy to understand and a common starting point for learning how processors do math at the hardware level.

How a Half Adder Works

Binary addition follows the same logic as decimal addition, just with only two digits: 0 and 1. When you add 0 + 0, you get 0. When you add 0 + 1 or 1 + 0, you get 1. The interesting case is 1 + 1, which equals 10 in binary (the same way 5 + 5 equals 10 in decimal). That “1” in the tens place is the carry.

A half adder handles exactly this. It takes two single-bit inputs (called A and B) and produces two outputs. The “Sum” output tells you the result of the addition in the current column, and the “Carry” output tells you whether a 1 needs to be passed to the next column.

The complete truth table covers all four possible combinations:

  • A = 0, B = 0: Sum = 0, Carry = 0
  • A = 0, B = 1: Sum = 1, Carry = 0
  • A = 1, B = 0: Sum = 1, Carry = 0
  • A = 1, B = 1: Sum = 0, Carry = 1

The Two Gates Inside

The half adder’s elegance comes from needing only two logic gates. The Sum output is produced by an XOR gate (exclusive OR), which outputs 1 only when the two inputs are different. The Carry output is produced by an AND gate, which outputs 1 only when both inputs are 1.

In Boolean algebra, these are written as: Sum = A XOR B, and Carry = A AND B. If you look at the truth table above, you can verify this. The sum column matches XOR behavior perfectly, and the carry column matches AND behavior perfectly.

While XOR and AND are the standard implementation, the same function can be built using only NAND gates or only NOR gates, since both are “universal gates” capable of implementing any logic function. Each of these alternative designs requires five gates instead of two, so they’re less efficient but useful when a circuit is constrained to a single gate type.

Why It’s Called “Half”

The name comes from what the circuit can’t do. A half adder handles adding two bits, but it has no way to accept a carry coming in from a previous addition. Think about adding multi-digit numbers by hand: when you work through the columns from right to left, you sometimes carry a 1 into the next column. A half adder has no input for that incoming carry, so it can only do “half” the job needed for multi-bit addition.

This limitation means a half adder works fine for the very first (least significant) column of a binary addition, where there’s never a carry coming in. But for every column after that, you need a circuit that can handle three inputs: the two bits being added plus the carry from the previous column.

Half Adder vs. Full Adder

A full adder solves the carry problem by adding a third input, typically labeled C-in (carry in). Where a half adder has two inputs and two outputs, a full adder has three inputs (A, B, and C-in) and two outputs (Sum and Carry out). The additional logic gates inside a full adder let it incorporate the carry from a previous stage into its calculation.

In practice, multi-bit addition (like adding two 8-bit numbers) uses one half adder for the least significant bit and full adders for every remaining bit. Each full adder’s carry output feeds into the carry input of the next full adder in the chain. This arrangement is called a ripple carry adder, and it’s the simplest way to build a circuit that adds numbers larger than one bit.

You can actually build a full adder from two half adders and an OR gate. The first half adder adds A and B, the second half adder adds that result to the carry in, and the OR gate combines the two carry outputs. This is one reason the half adder is so foundational: it’s literally the component from which more complex adders are constructed.

Where Half Adders Are Used

Half adders appear inside arithmetic logic units (ALUs), the part of a processor that handles math and logic operations. They’re suited for any situation where exactly two single-bit values need to be added with no prior carry to account for. Beyond the least significant bit position in multi-bit adders, they show up in simple counting circuits, parity generators, and other places where basic binary addition is needed without carry propagation.

Modern processors contain millions of transistors and use optimized adder designs that go well beyond simple ripple carry chains. But at the conceptual level, the half adder remains the starting point. Understanding how two logic gates can add two bits together is the first step toward understanding how a computer adds, subtracts, multiplies, and performs every other arithmetic operation at the hardware level.