SlideShare a Scribd company logo
1 of 18
Download to read offline
SYED HASAN SAEED
hasansaeedcontrol@gmail.com
https://shasansaeed.yolasite.com
1
Syed Hasan Saeed, Integral University,
Lucknow
MAGNITUDE COMPARATOR
Syed Hasan Saeed, Integral University,
Lucknow
2
MAGNITUDE COMPARATOR: DIGITAL COMPARATOR
• It is a combinational logic circuit.
• Digital Comparator is used to compare the value of two binary
digits.
• There are two types of digital comparator (i) Identity Comparator
(ii) Magnitude Comparator.
• IDENTITY COMPARATOR: This comparator has only one output
terminal for when A=B, either A=B=1 (High) or A=B=0 (Low)
• MAGNITUDE COMPARATOR: This Comparator has three output
terminals namely A>B, A=B, A<B. Depending on the result of
comparison, one of these output will be high (1)
• Block Diagram of Magnitude Comparator is shown in Fig. 1
Syed Hasan Saeed, Integral University,
Lucknow
3
BLOCK DIAGRAM OF MAGNITUDE COMPARATOR
Syed Hasan Saeed, Integral University,
Lucknow
4
n- Bit Digital Comparator
A
n-Bit
B
n-Bit
A<B A=B A>B
Fig. 1
1- Bit Magnitude Comparator:
• This magnitude comparator has two inputs A and B and three
outputs A<B, A=B and A>B.
• This magnitude comparator compares the two numbers of single
bits.
• Truth Table of 1-Bit Comparator
Syed Hasan Saeed, Integral University,
Lucknow
5
INPUTS OUTPUTS
A B Y1 (A<B) Y2 (A=B) Y3 (A>B)
0 0 0 1 0
0 1 1 0 0
1 0 0 0 1
1 1 0 1 0
K-Maps For All Three Outputs :
Syed Hasan Saeed, Integral University,
Lucknow
6
A
B
0 1
0
1
0
0 0
1
B B
A
A
BAY1 
K-Map for Y1 : A<B
K-Maps For All Three Outputs :
Syed Hasan Saeed, Integral University,
Lucknow
7
A
B
0 1
0
1
0
0 0
1
B B
A
A
BAY1 
K-Map for Y1 : A<B
A
B
0 1
0
1
1
0 1
0
B B
A
A
ABBAY2 
K-Map for Y2 : A=B
K-Maps For All Three Outputs :
Syed Hasan Saeed, Integral University,
Lucknow
8
A
B
0 1
0
1
0
0 0
1
B B
A
A
BAY1 
K-Map for Y1 : A<B
A
B
0 1
0
1
1
0 1
0
B B
A
A
ABBAY2 
K-Map for Y2 : A=B
A 0 1
0
1
0
1
0
BB
A
A
B
0
BAY3 
K-Map for Y2 : A>B
Realization of One Bit Comparator
Syed Hasan Saeed, Integral University,
Lucknow
9
BA
BAY1 
A
B
AB
BA
ABBAY2 
BAY3 
BA 
BA 
BAY1 
ABBAY2 
BAY3 
Realization of by Using AND , EX-NOR gates
Syed Hasan Saeed, Integral University,
Lucknow
10
BA
BAY1 
BA
BAY2


BAY3 
BA 
A
B
2-Bit Comparator:
• A comparator which is used to compare two binary numbers each of two
bits is called a 2-bit magnitude comparator.
• Fig. 2 shows the block diagram of 2-Bit magnitude comparator.
• It has four inputs and three outputs.
• Inputs are A0 ,A1,B0 and B1 and Outputs are Y1, Y2 and Y3
Syed Hasan Saeed, Integral University,
Lucknow
11
A0
A1
B1
B0
Y1
Y2
Y3
2-Bit Comparator
Fig. 2
A
B
Input Output
GREATER THAN (A>B)
LESS THAN (A<B)
Similarly,
1. If A1= B1=1 and A0= 0, B0=1, then A<B
2. If A1= B1= 0 and A0= 0, B0=1 then A<B
Syed Hasan Saeed, Integral University,
Lucknow
12
A1 A0 B1 B0
1 0 0 1
1 1 1 0
0 1 0 0
1. If A1= 1 and B1= 0 then A>B
2. If A1 and B1 are same, i.e A1=B1=1 or A1=B1=0 and A0=1, B0=0
then A>B
INPUT OUTPUT
A1 A0 B1 B0 Y1=A<B Y2=(A=B) Y3=A>B
0 0 0 0 0 1 0
0 0 0 1 1 0 0
0 0 1 0 1 0 0
0 0 1 1 1 0 0
0 1 0 0 0 0 1
0 1 0 1 0 1 0
0 1 1 0 1 0 0
0 1 1 1 1 0 0
1 0 0 0 0 0 1
1 0 0 1 0 0 1
1 0 1 0 0 1 0
1 0 1 1 1 0 0
1 1 0 0 0 0 1
1 1 0 1 0 0 1
1 1 1 0 0 0 1
1 1 1 1 0 1 0
Syed Hasan Saeed, Integral University,
Lucknow
13
TRUTH TABLE
K-Map for A<B: K-Map for A=B:
Syed Hasan Saeed, Integral University,
Lucknow
14
0 1 1 1
0 0 1 1
0 0 0 0
0 0 1 0
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
00 01
00
01
11
10
11 10 00 01 11 10
00
01
11
10
A1A0
A1A0B1B0
B1B0
For A<B
For A=B
010110011 BBABABAAY 
01010101010101012 BBAABBAABBAABBAAY 
K-Map For A>B
Syed Hasan Saeed, Integral University,
Lucknow
15
0 0 0 0
1 0 0 0
1 1 0 1
1 1 0 0
00 01 11 10
00
01
11
10
A1A0
B1B0
001110103 BAABABBAY 
For A=B From K-Map
Syed Hasan Saeed, Integral University,
Lucknow
16
01010101010101012 BBAABBAABBAABBAAY 
)B(A)BA(Y
)BABA()BABA(Y
)BABA(BA)BABA(BAY
00112
000011112
1111001111002



LOGIC DIAGRAM OF 2-BIT COMPARATOR:
Syed Hasan Saeed, Integral University,
Lucknow
17
A1 A0 B1 B0
A< B
A=B
A > B
001 BAA
11 BA
010 BBA
11 BA
001 BAA
010 BBA
11 BA 
00 BA 
THANK YOU
Syed Hasan Saeed, Integral University,
Lucknow
18

More Related Content

What's hot

What's hot (20)

latches
 latches latches
latches
 
Binary multipliers
Binary multipliersBinary multipliers
Binary multipliers
 
Comparators in DLD.
Comparators in DLD.Comparators in DLD.
Comparators in DLD.
 
state diagrams of flip flops
 state diagrams of flip flops state diagrams of flip flops
state diagrams of flip flops
 
Design half ,full Adder and Subtractor
Design half ,full Adder and SubtractorDesign half ,full Adder and Subtractor
Design half ,full Adder and Subtractor
 
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
Adder & subtractor (Half adder, Full adder, Half subtractor, Full subtractor)
 
Decoder Full Presentation
Decoder Full Presentation Decoder Full Presentation
Decoder Full Presentation
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & Decoder
 
Adder and subtrctor DLD
Adder and subtrctor  DLDAdder and subtrctor  DLD
Adder and subtrctor DLD
 
Karnaugh map
Karnaugh mapKarnaugh map
Karnaugh map
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Counters
CountersCounters
Counters
 
Decoders
DecodersDecoders
Decoders
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
De lab manual
De lab manualDe lab manual
De lab manual
 
Sop and pos
Sop and posSop and pos
Sop and pos
 
K - Map
  K - Map    K - Map
K - Map
 
J - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPSJ - K & MASTERSLAVE FLIPFLOPS
J - K & MASTERSLAVE FLIPFLOPS
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
Data Flow Modeling
Data Flow ModelingData Flow Modeling
Data Flow Modeling
 

Similar to Magnitude comparator

magnitude comparator.pdf
magnitude comparator.pdfmagnitude comparator.pdf
magnitude comparator.pdfShayanRoy10
 
6 2 magnitudecomparator ibit and 2 bit converted
6 2 magnitudecomparator ibit and 2 bit converted6 2 magnitudecomparator ibit and 2 bit converted
6 2 magnitudecomparator ibit and 2 bit convertedsubisugadevan
 
Adder and Subtractor
Adder and SubtractorAdder and Subtractor
Adder and SubtractorJaydeep Kale
 
PPT 2 - CA unit II 22 7-2020
PPT 2 - CA unit II 22 7-2020PPT 2 - CA unit II 22 7-2020
PPT 2 - CA unit II 22 7-2020Thyagharajan K.K.
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logicDeepak John
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9wajanga
 
Computer organization algorithms like addition and subtraction and multiplica...
Computer organization algorithms like addition and subtraction and multiplica...Computer organization algorithms like addition and subtraction and multiplica...
Computer organization algorithms like addition and subtraction and multiplica...michaelaaron25322
 
UNIT - II.pptx
UNIT - II.pptxUNIT - II.pptx
UNIT - II.pptxamudhak10
 
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECESeshaVidhyaS
 
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 circuit (7-Segment display)
Combinational circuit (7-Segment display)Combinational circuit (7-Segment display)
Combinational circuit (7-Segment display)ali9753
 

Similar to Magnitude comparator (18)

magnitude comparator.pdf
magnitude comparator.pdfmagnitude comparator.pdf
magnitude comparator.pdf
 
PLA
PLAPLA
PLA
 
6 2 magnitudecomparator ibit and 2 bit converted
6 2 magnitudecomparator ibit and 2 bit converted6 2 magnitudecomparator ibit and 2 bit converted
6 2 magnitudecomparator ibit and 2 bit converted
 
Adder and Subtractor
Adder and SubtractorAdder and Subtractor
Adder and Subtractor
 
PPT 2 - CA unit II 22 7-2020
PPT 2 - CA unit II 22 7-2020PPT 2 - CA unit II 22 7-2020
PPT 2 - CA unit II 22 7-2020
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9
 
Computer organization algorithms like addition and subtraction and multiplica...
Computer organization algorithms like addition and subtraction and multiplica...Computer organization algorithms like addition and subtraction and multiplica...
Computer organization algorithms like addition and subtraction and multiplica...
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Combinational Ckt.pdf
Combinational Ckt.pdfCombinational Ckt.pdf
Combinational Ckt.pdf
 
UNIT - II.pptx
UNIT - II.pptxUNIT - II.pptx
UNIT - II.pptx
 
encoderdecoder.pptx
encoderdecoder.pptxencoderdecoder.pptx
encoderdecoder.pptx
 
Lesson Week 1-2.pptx
Lesson Week 1-2.pptxLesson Week 1-2.pptx
Lesson Week 1-2.pptx
 
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECEDigital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
Digital Electronics (EC8392) UNIT-II -PPT-S.SESHA VIDHYA/ ASP/ECE
 
Load monitoring
Load monitoringLoad monitoring
Load monitoring
 
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 circuit (7-Segment display)
Combinational circuit (7-Segment display)Combinational circuit (7-Segment display)
Combinational circuit (7-Segment display)
 
17067688.ppt
17067688.ppt17067688.ppt
17067688.ppt
 

More from Syed Saeed

Laplace transform of periodic functions
Laplace transform of periodic functionsLaplace transform of periodic functions
Laplace transform of periodic functionsSyed Saeed
 
Maximum power transfer theorem for ac network
Maximum power transfer theorem for ac networkMaximum power transfer theorem for ac network
Maximum power transfer theorem for ac networkSyed Saeed
 
Thevenin's theorem for ac network
Thevenin's theorem for ac network Thevenin's theorem for ac network
Thevenin's theorem for ac network Syed Saeed
 
Tellegen's theorem
Tellegen's theoremTellegen's theorem
Tellegen's theoremSyed Saeed
 
Millman's theorem
Millman's theoremMillman's theorem
Millman's theoremSyed Saeed
 
Subsitution theorem
Subsitution theoremSubsitution theorem
Subsitution theoremSyed Saeed
 
Max. power transfer theorem dc network (Revised)
Max. power transfer theorem dc network (Revised)Max. power transfer theorem dc network (Revised)
Max. power transfer theorem dc network (Revised)Syed Saeed
 
Norton's theorem
Norton's theoremNorton's theorem
Norton's theoremSyed Saeed
 
Circuit theory thevenin theorem
Circuit theory thevenin theoremCircuit theory thevenin theorem
Circuit theory thevenin theoremSyed Saeed
 
Basic definitions &amp; laws revised
Basic definitions &amp; laws revisedBasic definitions &amp; laws revised
Basic definitions &amp; laws revisedSyed Saeed
 
Read only memory(rom)
Read only memory(rom)Read only memory(rom)
Read only memory(rom)Syed Saeed
 
Quine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) methodQuine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) methodSyed Saeed
 
