0% found this document useful (0 votes)
23 views7 pages

Lecture Six

Uploaded by

alialiqpwom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views7 pages

Lecture Six

Uploaded by

alialiqpwom
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Chapter Three

Arithmetic Circuits
3-1 The Exclusive-OR Gate
Figure (3-1) shows an Exclusive-OR gate. It has two inputs and
one output.

Figure (3-1): Exclusive-OR gate

Why is the circuit of figure (3-1) called an Exclusive-OR gate? The


answer can be explained by writing the truth table of this circuit.

Table (3-1): Exclusive-OR gate

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)

The Exclusive-OR operation is sometimes called " mode-2 addition".

1
Here are the rules for this addition:-

0Ө0=0

0Ө1=1

1Ө0=1

1Ө1=0

Md-2 addition is the same as binary addition, provided we disregard


carries.

The circuit of figure (3-1) is only one of many ways to build an


exclusive-OR gate.

H.W (1): Design an exclusive-OR gate using the five NAND gates.

To represent the exclusive-OR gate, we use the standard symbol in


figure (3-2).

Figure (3-2): Standard symbol for exclusive-OR gate

3-2 The half-Adder


The half-adder adds two binary digits at a time. Figure (3-3) displays
how to make a half-adder.

Figure (3-3): Half-adder circuit

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:

Table (3-2): Half-adder truth table

A B carry sum
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0

The half-adder of figure (3-3) performs binary addition. The important


thing to remember is the half-adder adds two binary digits.

3-3 The Full-Adder


By connecting two half-adders and an OR gate, we get a full-adder, a
circuit that can add three digits at a time. Figure (3-4) depicts a full-adder.
For instance, suppose A=1, B=1 and C=0, the final output is a sum of 0
with a carry of 1. If the inputs are A=1, B=1 and C=1, we get a sum of 1
with a carry of 1.

Figure (3-4): Full-Adder

3
The truth table of full-adder is shown below:

Table (3-3): Full-adder truth table

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

Remember that the full-adder adds 3 binary digits at a time.

3-4 A Parallel Binary Adder


We can connect adders as shown in figure (3-5) to add two binary
numbers.

Figure (3-5): Parallel four-bit binary adder

As an example of how the adder in figure (3-5) works, suppose we


want to add 1011 and 0111. The final output of the system is 10010.

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

(15)10 + (15)10 = (30)10

(1111)2 + (1111)2 = (11110)2

To increase the capacity, more full-adders can be connected to the left


end of the system. For instance, to add six-bit numbers, connect two more
full-adders.

How about the subtraction? Figure (3-6) depicts a system that


subtracts B4 B3 B2 B1 from A4 A3 A2 A1. Here is what it does. First, the
four inverters complement each B bit to get B 4 B3 B2 B1, the 1's
complement of B4 B3 B2 B1. The full-adders now add A4 A3 A2 A1, B4 B3
B2 B1, and the end-around carry. In other words, the system does what we
do in our minds when we use the 1's complement to subtract.

Figure (3-6): Parallel four-bit binary subtractor

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.

Figure (3-7): Half-subtractor circuit

The circuit in figure (3-7) has a truth table identical to table (3-4).

Table (3-4): Half-subtractor truth table

A B Borrow Difference
0 0 0 0
0 1 1 1
1 0 0 1
1 1 0 0

The half-subtractor handles only two bits at a time. To take care of


higher order column, we need a full subtractor. Figure (3-8) shows a full-
subtractor logic diagram.

6
Figure (3-8): Full-subtractor logic diagram

The truth table of full-adder is shown in table 3-5.

Table (3-5): Full-subtractor truth table

H.W (2): Design 4 bit-binary subtractor

The adders and subtractors give us the basic circuit needed for binary
arithmetic; multiplication and division can be done by repeated additions
and subtractions.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy