Full adder

Three bits in, a sum and a carry out — the block every adder is made of. A ready-made arithmetic circuit you can open in the TorchAnvil simulator.

Three bits instead of two

A half adder is nice, but real arithmetic needs to chain. When you add two four-bit numbers column by column, every column — except the first — has a carry coming in from the column to its right. A full adder is a half adder that knows what to do with that incoming carry.

Three inputs: A, B, and the incoming carry Cin. Two outputs: the Sum bit and a Cout that goes to the next column.

How it works

It's literally two half adders glued together with an OR:

  1. Half adder #1 takes A and B, producing a partial sum (A ⊕ B) and a partial carry (A · B).
  2. Half adder #2 takes that partial sum and Cin, producing the final Sum (A ⊕ B ⊕ Cin) and a second partial carry.
  3. OR the two partial carries together — if either half produced a carry, Cout is true.

Here's the full truth table. Eight rows because three inputs give 2³ combinations.

A B Cin Sum Cout
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1

Why this matters

Chain four full adders together and you've got a 4-bit ripple-carry adder — a circuit that adds two nibbles. Chain eight and you can add bytes. The entire arithmetic/logic unit of a simple CPU starts right here, with this one circuit.

Try this