LearnGates

The full adder: adding three bits

When you add two numbers in column, each column can receive a carry from the one on its right. The full adder adds three bits: A, B and the incoming carry Cin. It gives a sum bit S and an outgoing carry Cout for the next column.

Truth table

Truth table of Full adder
ABCinSCout
00000
00110
01010
01101
10010
10101
11001
11111

Try it Click the inputs to change them.

S0Cout0

How it works

The sum is 1 when an odd number of inputs is 1: S = A XOR B XOR Cin. The carry out is 1 when at least two of the three inputs are 1.

The neat way to build it is from two half adders: the first adds A and B, the second adds Cin to that result. Either of them can produce a carry (never both at once), so an OR gate joins their two carries into Cout.

Tip for the challenge: build the half adder as its own circuit first. GateLab lets you use your own circuits as parts, the same way engineers reuse blocks.

Hints and solution

Try on your own first. Each hint gives away a little more.

  1. S = A XOR B XOR Cin.
  2. Cout is 1 when at least two of the three inputs are 1.
  3. Two half adders and an OR make a full adder. Tip: build the half adder as its own circuit and use it here.