LearnGates

The 4-bit adder: adding whole numbers

With one full adder per column you can add numbers of any size. Four full adders in a chain make a 4-bit adder: it adds two numbers from 0 to 15 and gives a 4-bit sum plus a carry out for results above 15.

Examples the checker tests

Numbers are written in decimal: S is the sum without the carry, Cout the carry.

Examples the checker tests: 4-bit adder
ABSCout
0000
1120
3470
78150
96150
15101
1515141
8801
510150
123150
67130
1413111

How it works

It works exactly like addition in column on paper. The first full adder adds the lowest bits. Its carry goes into the Cin of the next one, and so on up to the highest bit. The last carry out says whether the result was too big for 4 bits.

This design is called a ripple carry adder, because the carry ripples from one stage to the next. It is simple, but each stage has to wait for the previous one, which is why fast processors use cleverer adders.

In GateLab the inputs A and B are 4-bit buses. A Splitter breaks a bus into single wires and another Splitter joins the sum bits back together.

Hints and solution

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

  1. Split each 4-bit bus into single bits with a Splitter.
  2. Chain four full adders: each one’s carry goes into the next one’s Cin.
  3. Build the full adder once as its own circuit (Level “Full adder”), then use it four times.
  4. Join the four sum bits back into a bus with another Splitter.