Skip to content
DLVSDigital Logic Visualizing System

Logic Lab

Adders

Half and full adders chained into a binary parallel (ripple-carry) adder, with the gates inside each cell.

4-bit ripple-carry adder

168421carry
0
0
0
0
ABsum
0
0
0
0
0

0 + 0 = 0

Built from full-adder cells

FA bit 0ABCiS=0Co=0FA bit 1ABCiS=0Co=0FA bit 2ABCiS=0Co=0FA bit 3ABCiS=0Co=00A00B00A10B10A20B20A30B30C0

Inside a full-adder cell, from logic gates

0A0B0CinSum=0Cout=0

Two half adders (an XOR and an AND each) and an OR gate. The carry-in of this cell is the carry-out of the cell before it, so it cannot be set by hand here.

Each column is a full adder: sum = A ⊕ B ⊕ carry-in, and carry-out = A·B + carry-in·(A ⊕ B). The carry ripples from right to left, so wider adders have to wait longer for it.