SlideShare a Scribd company logo
1 of 18
MAGNITUDE COMPARATOR
1
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) orA=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
BLOCK DIAGRAM OF MAGNITUDE COMPARATOR
n- Bit Digital Comparator
A
n-Bit
3
B
n-Bit
A<B A=B A>B
Fig. 1
4
1- Bit Magnitude Comparator:
• This magnitude comparator has two inputs A and B andthree
outputs A<B, A=B andA>B.
• This magnitude comparator compares the two numbers of single
bits.
• Truth Table of 1-Bit Comparator
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:
0 1
0 0
B B
0 1
B
A
A 0
A 1
K-Map for Y1 :A<B
Y1 AB
5
K-Maps For All Three Outputs:
0 1
0 0A 1
B B
0 1
B
A
A 0
Y1 AB
K-Map forY1 :A<B
1 0
0 1A 1
B B
0 1
B
A
A 0
2Y  ABAB
K-Map for Y2 :A=B
6
K-Maps For All Three Outputs:
0 1
0 0A 1
B B
0 1
B
A
A 0
1Y  AB
K-Map forY1 :A<B
1 0
0 1A 1
B B
0 1
B
A
A 0
K-Map for Y2 :A=B
Y2  ABAB
A
B
A 0
B B
0 1
0 0
1 0A 1
Y3 AB
7
K-Map for Y2 :A>B
Realization of One Bit Comparator
Y1 A  B
A
B AB
AB
Y2  A B AB
A  B
AB
Y3 AB
A  B
Y1 AB
Y2  AB AB
Y3 AB
8
Realization of by Using AND , EX-NORgates
AB
1Y  A B
Y2  A B
A  B
Y3 AB
A  B
9
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
A0
A1
B1
B0
Y1
2-Bit Comparator Y2
Y3
Output Fig. 2
A
10
B
Input
11
GREATER THAN (A>B)
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
thenA>B
LESS THAN (A<B)
Similarly,
1. If A1= B1=1 and A0= 0, B0=1, thenA<B
2. If A1= B1= 0 and A0= 0, B0=1 thenA<B
A1 A0 B1 B0
1 0 0 1
1 1 1 0
0 1 0 0
12
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
TRUTH TABLE
K-Map for A<B: K-Map forA=B:
01 11 10
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
A A 00 01 111 0
00
01
11
10
10
00
01
11
10
A A1 0
B1B0
B B1 0
00
ForA<B
Y1 A1 A0 B0  A1 B1  A0 B1 B0
ForA=B
Y2  A1 A0 B1 B0  A1 A0 B1 B0  A1A0B1B0  A1 A0 B1 B0
13
K-Map For A>B
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
Y3 A0 B1 B0  A1 B1  A1A0 B0
14
For A=B From K-Map
Y2  A1 A0 B1 B0  A1 A0 B1 B0  A1A0B1B0  A1 A0 B1 B0
Y2  A0 B0 (A1 B1  A1B1 )  A0B0 (A1 B1 A1B1 )
Y2  (A1 B1 A1B1) (A0 B0  A0B0 )
Y2  (A1  B1 )(A0  B0 )
15
LOGIC DIAGRAM OF 2-BIT COMPARATOR:
A1 A0 B1 B0
A< B
A=B
A > B
A1 A0 B0
A1 B1
A1 B1
A1 A0 B0
A0 B1 B0
A1  B1
A0  B0
A0 B1 B0
16
Comparators
The function of a comparator is to compare the magnitudes of two
binary numbers to determine the relationship between them. In the
simplest form, a comparator can test for equality using XNOR gates.
How could you test two 4-bit numbers for equality?
AND the outputs of four XNOR gates.
A1
B1
A2
B2
A3
B3
A4
B4
Output
Comparators
IC comparators provide outputs to indicate which of the numbers is
larger or if they are equal. The bits are numbered starting at 0, rather
than 1 as in the case of adders. Cascading inputs are provided to
expand the comparator to larger numbers.
Outputs
A1
A0
A2
A3
B1
B0
B2
B3
Cascading
inputs
COMP
A = B
A < B
A > B
A = B
A < B
A > B
0
0
3
3
A
A
The IC shown is the
4-bit 74LS85.

More Related Content

What's hot

combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).pptThanmayiKumar
 
Half adder and full adder
Half adder and full adderHalf adder and full adder
Half adder and full adderSanjuktaBanik
 
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...Arti Parab Academics
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuitsSARITHA REDDY
 
Booths Multiplication Algorithm
Booths Multiplication AlgorithmBooths Multiplication Algorithm
Booths Multiplication Algorithmknightnick
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsVinoth Loganathan
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoderAbid Ali
 
Adder substracter
Adder substracterAdder substracter
Adder substracterWanNurdiana
 
Logical micro-operations
Logical micro-operationsLogical micro-operations
Logical micro-operationsVATSAL TRIVEDI
 
Presentation On Logic Gate
Presentation On Logic Gate Presentation On Logic Gate
Presentation On Logic Gate Nazrul Islam
 
