AlgoPlus//structures / binary-addition
Read the theory

Binary Addition

A ripple-carry adder: one full adder per bit, the carry propagating from LSB to MSB.

Carry in
Carry out
Legend
A
B
Carry
AI Tutor Workspace
In a nutshell
Binary addition adds two numbers column by column, just like decimal addition, except each column holds only 0 or 1 and may pass a carry to the next. A ripple-carry adder builds this in hardware by chaining one 'full adder' per bit, starting from the rightmost column. It's simple but slow, because each column has to wait for the carry from the column before it to ripple all the way across.
Ready
Press play to begin the cinematic walkthrough.
A ripple-carry adder chains one full adder per bit: Sum = A xor B xor Cin, Carry = majority(A,B,Cin). Each column waits on the carry from the one before it, so it costs O(n) gate delays — carry-lookahead computes the carries in parallel.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Binary Addition.