Time domain definition 6
Time domain definition 6Time domain definition 6
Time domain definition 6Syed Saeed
 
Time domain definition 6
Time domain definition 6Time domain definition 6
Time domain definition 6Syed Saeed
 
Analogous system 4
Analogous system 4Analogous system 4
Analogous system 4Syed Saeed
 
Block diagram representation 3
Block diagram representation 3Block diagram representation 3
Block diagram representation 3Syed Saeed
 

More from Syed Saeed (20)

Laplace transform of periodic functions
Laplace transform of periodic functionsLaplace transform of periodic functions
Laplace transform of periodic functions
 
Maximum power transfer theorem for ac network
Maximum power transfer theorem for ac networkMaximum power transfer theorem for ac network
Maximum power transfer theorem for ac network
 
Thevenin's theorem for ac network
Thevenin's theorem for ac network Thevenin's theorem for ac network
Thevenin's theorem for ac network
 
Tellegen's theorem
Tellegen's theoremTellegen's theorem
Tellegen's theorem
 
Millman's theorem
Millman's theoremMillman's theorem
Millman's theorem
 
Subsitution theorem
Subsitution theoremSubsitution theorem
Subsitution theorem
 
Max. power transfer theorem dc network (Revised)
Max. power transfer theorem dc network (Revised)Max. power transfer theorem dc network (Revised)
Max. power transfer theorem dc network (Revised)
 
