SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
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
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 2
COMPARATORS
• Comparator is a combinational logic circuit that
compares the magnitudes of two binary
quantities(Numbers) to determine which one
number has less, equal or greater magnitude.
• In other word, a comparator determines the
relationship of two binary quantities.
• A exclusiveNOR gate can be used as a basic
comparator.
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.
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 4
Digital Comparator
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
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).
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)
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 8
Contd...
• There are two different types of output relationship
between the two binary quantities;
• Equality output indicates that the two binary
numbers being compared is equal (A = B) and
• Inequality output that indicates which of the two
binary number being compared is the larger.
• That is, there is an output that indicates when A is
greater than B (A > B) and an output that indicates
when A is less than B (A < B).
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.
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
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.
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 12
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 LSB of two numbers are compared by gate G1
• 2 MSB of two numbers are compared by gate G2
• 1 AND gate 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.
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 A0 = B0 AND A1 = B1
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.
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.
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.
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
Start with most significant bit in each number to determine
the inequality of 4-bit binary numbers A and B
• Output A<B will be HIGH if A3=0, and B3=1
• Output A>B will be HIGH if A3=1, and B3=0
• If A3=0, and B3=0 or A3=1, and B3=1, then examine the next
lower order bit position for an inequality, Only when all bits
of A=B, output A=B will be HIGH
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
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
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 21
21
74LS85 (4bit magnitude comparator)
The 74LS85 compares two unsigned 4-bit binary
numbers , the unsigned numbers are A3, A2, A1, A0 and
B3, B2, B1, B0.
Cascading
Inputs
Outputs
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)
• In addition, it also has three cascading inputs:
• These inputs provides a means for expanding the
comparison operation by cascading two or more
4bit comparator.
• To expand the comparator, the A<B, A=B, and A>B
outputs of the lowerorder comparator are
connected to the corresponding cascading inputs of
the next higherorder comparator.
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 8bit with the comparator on the right with
higherorder 8bit .
• The outputs of the lowerorder bits 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 8bit
comparison.
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.
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 25
25
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 26
26
Floyd
Digital Fundamentals, 9/e
Copyright ©2006 by Pearson Education, Inc.
Upper Saddle River, New Jersey 07458
All rights reserved.
Slide 27
THE END

Contenu connexe

Tendances

Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits DrSonali Vyas
 
Decoders
DecodersDecoders
DecodersRe Man
 
Octal to binary encoder
Octal to binary encoderOctal to binary encoder
Octal to binary encoderAjay844
 
Number system logic gates
Number system logic gatesNumber system logic gates
Number system logic gatesJaipal Dhobale
 
Design half ,full Adder and Subtractor
Design half ,full Adder and SubtractorDesign half ,full Adder and Subtractor
Design half ,full Adder and SubtractorJaimin@prt.ltd.
 
Multiplexer and DeMultiplexer
Multiplexer and DeMultiplexerMultiplexer and DeMultiplexer
Multiplexer and DeMultiplexerEstiak Khan
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoderAbid Ali
 
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to CountersISMT College
 
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational CircuitsCOMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational CircuitsVanitha Chandru
 

Tendances (20)

Combinational circuits
Combinational circuits Combinational circuits
Combinational circuits
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Decoders
DecodersDecoders
Decoders
 
Octal to binary encoder
Octal to binary encoderOctal to binary encoder
Octal to binary encoder
 
Number system logic gates
Number system logic gatesNumber system logic gates
Number system logic gates
 
Design half ,full Adder and Subtractor
Design half ,full Adder and SubtractorDesign half ,full Adder and Subtractor
Design half ,full Adder and Subtractor
 
Multiplexer and DeMultiplexer
Multiplexer and DeMultiplexerMultiplexer and DeMultiplexer
Multiplexer and DeMultiplexer
 
Code conversion
Code conversionCode conversion
Code conversion
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Encoders and decoders
Encoders and decodersEncoders and decoders
Encoders and decoders
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
Ring counter
Ring counterRing counter
Ring counter
 
Introduction to Counters
Introduction to CountersIntroduction to Counters
Introduction to Counters
 
Subtractor (1)
Subtractor (1)Subtractor (1)
Subtractor (1)
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
Encoder decoder
Encoder decoderEncoder decoder
Encoder decoder
 
full subtractor
full subtractorfull subtractor
full subtractor
 
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational CircuitsCOMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
COMPUTER ORGANIZATION - Logic gates, Boolean Algebra, Combinational Circuits
 
Decimal adder
Decimal adderDecimal adder
Decimal adder
 

Similaire à Comparators in DLD.

Computer Architecture_Digital Comparator.docx
Computer Architecture_Digital Comparator.docxComputer Architecture_Digital Comparator.docx
Computer Architecture_Digital Comparator.docxSangitaBose2
 
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...UmerKhan147799
 
4 bit magnjtude comparators ppt COA project
4 bit magnjtude comparators ppt COA project4 bit magnjtude comparators ppt COA project
4 bit magnjtude comparators ppt COA projectragavank029
 
Digital Comprator
Digital CompratorDigital Comprator
Digital Compratorsuraj829
 
DLD Lecture No 21 BCD Multiplier and Magnitude Comparator.pptx
DLD Lecture No 21  BCD Multiplier and Magnitude Comparator.pptxDLD Lecture No 21  BCD Multiplier and Magnitude Comparator.pptx
DLD Lecture No 21 BCD Multiplier and Magnitude Comparator.pptxSaveraAyub2
 
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsFYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsArti Parab Academics
 