Chapter 4. logic function and boolean algebra
Chapter 4. logic function and boolean algebraChapter 4. logic function and boolean algebra
Chapter 4. logic function and boolean algebraAshish KC
 
30. 8086 microprocessor pipelined architecture
30. 8086 microprocessor pipelined architecture30. 8086 microprocessor pipelined architecture
30. 8086 microprocessor pipelined architecturesandip das
 

What's hot (20)

combinational-circuit (1).ppt
combinational-circuit (1).pptcombinational-circuit (1).ppt
combinational-circuit (1).ppt
 
Basic logic gates
Basic logic gatesBasic logic gates
Basic logic gates
 
Parallel Adder
Parallel Adder Parallel Adder
Parallel Adder
 
Half adder and full adder
Half adder and full adderHalf adder and full adder
Half adder and full adder
 
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
FYBSC IT Digital Electronics Unit IV Chapter I Multiplexer, Demultiplexer, AL...
 
Combinational circuits
Combinational circuitsCombinational circuits
Combinational circuits
 
Booths Multiplication Algorithm
Booths Multiplication AlgorithmBooths Multiplication Algorithm
Booths Multiplication Algorithm
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Half adder and full adder
Half adder and full adderHalf adder and full adder
Half adder and full adder
 
Sequential circuits in Digital Electronics
Sequential circuits in Digital ElectronicsSequential circuits in Digital Electronics
Sequential circuits in Digital Electronics
 
Encoder and decoder
Encoder and decoderEncoder and decoder
Encoder and decoder
 
Adder substracter
Adder substracterAdder substracter
Adder substracter
 
Combinational circuit
Combinational circuitCombinational circuit
Combinational circuit
 
Logical micro-operations
Logical micro-operationsLogical micro-operations
Logical micro-operations
 
Binary adder
Binary adderBinary adder
Binary adder
 
Logic gate
Logic gateLogic gate
Logic gate
 
Presentation On Logic Gate
Presentation On Logic Gate Presentation On Logic Gate
Presentation On Logic Gate
 
Adders
AddersAdders
Adders
 
Chapter 4. logic function and boolean algebra
Chapter 4. logic function and boolean algebraChapter 4. logic function and boolean algebra
Chapter 4. logic function and boolean algebra
 
30. 8086 microprocessor pipelined architecture
30. 8086 microprocessor pipelined architecture30. 8086 microprocessor pipelined architecture
30. 8086 microprocessor pipelined architecture
 

Similar to 6 2 magnitudecomparator ibit and 2 bit converted

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
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9wajanga
 
Magnitude Comparator and types of MC
Magnitude Comparator and types of MCMagnitude Comparator and types of MC
Magnitude Comparator and types of MCEasy n Inspire L
 
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
 
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-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfUnit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfGafryMahmoud
 
Combinational circuit (7-Segment display)
Combinational circuit (7-Segment display)Combinational circuit (7-Segment display)
Combinational circuit (7-Segment display)ali9753
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logicDeepak John
 
Comparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.pptComparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.pptHardikGupta400524
 
18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptx18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptxtakix43466
 
07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptx07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptxElisée Ndjabu
 
Adder and Subtractor
Adder and SubtractorAdder and Subtractor
Adder and SubtractorJaydeep Kale
 
UNIT - II.pptx
UNIT - II.pptxUNIT - II.pptx
UNIT - II.pptxamudhak10
 
Unit 4 combinational circuit
Unit 4 combinational circuitUnit 4 combinational circuit
Unit 4 combinational circuitKalai Selvi
 

Similar to 6 2 magnitudecomparator ibit and 2 bit converted (20)

