The Half Adder vs. The Full Adder: How Computers Do Math

Denny Denny
5 min read

Digital Logic 101

đź“… January 2026 â€˘ âŹ±ď¸Ź 18 min read â€˘ đźŽ“ Beginner-Intermediate

Every calculation your computer performs—from simple arithmetic to complex AI algorithms—ultimately comes down to adding binary numbers. In this tutorial, you'll learn to build the fundamental circuits that make this possible: the half adder and the full adder.

Binary Addition: The Foundation

Before diving into circuits, let's understand how binary addition works. In binary, we only have two digits: 0 and 1. Addition follows these simple rules:

  • 0 + 0 = 0 (no sum, no carry)
  • 0 + 1 = 1 (sum of 1, no carry)
  • 1 + 0 = 1 (sum of 1, no carry)
  • 1 + 1 = 10 (sum of 0, carry of 1)

That last case is crucial: 1 + 1 = 10 in binary (which equals 2 in decimal). Just like in decimal addition when 5 + 5 = 10, we get a "carry" to the next column.

The Half Adder

half adder is the simplest arithmetic circuit. It adds two single bits and produces two outputs: a Sum and a Carry.

Half Adder: Two Inputs, Two Outputs

Inputs: A, B (the two bits to add)

Outputs: Sum (S), Carry (C)

Boolean Expressions:

Sum = A XOR B = A ⊕ B Carry = A AND B = A · B

Half Adder circuit with XOR and AND gates

A half adder circuit: XOR gate produces the Sum, AND gate produces the Carry. The truth table shows all input combinations.

ABSum (A⊕B)Carry (A·B)Result (Decimal)
00000 + 0 = 0
01100 + 1 = 1
10101 + 0 = 1
11011 + 1 = 2 (10â‚‚)
Half Adder template with digit displays

Interactive Half Adder template showing inputs on digit displays and the Sum/Carry outputs.

Key Insight: Why XOR for Sum?

The XOR gate is perfect for the sum bit because it outputs 1 only when the inputs are different. For 1+1, XOR gives 0 (the sum digit of "10"), while AND gives 1 (the carry digit). XOR essentially gives you the remainder when dividing by 2!

The Half Adder's Limitation

Why is it called a "half" adder? Because it can only add two bits—it has no input for a carry from a previous addition. When adding multi-bit numbers, you need to handle carries from one column to the next.

Consider adding 11 + 01 in binary (3 + 1 = 4):

1 1 (3 in decimal)
+ 0 1 (1 in decimal)
-----
?

The rightmost column (1+1) produces a carry. That carry must be added to the next column. A half adder can't do this—we need a full adder.

The Full Adder

full adder adds three bits: A, B, and a Carry In (Cin) from a previous stage. It outputs a Sum and a Carry Out (Cout).

Full Adder: Three Inputs, Two Outputs

Inputs: A, B, Carry In (Cin)

Outputs: Sum (S), Carry Out (Cout)

Boolean Expressions:

Sum = A ⊕ B ⊕ Cin Cout = (A · B) + (Cin · (A ⊕ B))

Full Adder circuit lesson

The Full Adder: built from two half adders and an OR gate. Each half adder handles one level of addition.

ABCinSumCoutTotal
000000
001101
010101
011012
100101
101012
110012
111113
Full Adder with Carry template

Full Adder template showing carry propagation from half adders through an OR gate.

Half Adder vs. Full Adder Comparison

FeatureHalf AdderFull Adder
Inputs2 (A, B)3 (A, B, Cin)
Outputs2 (Sum, Carry)2 (Sum, Cout)
Handles Carry In?NoYes
Gate Count2 (1 XOR, 1 AND)5 (2 XOR, 2 AND, 1 OR)
Use CaseLSB addition onlyAny bit position

Building a 4-Bit Ripple Carry Adder

Now for the real power: chaining full adders to add multi-bit numbers! A 4-bit ripple carry adder adds two 4-bit numbers by connecting four full adders in series.

4-Bit Ripple Carry Adder lesson

A 4-bit ripple carry adder: the Cout of each full adder connects to the Cin of the next, creating a "ripple" effect.

How it works:

  1. The first full adder (rightmost) adds Aâ‚€ + Bâ‚€ with Cin = 0
  2. Its Cout connects to the Cin of the next adder
  3. This "carry chain" continues through all 4 bits
  4. The final Cout indicates overflow (result > 15 for 4 bits)
3-Bit Binary Adder template

A 3-bit ripple carry adder showing cascaded full adders. The carry "ripples" from right to left.

Key Insight: Ripple Delay

Why "ripple"? Because the carry must propagate through each adder sequentially. The final sum isn't valid until the carry has "rippled" through all stages. This delay limits the speed of ripple carry adders—modern CPUs use more advanced techniques like carry-lookahead adders.

From Adders to ALU

Adders are the heart of the CPU's Arithmetic Logic Unit (ALU). By adding control logic, an ALU can:

  • Add: A + B (direct addition)
  • Subtract: A - B (using two's complement: A + NOT(B) + 1)
  • Compare: Is A > B? (check the result of A - B)
  • Increment: A + 1
8-Bit ALU System

An 8-bit ALU that uses adders for both arithmetic operations (ADD, SUB) and logical operations (AND, OR, XOR).

Try It Yourself!

Build these arithmetic circuits in DigiSim.io:

  1. Half Adder: Connect an XOR and AND gate to two switches.
  2. Full Adder: Use two half adders and an OR gate.
  3. 2-Bit Adder: Chain two full adders together.
  4. Subtractor: Add inverters and set Cin=1 for subtraction!

© 2026 DigiSim.io — The Interactive Digital Logic Simulator

digisim.io â€˘ Blog â€˘ Lessons