Data flow model -Lecture-4
Data flow model -Lecture-4Data flow model -Lecture-4
Data flow model -Lecture-4Dr.YNM
 
I semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptxI semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptxMayank Pandey
 
Unit 4 combinational circuit
Unit 4 combinational circuitUnit 4 combinational circuit
Unit 4 combinational circuitKalai Selvi
 
2-bit comparator
2-bit comparator2-bit comparator
2-bit comparatorIslam Adel
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9wajanga
 
2 article azojete vol 9 9 16
2 article azojete vol 9 9 162 article azojete vol 9 9 16
2 article azojete vol 9 9 16Oyeniyi Samuel
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logicDeepak John
 

Similaire à Comparators in DLD. (20)

Computer Architecture_Digital Comparator.docx
Computer Architecture_Digital Comparator.docxComputer Architecture_Digital Comparator.docx
Computer Architecture_Digital Comparator.docx
 
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
Lecture6 Chapter4- Design Magnitude Comparator Circuit, Introduction to Decod...
 
4 bit magnjtude comparators ppt COA project
4 bit magnjtude comparators ppt COA project4 bit magnjtude comparators ppt COA project
4 bit magnjtude comparators ppt COA project
 
Digital Comprator
Digital CompratorDigital Comprator
Digital Comprator
 
DLD Lecture No 21 BCD Multiplier and Magnitude Comparator.pptx
DLD Lecture No 21  BCD Multiplier and Magnitude Comparator.pptxDLD Lecture No 21  BCD Multiplier and Magnitude Comparator.pptx
DLD Lecture No 21 BCD Multiplier and Magnitude Comparator.pptx
 
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic CircuitsFYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
FYBSC IT Digital Electronics Unit III Chapter II Arithmetic Circuits
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
Data flow model -Lecture-4
Data flow model -Lecture-4Data flow model -Lecture-4
Data flow model -Lecture-4
 
DLD Chapter-4.pdf
DLD Chapter-4.pdfDLD Chapter-4.pdf
DLD Chapter-4.pdf
 
vhdl exp-5
vhdl exp-5vhdl exp-5
vhdl exp-5
 
B sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lcktB sc3 unit 4 combi..lckt
B sc3 unit 4 combi..lckt
 
Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptx
 
I semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptxI semester Unit 4 combinational circuits.pptx
I semester Unit 4 combinational circuits.pptx
 
Unit 4 combinational circuit
Unit 4 combinational circuitUnit 4 combinational circuit
Unit 4 combinational circuit
 
2-bit comparator
2-bit comparator2-bit comparator
2-bit comparator
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9
 
2 article azojete vol 9 9 16
2 article azojete vol 9 9 162 article azojete vol 9 9 16
2 article azojete vol 9 9 16
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Digital Logic Design
Digital Logic Design Digital Logic Design
Digital Logic Design
 
lecture_19.pptx
lecture_19.pptxlecture_19.pptx
lecture_19.pptx
 

Dernier

VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spaintimesproduction05
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 

Dernier (20)

Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 

Comparators in DLD.

  • 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
  • 2. Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved. Slide 2 COMPARATORS • Comparator is a combinational logic circuit that compares the magnitudes of two binary quantities(Numbers) to determine which one number has less, equal or greater magnitude. • In other word, a comparator determines the relationship of two binary quantities. • A exclusiveNOR gate can be used as a basic comparator.
  • 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.
  • 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
  • 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
  • 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).
  • 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)
  • 8. Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved. Slide 8 Contd... • There are two different types of output relationship between the two binary quantities; • Equality output indicates that the two binary numbers being compared is equal (A = B) and • Inequality output that indicates which of the two binary number being compared is the larger. • That is, there is an output that indicates when A is greater than B (A > B) and an output that indicates when A is less than B (A < B).
  • 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.
  • 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
  • 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.
  • 12. Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved. Slide 12
  • 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 LSB of two numbers are compared by gate G1 • 2 MSB of two numbers are compared by gate G2 • 1 AND gate 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.
  • 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 A0 = B0 AND A1 = B1
  • 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.
  • 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.
  • 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.
  • 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 Start with most significant bit in each number to determine the inequality of 4-bit binary numbers A and B • Output A<B will be HIGH if A3=0, and B3=1 • Output A>B will be HIGH if A3=1, and B3=0 • If A3=0, and B3=0 or A3=1, and B3=1, then examine the next lower order bit position for an inequality, Only when all bits of A=B, output A=B will be HIGH
  • 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
  • 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
  • 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 (4bit magnitude comparator) The 74LS85 compares two unsigned 4-bit binary numbers , the unsigned numbers are A3, A2, A1, A0 and B3, B2, B1, B0. Cascading Inputs Outputs
  • 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) • In addition, it also has three cascading inputs: • These inputs provides a means for expanding the comparison operation by cascading two or more 4bit comparator. • To expand the comparator, the A<B, A=B, and A>B outputs of the lowerorder comparator are connected to the corresponding cascading inputs of the next higherorder comparator.
  • 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 8bit with the comparator on the right with higherorder 8bit . • The outputs of the lowerorder bits 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 8bit comparison.
  • 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.
  • 25. Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved. Slide 25 25
  • 26. Floyd Digital Fundamentals, 9/e Copyright ©2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved. Slide 26 26
  • 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