Options  |  About
Binary Adders

By now, you have learned how to add binary numbers. You have also learned how the 6 common logic gates operate. Now it is time to learn how the logic gates are used to add binary numbers.



The Binary Half-Adder

You may be surprised to see how easy it is to create a logic circuit that adds binary numbers. The binary half-adder is perfect for adding 1-bit binary numbers. It is made out of one AND gate and one XOR gate. Here is how it is arranged in a diagram:

A and B are the two inputs. In this case they are the two bits that are to be added. The XOR gate is used to figure out the sum, while the AND gate is used to figure out the carry. Let us start with the XOR gate. A and B are inputted, and if the two bits differ, the output of the XOR gate is 1, which means that the sum is 1. Otherwise, the output of the XOR gate is 0. If you recall addition of bits, 0 + 0 = 0, 0 + 1 = 1, while 1 + 1 = 0 with a carry of 1. This is where the AND gate comes in. If both A and B are 1, then the output for the AND gate, which represents the carry, is 1. Otherwise the carry is 0. This can be summarized in a truth table for the half-adder:

Input Output
A B Sum Carry
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

The Half-Adder has its own special symbol in diagrams in order to make them simpler. This is what it looks like:

Now that we know how the computer adds two digits at a time, it is time to learn how it adds two bits and a carry at the same time.



The Binary Full-Adder

The binary full-adder is very useful because it can add three digits at a time. If you recall from our binary addition section, there are sometimes carries that need to be added along with the two other digits. This requires the addition of three bits at a time, which is exactly what the full-adder is used for. Here is the logic diagram for the more complex full-adder, which employs two HA's (half-adders) as well as an OR gate:

As you can see, there are now three inputs: A, B and C. A and B are usually used for the two bits which would be normally added, while C is usually used as a carry from a lower place value. As you can see, inputs A and B go into a half-adder. The sum of the half-adder is sent as one of the inputs (along with input C) to the second half-adder. The sum of the second half-adder is the sum of all three inputs. If there was a carry from either or both of the half-adders, the Carry output for the full adder is HIGH. There are 8 possible combinations of inputs for the full-adder, all recorded on the full-adder truth table:

Input Output
A B C Sum Carry
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

To simplify this diagram, a symbol is used for the full-adder. The symbol is identical to the half-adder symbol, except it bears the letters FA instead of the HA on it.



Parallel Binary Adder

The use of one half-adder or one full-adder alone are great for adding up two binary numbers with a length of one bit each, but what happens when the computer needs to add up two binary numbers with a longer length? Well, there are several ways of doing this. The fastest way by far is to use the Parallel Binary Adder. The parallel binary adder uses one half-adder, along with one or more full adders. The number of total adders needed depends on the length of the largest of the two binary numbers that are to be added. For example, if we were to add up the binary numbers 1011 and 1, we would need four adders in total, because the length of the larger number is four. Keeping this in mind, here is a demonstration of how a four-bit parallel binary adder works, using 1101 and 1011 as the two numbers to add:

Just like when we add without the computer, in the parallel binary adder, the computer adds from right to left. Here is a step by step list, showing you what happens in the parallel Binary Adder

1. In the only half-adder, inputs of 1 and 1 give us 0 with a carry of 1.
2. In the first full-adder (going from right to left), the inputs of 1 and 0 plus  the carry of 1 from the half-adder give us a 0 with a carry of 1.
3. In the second full adder, the inputs of 0 and 1 plus the carry of 1 from the previous full-adder give us a 0 with a carry of 1.
4. In the third and final full adder, the inputs of 1 and 1 plus the carry of 1 from the previous full-adder give us a 1 with a carry of 1.
5. Since there are no more numbers to add up, and there is still a carry of 1, the carry becomes the most significant bit.
6. The sum of 1101 and 1011 is 11000.

Back Forward
Back Forward

Gates of Creation // Basic Hardware // Binary Adders