Interactive ALU Binary Adder

Watch how computers add numbers at the gate level

Explanation Simulator

How Computers Add Numbers

Every time your computer adds two numbers, it uses an Arithmetic Logic Unit (ALU) — a circuit built from simple logic gates. Each gate performs a tiny boolean operation (AND, OR, XOR), and by combining them, the ALU can add, subtract, and perform bitwise operations on binary numbers.

In Simple Terms

Binary addition works just like decimal addition, but with only two digits: 0 and 1. When you add 1 + 1, you get 10 in binary (that's 2 in decimal) — the "1" carries over to the next column, exactly like carrying in regular addition. A full adder is a small circuit that adds two bits plus a carry-in, producing a sum bit and a carry-out. Chain several together and you get a ripple carry adder that can add multi-bit numbers.

Logic Gates Used

XOR Outputs 1 when inputs differ. Used to compute the sum bit.
AND Outputs 1 only when both inputs are 1. Used to detect carries.
OR Outputs 1 when at least one input is 1. Used to combine carry signals.

Inside a Full Adder

Each full adder uses 2 XOR gates, 2 AND gates, and 1 OR gate:

The carry-out of each full adder feeds into the carry-in of the next, creating a "ripple" effect — hence the name ripple carry adder. Use the simulator below to watch this propagation in action.

Simulator

A
= 0
B
= 0
Ripple Carry Adder Circuit Click a full adder to see its internal gates
Full Adder Detail
Result
= 0
Carry Out
Overflow
Normal
Space Play/Pause   Step   Esc Reset
Step Info
Set your inputs and press Play or Step to begin the simulation.
Step: 0 / 0