

THE HALF ADDER
Introduction
The HalfAdder is the basic building block of all arithmetic circuits. Every microchip or machine that can perform addition, subtraction, multiplication, or division has HalfAdder blocks inside. Because the HalfAdder is so material to our ability to do math on computers, this article will show you how to design the HalfAdder from scratch.
DESIGNThere are three steps to designing a digital circuit: Step 1. Convert the problem description into a truth table. Truth Table
If you think back a little, you will remember that back in grade school you did a lot of homework converting English statements into algebraic expressions. As an instance, for Angie is eight years older than Dina, you had to write For our purpose, we need to design a circuit that is capable of adding two singlebit binary numbers. Hence, our circuit should be able to perform the following four possible calculations:
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 twobit 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 HalfAdders'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 HalfAdder 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 HalfAdder.

