Professional Documents
Culture Documents
2 Bit Full Adder
2 Bit Full Adder
Sanchit Karve
born2c0de
born2c0de@hotmail.com
ADDING TWO
2-BIT NUMBERS
USING A
BINARY FULL ADDER
CONTENTS
1. INTRODUCTION
2. ADDING BINARY NUMBERS
3. AIM
4. APPARATUS
5. PROCEDURE
6. CIRCUIT DIAGRAM
7. TRUTH TABLE
8. CONCLUSION
9. REFERENCES
INTRODUCTION
If you look at the history of computer technology, the
Boolean Gate has remained a constant component of the
computer. The technologies used to implement those gates,
however, have changed dramatically over the years. The
very first electronic gates were created using relays. These
gates were slow and bulky. Vacuum tubes replaced relays.
Tubes were much faster but they were just as bulky, and
they were also plagued by the problem that tubes burn out
(like light bulbs). Once transistors were perfected
(transistors were invented in 1947), computers started using
gates made from discrete transistors. Transistors had
many advantages: high reliability, low power
consumption and small size compared to tubes or
relays. These transistors were discrete devices, meaning
that each transistor was a separate device. Each one came
in a little metal can about the size of a pea with three wires
attached to it. It might take three or four transistors and
several resistors and diodes to create a gate.
In the early 1960s, integrated circuits (ICs) were invented.
Transistors, resistors and diodes could be manufactured
together on silicon "chips." This discovery gave rise to SSI
(small scale integration) ICs. An SSI IC typically consists of a
3-mm-square chip of silicon on which perhaps 20 transistors
and various other components have been etched. A typical
chip might contain four or six individual gates. These chips
shrank the size of computers by a factor of about 100 and
made them much easier to build.
The Adder is a digital circuit which forms the sum and carry
of two or more numbers. Adder circuits are essential inside
microprocessors as part of the ALU, or arithmetic logic
unit, where the processing and manipulation of binary
numbers takes place.
It uses three gates XOR, AND and OR to perform addition.
AND Gate
The AND gate performs a logical "and" operation on two
inputs, A and B:
AND Gate
A
0
0
1
1
B
0
1
0
1
Q
0
0
0
1
The idea behind an AND gate is, "If A AND B are both 1,
then Q should be 1." You can see that behavior in the logic
table for the gate. You read this table row by row, like this:
AND Gate
A
0
0
1
1
B
0
1
0
1
Q
0
0
0
1
If A is 0 AND B is 0, Q is 0.
If A is 0 AND B is 1, Q is 0.
If A is 1 AND B is 0, Q is 0.
If A is 1 AND B is 1, Q is 1.
OR Gate
The next gate is an OR gate. Its basic idea is, "If A is 1 OR B
is 1 (or both are 1), then Q is 1."
OR Gate
A
0
0
1
1
B
0
1
0
1
Q
0
1
1
1
XOR Gate
The XOR gate is also known as "exclusive or".
XOR Gate
A
0
0
1
1
B
0
1
0
1
Q
0
1
1
0
If you try all four different patterns for A and B and trace
them through the circuit, you will find that Q behaves like an
XOR gate. Since there is a well-understood symbol for XOR
gates, it is generally easier to think of XOR as a "standard
gate" and use it in the same way as AND and OR in circuit
diagrams.
INTEGRATED CIRCUITS
ADDING BINARY
NUMBERS
A key requirement of digital computers is the ability to use
logical functions to perform arithmetic operations. The basis
of this is addition; if we can add two binary numbers, we can
just as easily subtract them, or get a little fancier and
perform multiplication and division. How, then, do we add
two binary numbers?
Let's start by adding two binary bits. Since each bit has only
two possible values, 0 or 1, there are only four possible
combinations of inputs. These four possibilities, and the
resulting sums, are:
0 + 0 =
0 + 1 =
1 + 0 =
1 + 1 = 10
The fourth line indicates that we have to account for two
output bits when we add two input bits: the sum and a
possible carry. Let's set this up as a truth table with two
inputs and two outputs, and see where we can go from
there.
INPUTS
OUTPUTS
CARRY SUM
OUTPUTS
CIN COUT S
Cin
A0
2 BIT ADDER
S1
Cout
S0
Cout
Cin
S1
S0
AIM
APPARATUS
Bread Board ( x 2 )
Connecting Wires
Light Emitting Diodes (LED) ( x 3 )
9V Battery ( x 1 )
74LS86 (XOR) Circuit ( x 1 )
74LS08 (AND) Circuit ( x 1 )
74LS32 (OR) Circuit ( x 1 )
PROCEDURE
Note that the XOR, AND, and OR gate make up the full
adder circuit for each of the two bits.
Inputs A1-A2 (number 1) and B1-B2 (number 2) should
be connected to four of the data switches.
A fifth data switch should be connected to Carry In.
Note that A1 and B1 are the LSBs of the numbers, and
A2 and B2 the MSBs.
CIRCUIT DIAGRAM
The gates should be connected as follows:
TRUTH TABLE
A
Cin
Sum
Cout
Final Sum
00
00
00
00
00
00
00
00
01
01
01
01
01
01
01
01
10
10
10
10
10
10
10
10
11
11
11
11
11
11
11
11
00
00
01
01
10
10
11
11
00
00
01
01
10
10
11
11
00
00
01
01
10
10
11
11
00
00
01
01
10
10
11
11
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
00
01
01
10
10
11
11
00
01
10
10
11
11
00
00
01
10
11
11
00
00
01
01
10
11
00
00
01
01
10
10
11
0
0
0
0
0
0
0
1
0
0
0
0
0
1
1
1
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
1
000
001
001
010
010
011
011
100
001
010
010
011
011
100
100
101
010
011
011
100
100
101
101
110
011
100
100
101
101
110
110
111
CONCLUSION
Adders are widely used in many electronic devices. Adders
can be used to add numbers, subtract numbers (negative
addition), multiply (repetitive addition) as well as divide
numbers (repetitive subtraction).
The limitation of this project is that it can only compute sums
up to a maximum value of 7.
Adders form an integral part of ALUs [Arithmetic Logic Unit]
and are widely used in high-performance DSP Applications.
[Digital Signal Processing]
REFERENCES
www.play-hookey.com
www.howstuffworks.com
Introduction to Digital Systems University of
Texas at Dallas
www.doctronics.co.uk