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

Half Adder

interactive half 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 Cout Sum
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

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:

A B RESULT
0 0 00
0 1 01
1 0 01
1 1 10

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!)

A B CS
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

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 • B
S = A Xor in interactive half adder digital logic circuit B.
Of 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.

A B SS
0 0 0
0 1 1 A • B
1 0 1 A •B
1 1 0

Then we add the terms to get S=A • B + A • B. If you checkout the XOR gate page, you will learn that
A Xor in half adder digital logic circuit B= A • B + A • B.

Circuit

Based on the compound function C = A • B and S = A Xor in half adder digital logic circuit 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.

Teahlab on LinkedIn     Teahlab on Facebook