Half Adder |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The Half-Adder is the basic building block of all arithmetic circuits. Every microchip or machine that can perform addition, subtraction, multiplication, or division has Half-Adder blocks inside. Because the Half-Adder is so material to our ability to do math on computers, this article will show you how to design the Half-Adder from scratch. And this line of four operations is essentially your truth table! All that's left is to make it look like a table, with labels. So first you rotate the line of operations from the current horicontal position to a vertical position, and then you label each column. In addition, since one of the result is two bit, we turn all the answers into two-bit format —like below:
Now for the finishing touch. Every bit in a truth table must have its own label. So you must split the result column in two and label the first bit C and the second bit S. (Of course you can label them whatever you want!)
Voila! This is the Half-Adders's truth table! Switching Function
We label each bit of the truth table to make it easy to use the labels to create a switching function. Instead of trying to solve for two or more bits at once, we can solve one bit at a time. For example, notice that the relationship between inputs A and B and output C describes an AND gate. This quick observation is easy because we label the leading bit C. Notice further that the relationship between the inputs A and B and output S describes the XOR gate. Hence, the compound function that defines the Half-Adder is C = A BOf course, extracting a switching function from a truth table is not always so easy. So we will illustrate a more systematic approach. We start by pretending that you don't know what the XOR truth table looks like (it's on the XOR gate page). Consequently we will form the S bit switching function as follows: for every row where S = 1, we will write the relationship between the inputs A, B and the S bit—like below.
Then we add the terms to get S=A B + A B. If you checkout the XOR gate page, you will learn that A B= A B + A B.
CircuitBased on the compound function C = A B and S = A B, we have two input signals (A, B), two output signals (C, S) and we need two gates: an AND gate and an XOR gate. Go back to the top of this page to see the Half-Adder.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

B.