TEAHLAB NEW ADDITION
BUILD. SAVE. SHARE.
The world's first and only Integrated Simulator Community.

Full Adder

interactive full adder digital logic circuit with boolean algebra equation and truth table
Click on the circuit to see its function.VHDL Program
TRUTH TABLE
Input Output Comment
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

The Full-Adder, so called because it comprises two Half-Adders (Circuit 1–below), is an arithmetic circuit capable of performing addition on three single-bit binary numbers. As such, the Full-Adder can perform eight possible calculations:

Hence, our verification shows that the switch function for the Full-Adder is the compound equation

Sum = (A Xor in interactive half adder digital logic circuit B) Xor in interactive half adder digital logic circuit Cin
Cout = ((A Xor in interactive half adder digital logic circuit B) • Cin) + (A • B).

We're done!

DERIVATION OF THE TRUTH TABLE

A note of caution before we dive in: Unless you are already very good at creating truth tables, it is important that you follow along with pencil and paper by filling your own tables as we go.

Getting the truth table from the switching function is straightforward: we just plug 0s and 1s into the equation. Let's start with Sum = (A • B) • Cin. Since the output Sum depends on three inputs (A, B, Cin), we need a table with 2^3 rows: The 2 means we have two possible values (0 or 1) and the 3 means we have three different variables (A, B, Cin). Since 2^3 = 8, we will fill the 8 rows of the table by counting from 0 to 7 in binary (for a more intuitive explanation on how to build truth tables, see the Half-Adder article).

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

Notice that I took the liberty of adding the Sum column. This is because the point of the table is to see how different values of the inputs affect the output. We will solve for Sum by applying a process of combining two inputs at a time. The process is not really necessary here, but it is good practice. So let's solve for A Xor in interactive half adder digital logic circuit B (and let's call the answer T1). Recall that the output of the XOR gate is true only when one of the inputs is true.

A B Cin T1=AXor in interactive half adder digital logic circuitB Sum
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0

Table 1

Note that the grayed out values (Cin) are not use in the computation.

Now that we have computed A Xor in interactive half adder digital logic circuit B, let's solve for Sum which is (A Xor in interactive half adder digital logic circuit B) Xor in interactive half adder digital logic circuit Cin or simply T1 Xor in interactive half adder digital logic circuit Cin.

A B Cin T1=AXor in interactive half adder digital logic circuitB Sum
0 0 0 0 0
0 0 1 0 1
0 1 0 1 1
0 1 1 1 0
1 0 0 1 1
1 0 1 1 0
1 1 0 0 0
1 1 1 0 1

Table 2

Now let's repeat the same process for Cout. Since Cout = ((A Xor in interactive half adder digital logic circuit B) • Cin) + (A • B), we have three different input variables (A, B, Cin), which means we need 2^3 rows. The 2 means we have two possible values (0 or 1) and the 3 means we have three different variables (A, B, Cin). Since 2^3 = 8, we will fill the 8 rows of the table by counting from 0 to 7 in binary.

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

Table 3

As we did in solving for Sum, we will solve for Cout by combining two variables at a time. As in regular algebra, the rule here is to eliminate the parentheses. Consequently, we start by computing A Xor in interactive half adder digital logic circuit B and call it T1. Recall, again, that the output of the XOR function is asserted (equals to 1), only when one of the inputs is asserted; otherwise, the output is OFF (equals to 0). Also, we gray out the variables we are not using.

A B Cin T1=AXor in interactive half adder digital logic circuitB Cout
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0

Table 4

Now we are going to add Cin into the mix to eliminate those parentheses: (A Xor in interactive half adder digital logic circuit B) • Cin: T1 • Cin:

A B Cin T1=AXor in interactive half adder digital logic circuitB X2=T1•Cin Cout
0 0 0 0 0
0 0 1 0 0
0 1 0 1 0
0 1 1 1 1
1 0 0 1 0
1 0 1 1 1
1 1 0 0 0
1 1 1 0 0

Table 5

The next pair of parentheses to tackle is (A • B). So

A B Cin T1=AXor in interactive half adder digital logic circuitB X2=T1•Cin T2=A•B Cout
0 0 0 0 0 0
0 0 1 0 0 0
0 1 0 1 0 0
0 1 1 1 1 0
1 0 0 1 0 0
1 0 1 1 1 0
1 1 0 0 0 1
1 1 1 0 0 1

Table 6

Now all we have left is to fill the Cout column. From Cout = ((A Xor in interactive half adder digital logic circuit B) • Cin) + (A • B), we have used the process of combining two variables at a time to arrive at Cout = X2 + T2. You don’t remember the steps? First we combined A Xor in interactive half adder digital logic circuit B and called the result T1 (column 4 above). Second we combined the result of A Xor in interactive half adder digital logic circuit B with Cin to get X2 (column 5). Third, we solved for (A • B) and called it T2 (column 6). If this quick recap did not help, review the tables you created as you followed along with us. If you did not follow along with your own tables, now is a good time to go back and follow with us.

Below we fill the Cout table.

A B Cin T1=AXor in interactive half adder digital logic circuitB X2=T1•Cin T2=A•B Cout =T2+X2
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 1 0 1 0 0 0
0 1 1 1 1 0 1
1 0 0 1 0 0 0
1 0 1 1 1 0 1
1 1 0 0 0 1 1
1 1 1 0 0 1 1

Table 7

Our final step is to have a table with only the input and the output variables — no intermediate variables. Such a table is shown near the Full-Adder applet at the top of this page. If your professor asks you to show your work, then you can turn in Table 2, Table 7, and the table at the top of the page.

Teahlab on LinkedIn     Teahlab on Facebook