Lecture Six
Lecture Six
Arithmetic Circuits
3-1 The Exclusive-OR Gate
Figure (3-1) shows an Exclusive-OR gate. It has two inputs and
one output.
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
The Exclusive-OR gate has a 1 output only when the inputs are
different; the output is 0 when the inputs are the same. To describe an
exclusive-OR gate, we write:
Y= A Ө B …………..(3-1)
1
Here are the rules for this addition:-
0Ө0=0
0Ө1=1
1Ө0=1
1Ө1=0
H.W (1): Design an exclusive-OR gate using the five NAND gates.
2
Output of the Exclusive-OR gate is the sum, and output of the AND gate
is the carry. The truth table of half-adder is as follows:
A B carry sum
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
3
The truth table of full-adder is shown below:
A B C carry sum
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
4
The capacity of the adder in figure (3-5) is limited. The largest binary
numbers that can be added are 1111 and 1111. So, the maximum capacity
is
5
3-5 Half-and Full Subtractors
Instead of using complements to subtract, circuits can subtract binary
numbers directly. Figure (3-7) shows one way to build a half-subtractor, a
circuit that can subtract one binary digit from another.
The circuit in figure (3-7) has a truth table identical to table (3-4).
A B Borrow Difference
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0
6
Figure (3-8): Full-subtractor logic diagram
The adders and subtractors give us the basic circuit needed for binary
arithmetic; multiplication and division can be done by repeated additions
and subtractions.