SlidePub
Home
Categories
Login
Register
Home
General
Comparators in DLD.
Comparators in DLD.
7,677 views
27 slides
Dec 23, 2017
Slide
1
of 27
Previous
Next
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
About This Presentation
All About Comparators, there types and Logic.
Size:
6.33 MB
Language:
en
Added:
Dec 23, 2017
Slides:
27 pages
Slide Content
Slide 1
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 1
Digital Fundamentals
CHAPTER 6
Functions of Combinational Logic
Comparators
Slide 2
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 2
COMPARATORS
•Comparatorisacombinationallogiccircuitthat
comparesthemagnitudesoftwobinary
quantities(Numbers)todeterminewhichone
numberhasless,equalorgreatermagnitude.
•Inotherword,acomparatordeterminesthe
relationshipoftwobinaryquantities.
•AexclusiveNORgatecanbeusedasabasic
comparator.
Slide 3
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 3
Magnitude Comparator
•Three binary variables are used to indicate
the outcome of the comparison as
A>B, A<B, or A=B.
•The below figure shows the block diagram
of a n-bit comparator which compares the
two numbers of n-bit length and generates
their relation between themselves.
Slide 4
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 4
Digital Comparator
Slide 5
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 5
Comparators
•1-Bit Comparator
•2-Bit Comparator
•4-Bit Comparator
Slide 6
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 6
1 bit Magnitude comparator
•A comparator used to compare two numbers each of
single bit is called single bit comparator.
•It consists of two inputs for allowing two single bit
numbers and three outputs to generate less than, equal
and greater than comparison outputs.
•The figure below shows the block diagram of a single bit
magnitude comparator.
•This comparator compares the two bits and produces
one of the 3 outputs as L (A<B), E (A=B) and G (A>B).
Slide 7
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 7
Block Diagram ( Single Bit Comparator)
Slide 8
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 8
Contd...
•Therearetwodifferenttypesofoutputrelationship
betweenthetwobinaryquantities;
•Equalityoutputindicatesthatthetwobinary
numbersbeingcomparedisequal(A=B)and
•Inequalityoutputthatindicateswhichofthetwo
binarynumberbeingcomparedisthelarger.
•Thatis,thereisanoutputthatindicateswhenAis
greaterthanB(A>B)andanoutputthatindicates
whenAislessthanB(A<B).
Slide 9
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 9
Equality
•From chapter 3:
–XNOR gate can be used as a basic
comparator
•Output is a 0 if the two input bits are not
equal and 1 if the input bits are equal.
Slide 10
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 10
Comparators
•1-Bit Comparator
The output is 1 when the inputs are equal
Slide 11
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 11
2-Bit comparator
•A 2-bit comparator compares two binary
numbers, each of two bits and produces their
relation such as one number is equal or greater
than or less than the other.
•The figure below shows the block diagram of a
two-bit comparator which has four inputs and
three outputs.
Slide 12
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 12
Slide 13
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 13
•In order to compare binary numbers containing two bits
each, an additional XNOR gate is necessary
•2 LSBof two numbers are compared by gate G1
•2 MSBof two numbers are compared by gate G2
•1 ANDgate can be used
•If 2 numbers are equal, their corresponding bits are
same and the output of each X-NOR gate is 1.
•If the corresponding sets of bits are not equal, a 0
occurs on that exclusive –NOR gate output.
Slide 14
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 14
Comparators
•2-Bit Comparator
The output is 1 when A
0= B
0AND A
1= B
1
Slide 15
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 15
Example
•Apply each of the following sets of binary
numbers to the comparator inputs and
determine the output by the following logic
levels through the circuit.
•10 and10
•11 and 10
•Repeat the process for binary inputs of 01
and 10.
Slide 16
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 16
In-Equality
•In addition to the equality output, fixed function comparators can
provide additional outputs that indicate:
•Which of the two binary numbers being compared is the larger.
•i.e. An output that indicates when number A is greater than number
B. (A>B)
•An output that indicates when number A is less than number B
(A<B) as shown in logic symbol for 4-bit comparator.
Slide 17
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 17
4-Bit Comparator
•It can be used to compare two four-bit words.
•The two 4-bit numbers are A = A3 A2 A1 A0 and
B3 B2 B1 B0 where A3 and B3 are the most
significant bits.
Slide 18
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 18
18
It has three active-HIGH outputs
Startwithmostsignificantbitineachnumbertodetermine
theinequalityof4-bitbinarynumbersAandB
•OutputA<BwillbeHIGHifA
3=0,andB
3=1
•OutputA>BwillbeHIGHifA
3=1,andB
3=0
•IfA
3=0,andB
3=0orA
3=1,andB
3=1,thenexaminethenext
lowerorderbitpositionforaninequality,Onlywhenallbits
ofA=B,outputA=BwillbeHIGH
Slide 19
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 19
19
The general procedure used in comparator:
•Start with the highest-order bits (MSB)
•When an inequality is found, the relationship of the 2
numbers is established, and any other inequalities in
lower-order positions must be ignored
•THE HIGHEST ORDER INDICATION MUST TAKE
PRECEDENCE
Slide 20
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 20
Example: Determine the A=B, A>B, and A<B outputs for the
input numbers shown on the 4-bit comparator as given below.
Solution: The number on the A inputs is 0110 and the number on the B inputs is 0011.
The A > B output is HIGH and the other outputs (A=B and A<B) are LOW
Slide 21
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 21
21
74LS85 (4bit magnitude comparator)
The74LS85 compares two unsigned 4-bit binary
numbers , the unsigned numbers are A
3, A
2, A
1, A
0 and
B
3, B
2, B
1, B
0.
Cascading
Inputs
Outputs
Slide 22
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 22
22
Comparator Expansion (Cascading Comparator)
•Inaddition,italsohasthreecascadinginputs:
•Theseinputsprovidesameansforexpandingthe
comparisonoperationbycascadingtwoormore
4bitcomparator.
•Toexpandthecomparator,theA<B,A=B,andA>B
outputsofthelowerordercomparatorare
connectedtothecorrespondingcascadinginputsof
thenexthigherordercomparator.
Slide 23
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 23
23
Contd...
•The lowest-order comparator must have a HIGH on
the A=B, and LOWs on the A<B and A>B inputs as
shown in next slide.
•The comparator on the left is comparing the lower-
order 8bit with the comparatoron the right with
higherorder8bit .
•The outputs of the lowerorderbits are fed to the
cascade inputs of the comparator on the right, which is
comparing the high-order bits.
•The outputs of the high-order comparator are the final
outputs that indicate the result of the 8bit
comparison.
Slide 24
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 24
24
An 8-bit magnitude comparator using two 4-bit comparators.
Slide 25
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 25
25
Slide 26
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 26
26
Slide 27
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 27
THE END
Tags
Categories
General
Download
Download Slideshow
Get the original presentation file
Quick Actions
Embed
Share
Save
Print
Full
Report
Statistics
Views
7,677
Slides
27
Favorites
8
Age
2900 days
Related Slideshows
22
Pray For The Peace Of Jerusalem and You Will Prosper
RodolfoMoralesMarcuc
30 views
26
Don_t_Waste_Your_Life_God.....powerpoint
chalobrido8
32 views
31
VILLASUR_FACTORS_TO_CONSIDER_IN_PLATING_SALAD_10-13.pdf
JaiJai148317
30 views
14
Fertility awareness methods for women in the society
Isaiah47
29 views
35
Chapter 5 Arithmetic Functions Computer Organisation and Architecture
RitikSharma297999
26 views
5
syakira bhasa inggris (1) (1).pptx.......
ourcommunity56
28 views
View More in This Category
Embed Slideshow
Dimensions
Width (px)
Height (px)
Start Page
Which slide to start from (1-27)
Options
Auto-play slides
Show controls
Embed Code
Copy Code
Share Slideshow
Share on Social Media
Share on Facebook
Share on Twitter
Share on LinkedIn
Share via Email
Or copy link
Copy
Report Content
Reason for reporting
*
Select a reason...
Inappropriate content
Copyright violation
Spam or misleading
Offensive or hateful
Privacy violation
Other
Slide number
Leave blank if it applies to the entire slideshow
Additional details
*
Help us understand the problem better