COA(Unit_3.pptx)
COA(Unit_3.pptx)COA(Unit_3.pptx)
COA(Unit_3.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
 
IS 151 Lecture 9
IS 151 Lecture 9IS 151 Lecture 9
IS 151 Lecture 9
 
Magnitude Comparator and types of MC
Magnitude Comparator and types of MCMagnitude Comparator and types of MC
Magnitude Comparator and types of MC
 
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
 
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
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
Digital 4-bit Comprator
Digital 4-bit CompratorDigital 4-bit Comprator
Digital 4-bit Comprator
 
Unit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdfUnit-8-Computer-Arithmetic.pdf
Unit-8-Computer-Arithmetic.pdf
 
Combinational circuit (7-Segment display)
Combinational circuit (7-Segment display)Combinational circuit (7-Segment display)
Combinational circuit (7-Segment display)
 
DLD Chapter-4.pdf
DLD Chapter-4.pdfDLD Chapter-4.pdf
DLD Chapter-4.pdf
 
Lesson Week 1-2.pptx
Lesson Week 1-2.pptxLesson Week 1-2.pptx
Lesson Week 1-2.pptx
 
Combinational and sequential logic
Combinational and sequential logicCombinational and sequential logic
Combinational and sequential logic
 
Comparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.pptComparators_and_Code_Convertersv.pptx.ppt
Comparators_and_Code_Convertersv.pptx.ppt
 
18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptx18CSC203J_COA_Unit 2 final.pptx
18CSC203J_COA_Unit 2 final.pptx
 
07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptx07_arithmeticcircuits digital electronics.pptx
07_arithmeticcircuits digital electronics.pptx
 
Adder and Subtractor
Adder and SubtractorAdder and Subtractor
Adder and Subtractor
 
computer arithmatic
computer arithmaticcomputer arithmatic
computer arithmatic
 
UNIT - II.pptx
UNIT - II.pptxUNIT - II.pptx
UNIT - II.pptx
 
Unit 4 combinational circuit
Unit 4 combinational circuitUnit 4 combinational circuit
Unit 4 combinational circuit
 

Recently uploaded

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacingjaychoudhary37
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
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
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
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
 
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
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
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
 

Recently uploaded (20)

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
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
microprocessor 8085 and its interfacing
microprocessor 8085  and its interfacingmicroprocessor 8085  and its interfacing
microprocessor 8085 and its interfacing
 
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
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
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
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
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
 
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
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
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
 

6 2 magnitudecomparator ibit and 2 bit converted

  • 2. 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) orA=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
  • 3. BLOCK DIAGRAM OF MAGNITUDE COMPARATOR n- Bit Digital Comparator A n-Bit 3 B n-Bit A<B A=B A>B Fig. 1
  • 4. 4 1- Bit Magnitude Comparator: • This magnitude comparator has two inputs A and B andthree outputs A<B, A=B andA>B. • This magnitude comparator compares the two numbers of single bits. • Truth Table of 1-Bit Comparator 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
  • 5. K-Maps For All Three Outputs: 0 1 0 0 B B 0 1 B A A 0 A 1 K-Map for Y1 :A<B Y1 AB 5
  • 6. K-Maps For All Three Outputs: 0 1 0 0A 1 B B 0 1 B A A 0 Y1 AB K-Map forY1 :A<B 1 0 0 1A 1 B B 0 1 B A A 0 2Y  ABAB K-Map for Y2 :A=B 6
  • 7. K-Maps For All Three Outputs: 0 1 0 0A 1 B B 0 1 B A A 0 1Y  AB K-Map forY1 :A<B 1 0 0 1A 1 B B 0 1 B A A 0 K-Map for Y2 :A=B Y2  ABAB A B A 0 B B 0 1 0 0 1 0A 1 Y3 AB 7 K-Map for Y2 :A>B
  • 8. Realization of One Bit Comparator Y1 A  B A B AB AB Y2  A B AB A  B AB Y3 AB A  B Y1 AB Y2  AB AB Y3 AB 8
  • 9. Realization of by Using AND , EX-NORgates AB 1Y  A B Y2  A B A  B Y3 AB A  B 9 A B
  • 10. 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 A0 A1 B1 B0 Y1 2-Bit Comparator Y2 Y3 Output Fig. 2 A 10 B Input
  • 11. 11 GREATER THAN (A>B) 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 thenA>B LESS THAN (A<B) Similarly, 1. If A1= B1=1 and A0= 0, B0=1, thenA<B 2. If A1= B1= 0 and A0= 0, B0=1 thenA<B A1 A0 B1 B0 1 0 0 1 1 1 1 0 0 1 0 0
  • 12. 12 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 TRUTH TABLE
  • 13. K-Map for A<B: K-Map forA=B: 01 11 10 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 A A 00 01 111 0 00 01 11 10 10 00 01 11 10 A A1 0 B1B0 B B1 0 00 ForA<B Y1 A1 A0 B0  A1 B1  A0 B1 B0 ForA=B Y2  A1 A0 B1 B0  A1 A0 B1 B0  A1A0B1B0  A1 A0 B1 B0 13
  • 14. K-Map For A>B 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 Y3 A0 B1 B0  A1 B1  A1A0 B0 14
  • 15. For A=B From K-Map Y2  A1 A0 B1 B0  A1 A0 B1 B0  A1A0B1B0  A1 A0 B1 B0 Y2  A0 B0 (A1 B1  A1B1 )  A0B0 (A1 B1 A1B1 ) Y2  (A1 B1 A1B1) (A0 B0  A0B0 ) Y2  (A1  B1 )(A0  B0 ) 15
  • 16. LOGIC DIAGRAM OF 2-BIT COMPARATOR: A1 A0 B1 B0 A< B A=B A > B A1 A0 B0 A1 B1 A1 B1 A1 A0 B0 A0 B1 B0 A1  B1 A0  B0 A0 B1 B0 16
  • 17. Comparators The function of a comparator is to compare the magnitudes of two binary numbers to determine the relationship between them. In the simplest form, a comparator can test for equality using XNOR gates. How could you test two 4-bit numbers for equality? AND the outputs of four XNOR gates. A1 B1 A2 B2 A3 B3 A4 B4 Output
  • 18. Comparators IC comparators provide outputs to indicate which of the numbers is larger or if they are equal. The bits are numbered starting at 0, rather than 1 as in the case of adders. Cascading inputs are provided to expand the comparator to larger numbers. Outputs A1 A0 A2 A3 B1 B0 B2 B3 Cascading inputs COMP A = B A < B A > B A = B A < B A > B 0 0 3 3 A A The IC shown is the 4-bit 74LS85.