Norton's theorem
Norton's theoremNorton's theorem
Norton's theorem
 
Circuit theory thevenin theorem
Circuit theory thevenin theoremCircuit theory thevenin theorem
Circuit theory thevenin theorem
 
Basic definitions &amp; laws revised
Basic definitions &amp; laws revisedBasic definitions &amp; laws revised
Basic definitions &amp; laws revised
 
Read only memory(rom)
Read only memory(rom)Read only memory(rom)
Read only memory(rom)
 
Prom
PromProm
Prom
 
FPGA
FPGAFPGA
FPGA
 
PAL
PALPAL
PAL
 
Quine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) methodQuine Mc Clusky (Tabular) method
Quine Mc Clusky (Tabular) method
 
Time domain definition 6
Time domain definition 6Time domain definition 6
Time domain definition 6
 
Time domain definition 6
Time domain definition 6Time domain definition 6
Time domain definition 6
 
Sfg 5
Sfg 5Sfg 5
Sfg 5
 
Analogous system 4
Analogous system 4Analogous system 4
Analogous system 4
 
Block diagram representation 3
Block diagram representation 3Block diagram representation 3
Block diagram representation 3
 

Recently uploaded

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 

Recently uploaded (20)

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 

Magnitude comparator

  • 2. MAGNITUDE COMPARATOR Syed Hasan Saeed, Integral University, Lucknow 2
  • 3. MAGNITUDE COMPARATOR: DIGITAL COMPARATOR • It is a combinational logic circuit. • Digital Comparator is used to compare the value of two binary digits. • There are two types of digital comparator (i) Identity Comparator (ii) Magnitude Comparator. • IDENTITY COMPARATOR: This comparator has only one output terminal for when A=B, either A=B=1 (High) or A=B=0 (Low) • MAGNITUDE COMPARATOR: This Comparator has three output terminals namely A>B, A=B, A<B. Depending on the result of comparison, one of these output will be high (1) • Block Diagram of Magnitude Comparator is shown in Fig. 1 Syed Hasan Saeed, Integral University, Lucknow 3
  • 4. BLOCK DIAGRAM OF MAGNITUDE COMPARATOR Syed Hasan Saeed, Integral University, Lucknow 4 n- Bit Digital Comparator A n-Bit B n-Bit A<B A=B A>B Fig. 1
  • 5. 1- Bit Magnitude Comparator: • This magnitude comparator has two inputs A and B and three outputs A<B, A=B and A>B. • This magnitude comparator compares the two numbers of single bits. • Truth Table of 1-Bit Comparator Syed Hasan Saeed, Integral University, Lucknow 5 INPUTS OUTPUTS A B Y1 (A<B) Y2 (A=B) Y3 (A>B) 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0
  • 6. K-Maps For All Three Outputs : Syed Hasan Saeed, Integral University, Lucknow 6 A B 0 1 0 1 0 0 0 1 B B A A BAY1  K-Map for Y1 : A<B
  • 7. K-Maps For All Three Outputs : Syed Hasan Saeed, Integral University, Lucknow 7 A B 0 1 0 1 0 0 0 1 B B A A BAY1  K-Map for Y1 : A<B A B 0 1 0 1 1 0 1 0 B B A A ABBAY2  K-Map for Y2 : A=B
  • 8. K-Maps For All Three Outputs : Syed Hasan Saeed, Integral University, Lucknow 8 A B 0 1 0 1 0 0 0 1 B B A A BAY1  K-Map for Y1 : A<B A B 0 1 0 1 1 0 1 0 B B A A ABBAY2  K-Map for Y2 : A=B A 0 1 0 1 0 1 0 BB A A B 0 BAY3  K-Map for Y2 : A>B
  • 9. Realization of One Bit Comparator Syed Hasan Saeed, Integral University, Lucknow 9 BA BAY1  A B AB BA ABBAY2  BAY3  BA  BA  BAY1  ABBAY2  BAY3 
  • 10. Realization of by Using AND , EX-NOR gates Syed Hasan Saeed, Integral University, Lucknow 10 BA BAY1  BA BAY2   BAY3  BA  A B
  • 11. 2-Bit Comparator: • A comparator which is used to compare two binary numbers each of two bits is called a 2-bit magnitude comparator. • Fig. 2 shows the block diagram of 2-Bit magnitude comparator. • It has four inputs and three outputs. • Inputs are A0 ,A1,B0 and B1 and Outputs are Y1, Y2 and Y3 Syed Hasan Saeed, Integral University, Lucknow 11 A0 A1 B1 B0 Y1 Y2 Y3 2-Bit Comparator Fig. 2 A B Input Output
  • 12. GREATER THAN (A>B) LESS THAN (A<B) Similarly, 1. If A1= B1=1 and A0= 0, B0=1, then A<B 2. If A1= B1= 0 and A0= 0, B0=1 then A<B Syed Hasan Saeed, Integral University, Lucknow 12 A1 A0 B1 B0 1 0 0 1 1 1 1 0 0 1 0 0 1. If A1= 1 and B1= 0 then A>B 2. If A1 and B1 are same, i.e A1=B1=1 or A1=B1=0 and A0=1, B0=0 then A>B
  • 13. INPUT OUTPUT A1 A0 B1 B0 Y1=A<B Y2=(A=B) Y3=A>B 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 1 1 1 0 0 0 1 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1 1 0 0 1 1 0 0 0 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 Syed Hasan Saeed, Integral University, Lucknow 13 TRUTH TABLE
  • 14. K-Map for A<B: K-Map for A=B: Syed Hasan Saeed, Integral University, Lucknow 14 0 1 1 1 0 0 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 00 01 00 01 11 10 11 10 00 01 11 10 00 01 11 10 A1A0 A1A0B1B0 B1B0 For A<B For A=B 010110011 BBABABAAY  01010101010101012 BBAABBAABBAABBAAY 
  • 15. K-Map For A>B Syed Hasan Saeed, Integral University, Lucknow 15 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 0 00 01 11 10 00 01 11 10 A1A0 B1B0 001110103 BAABABBAY 
  • 16. For A=B From K-Map Syed Hasan Saeed, Integral University, Lucknow 16 01010101010101012 BBAABBAABBAABBAAY  )B(A)BA(Y )BABA()BABA(Y )BABA(BA)BABA(BAY 00112 000011112 1111001111002   
  • 17. LOGIC DIAGRAM OF 2-BIT COMPARATOR: Syed Hasan Saeed, Integral University, Lucknow 17 A1 A0 B1 B0 A< B A=B A > B 001 BAA 11 BA 010 BBA 11 BA 001 BAA 010 BBA 11 BA  00 BA 
  • 18. THANK YOU Syed Hasan Saeed, Integral University, Lucknow 18