SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Digital Logic circuit
Digital Logic circuitDigital Logic circuit
Digital Logic circuit
 
Decimal adder
Decimal adderDecimal adder
Decimal adder
 
Half Adder and Full Adder
Half Adder and Full AdderHalf Adder and Full Adder
Half Adder and Full Adder
 
decoder and encoder
 decoder and encoder decoder and encoder
decoder and encoder
 
MULTIPLEXER
MULTIPLEXERMULTIPLEXER
MULTIPLEXER
 
Latches and flip flop
Latches and flip flopLatches and flip flop
Latches and flip flop
 
Multiplexers
MultiplexersMultiplexers
Multiplexers
 
Sequential Logic Circuit
Sequential Logic CircuitSequential Logic Circuit
Sequential Logic Circuit
 
2 bit comparator (Digital Electronics)
2 bit comparator (Digital Electronics)2 bit comparator (Digital Electronics)
2 bit comparator (Digital Electronics)
 
latches
 latches latches
latches
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
Multiplexers and Demultiplexers
Multiplexers and DemultiplexersMultiplexers and Demultiplexers
Multiplexers and Demultiplexers
 
Logic gates presentation
Logic gates presentationLogic gates presentation
Logic gates presentation
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
BCD ADDER
BCD ADDER BCD ADDER
BCD ADDER
 
Logic gates ppt
Logic gates pptLogic gates ppt
Logic gates ppt
 
Half adder & full adder
Half adder & full adderHalf adder & full adder
Half adder & full adder
 
NAND and NOR implementation and Other two level implementation
NAND and NOR implementation and  Other two level implementationNAND and NOR implementation and  Other two level implementation
NAND and NOR implementation and Other two level implementation
 
Multiplexers & Demultiplexers
Multiplexers & DemultiplexersMultiplexers & Demultiplexers
Multiplexers & Demultiplexers
 

Ähnlich wie Magnitude comparator

magnitude comparator.pdf
magnitude comparator.pdfmagnitude comparator.pdf
magnitude comparator.pdf
ShayanRoy10
 
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
 

Ähnlich wie Magnitude comparator (19)

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
 
Subtractor
SubtractorSubtractor
Subtractor
 
Adder and Subtractor
Adder and SubtractorAdder and Subtractor
Adder and Subtractor
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & Decoder
 
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 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
 

Mehr von Syed Saeed

Time domain definition 6
Time domain definition 6Time domain definition 6
Time domain definition 6
Syed Saeed
 
Time domain definition 6
Time domain definition 6Time domain definition 6
Time domain definition 6
Syed Saeed
 

Mehr von 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
 
Binary multipliers
Binary multipliersBinary multipliers
Binary multipliers
 
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
 

Kürzlich hochgeladen

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
dharasingh5698
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
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...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 

Kürzlich hochgeladen (20)

KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
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
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
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...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 

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