Fig. 01 · Combinational logic

4-bit ripple-carry

Binary Adder

Choose two numbers. The circuit below is a chain of four full adders — each bit is summed locally, and the carry ripples toward the high bit.

Select the addends

Toggle any bit, or step the decimal value. Range is 0–15.

Examples

Result

Column addition

The same sum written the way you would add binary on paper. Small digits are carries.

Ripple-carry chain

Least-significant bit on the right. Click a full adder to inspect its gates.

Full adder · bit 0

Five gates: two XOR, two AND, one OR.

How the circuit adds

Full adder

One bit of A, one bit of B, and a carry-in. XOR computes the sum bit; AND and OR compute the carry-out.

S = A ⊕ B ⊕ Cin

Generate & propagate

A ∧ B generates a carry regardless of Cin. A ⊕ B propagates an incoming carry to the next bit.

Cout = (A ∧ B) ∨ (Cin ∧ (A ⊕ B))

Ripple

Cout of bit i is Cin of bit i+1. The carry must travel the whole chain, which is why this adder is simple — and slow in silicon.

C0 = 0