SlideShare a Scribd company logo
3
Most read
4
Most read
5
Most read
2-Bit Comparator
Introduction 
• In this report it is clearly illustrated how to 
design a 2-bit comparator circuit. 
• It is also reported how we simplified the 
design to use the least number of ICs. 
• Design had been successfully tested by 
proteus simulation software. 
•The result is displayed on a 7- segment.
Problem Declaration 
• It is desired to design and implement a logic 
circuit that accepts two numbers each has two 
bits A0 A1 & B0 B1 and compare between them. 
• If A < B Print g (for greater). 
• If A > B Print L (for lower). 
• If A = B Print E (for equal). 
• The output should be displayed on a 7- segment.
Design 
• The first step to design any combinational circuit is constructing 
the truth table. 
A0 A1 
0 0 
0 0 
0 0 
0 0 
0 1 
0 1 
0 1 
0 1 
1 0 
1 0 
1 0 
1 0 
1 1 
1 1 
1 1 
1 1 
B0 B1 
0 0 
0 1 
1 0 
1 1 
0 0 
0 1 
1 0 
1 1 
0 0 
0 1 
1 0 
1 1 
0 0 
0 1 
1 0 
1 1 
g 
0 
0 
0 
0 
1 
0 
0 
0 
1 
1 
0 
0 
1 
1 
1 
0 
L 
0 
1 
1 
1 
0 
0 
1 
1 
0 
0 
0 
1 
0 
0 
0 
0 
E 
1 
0 
0 
0 
0 
1 
0 
0 
0 
0 
1 
0 
0 
0 
0 
1 
Q 
0 
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15
Design 
• Now we want to get the functions g , L and E . 
• So that we have to construct a 4x16 decoder. 
• But the available decoder ICs are 3x8 decoders. 
• The connection shown in fig1. is used to 
construct a 4x16 decoder by 2 ICs of 3x8 decoders. 
• Fig.1
Design 
• Minimum term algorithm is used to represent the 
desired logic functions designed in the truth table. 
• g = Q4 + Q8 + Q9 + Q12 + Q13 + Q14. 
• L = Q1 +Q2 + Q3 + Q6 +Q7 + Q11 
• E = Q0 + Q5 + Q10 + Q15 
• To implement those functions the decoder output 
corresponding to every functions must be applied to OR 
gates.
Design 
• But we should take in consideration that the outputs of 
the decoder are reversed . 
• DE Morgan theorem is used to solve this problem . 
B A B A F    
g Q Q Q Q Q Q 
4. 8. 9. 12. 13. 14 
 
L Q Q Q Q Q Q 
1. 2. 3. 6. 7. 11 
 
E Q Q Q Q 
0. 5. 10. 15 
 
• Now we can implement g , L &E by applying the corresponding 
decoder output of each function to NAND gates .
Display 
• A 7-segment is used for displaying the result. 
• The following table shows events at which every 
segment should light up. 
segment A B C D E F G 
events G 
E 
g g L 
G 
E 
L 
E 
L 
G 
E 
G 
E 
• According to this table every segment should be connected to 
an OR gate that collects its corresponding events. 
• OR gates are not available , so that we have to use NOR 
gates in addition to not gates .
Display 
• Instead of this ,a simplification of special kind can limit the 
usage of gates. 
• Let us consider that we are making a random experiment by 
inserting a random values of A0A1 & B0B1. 
• The output of the experiment is a signal g or L or E. 
• As shown in the figure sample space consists of three 
independent events , in another word there is no 
intersection between any two events. 
• This property is very useful as a simple 
simplification can be done using probability 
theorem and then we can convert the result into 
boolean expression. 
E 
L 
g 
Sample space
Display 
pins Boolean 
function 
Probability 
equivalent 
simplification Boolean 
equivalent 
E g  
a & g g + E 1 - L 
e L + E 1 - g 
d & f g+E+L 1 Vcc 
Sample space 
L 
E L  g 
g LE 
Sample space Sample space
Display 
• The following table shows the final 7-segment pins connection. 
pins a b c d e f g 
connection g g Vcc Vcc L L g 
• The result shows that the implementation of the function E is 
needless. 
• It is also obvious that the simplification step made us in rich of 
designing and implementing a driver circuit for the 7- segment 
display.
2-bit comparator

More Related Content

PPTX
2 bit comparator (Digital Electronics)
PPTX
Fault Detection Methods in Sequential System
DOCX
UNIT-III-DIGITAL SYSTEM DESIGN
PPTX
Chapter 4: Combinational Logic
PPT
DOMINO LOGIC CIRCUIT (VLSI)
PDF
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
PDF
Testing boolean difference
PDF
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
2 bit comparator (Digital Electronics)
Fault Detection Methods in Sequential System
UNIT-III-DIGITAL SYSTEM DESIGN
Chapter 4: Combinational Logic
DOMINO LOGIC CIRCUIT (VLSI)
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
Testing boolean difference
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...

What's hot (20)

PPTX
8051 microcontroller
PDF
Combinational circuits
PDF
Microprocessor-Based Automatic Door Opener
PPTX
Windowing techniques of fir filter design
PPTX
PPTX
Xilinx 4000 series
PPTX
Real Life Application of Digital Electronics
DOCX
301378156 design-of-sram-in-verilog
PDF
Mealy state machine
PPT
adder and subtractor
PPTX
module1:Introduction to digital electronics
PDF
8051 interfacing
PPT
Decimation in time and frequency
PDF
Compensators
PPT
multiplexers and demultiplexers
PDF
2019 5 testing and verification of vlsi design_fault_modeling
PDF
8155 PPI
PPTX
Traffic light controller
DOCX
Programmable logic array
PPTX
NONLINEAR CONTROL SYSTEM (Phase plane & Phase Trajectory Method)
8051 microcontroller
Combinational circuits
Microprocessor-Based Automatic Door Opener
Windowing techniques of fir filter design
Xilinx 4000 series
Real Life Application of Digital Electronics
301378156 design-of-sram-in-verilog
Mealy state machine
adder and subtractor
module1:Introduction to digital electronics
8051 interfacing
Decimation in time and frequency
Compensators
multiplexers and demultiplexers
2019 5 testing and verification of vlsi design_fault_modeling
8155 PPI
Traffic light controller
Programmable logic array
NONLINEAR CONTROL SYSTEM (Phase plane & Phase Trajectory Method)
Ad

Similar to 2-bit comparator (20)

PPSX
2-bit comparator
PPT
combinational-circuit (1).ppt
PPT
combinational circuits dispositivos .ppt
PPTX
combinational-circuit.pptx it tis creative study of digital electronics for ...
PPT
combinational-circuit (1).ppt
PPTX
Lecture 18 M - Copy.pptx
PPT
Logic System Design KTU Chapter-4.ppt
PPTX
combinational-circuit (1).pptx for all the digital electronics data
PPT
digital electr Chapter-4-Combinational ckt.ppt
PPT
combinational-circuit presenmtation .ppt
PPT
combinational-circuit.ppt
PPTX
Digital electronics as an emerging field.pptx
PPTX
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
PPT
Chapter+13.ppt
PDF
logic.deghjkl;jldddghbmedgygshedgyssfjfheueh
PDF
DLD Chapter-4.pdf
PPT
Unit 4 dica
PPT
3306565.ppt
PPT
Digital Logic & Design
PDF
Chapter-04.pdf
2-bit comparator
combinational-circuit (1).ppt
combinational circuits dispositivos .ppt
combinational-circuit.pptx it tis creative study of digital electronics for ...
combinational-circuit (1).ppt
Lecture 18 M - Copy.pptx
Logic System Design KTU Chapter-4.ppt
combinational-circuit (1).pptx for all the digital electronics data
digital electr Chapter-4-Combinational ckt.ppt
combinational-circuit presenmtation .ppt
combinational-circuit.ppt
Digital electronics as an emerging field.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
Chapter+13.ppt
logic.deghjkl;jldddghbmedgygshedgyssfjfheueh
DLD Chapter-4.pdf
Unit 4 dica
3306565.ppt
Digital Logic & Design
Chapter-04.pdf
Ad

Recently uploaded (20)

PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
web development for engineering and engineering
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
additive manufacturing of ss316l using mig welding
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
Sustainable Sites - Green Building Construction
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
PPT on Performance Review to get promotions
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
Lecture Notes Electrical Wiring System Components
DOCX
573137875-Attendance-Management-System-original
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
composite construction of structures.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
web development for engineering and engineering
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Embodied AI: Ushering in the Next Era of Intelligent Systems
additive manufacturing of ss316l using mig welding
Automation-in-Manufacturing-Chapter-Introduction.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Sustainable Sites - Green Building Construction
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPT on Performance Review to get promotions
UNIT-1 - COAL BASED THERMAL POWER PLANTS
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Lecture Notes Electrical Wiring System Components
573137875-Attendance-Management-System-original
bas. eng. economics group 4 presentation 1.pptx
composite construction of structures.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx

2-bit comparator

  • 2. Introduction • In this report it is clearly illustrated how to design a 2-bit comparator circuit. • It is also reported how we simplified the design to use the least number of ICs. • Design had been successfully tested by proteus simulation software. •The result is displayed on a 7- segment.
  • 3. Problem Declaration • It is desired to design and implement a logic circuit that accepts two numbers each has two bits A0 A1 & B0 B1 and compare between them. • If A < B Print g (for greater). • If A > B Print L (for lower). • If A = B Print E (for equal). • The output should be displayed on a 7- segment.
  • 4. Design • The first step to design any combinational circuit is constructing the truth table. A0 A1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 B0 B1 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 0 0 0 1 1 0 1 1 g 0 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 L 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 0 E 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Q 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
  • 5. Design • Now we want to get the functions g , L and E . • So that we have to construct a 4x16 decoder. • But the available decoder ICs are 3x8 decoders. • The connection shown in fig1. is used to construct a 4x16 decoder by 2 ICs of 3x8 decoders. • Fig.1
  • 6. Design • Minimum term algorithm is used to represent the desired logic functions designed in the truth table. • g = Q4 + Q8 + Q9 + Q12 + Q13 + Q14. • L = Q1 +Q2 + Q3 + Q6 +Q7 + Q11 • E = Q0 + Q5 + Q10 + Q15 • To implement those functions the decoder output corresponding to every functions must be applied to OR gates.
  • 7. Design • But we should take in consideration that the outputs of the decoder are reversed . • DE Morgan theorem is used to solve this problem . B A B A F    g Q Q Q Q Q Q 4. 8. 9. 12. 13. 14  L Q Q Q Q Q Q 1. 2. 3. 6. 7. 11  E Q Q Q Q 0. 5. 10. 15  • Now we can implement g , L &E by applying the corresponding decoder output of each function to NAND gates .
  • 8. Display • A 7-segment is used for displaying the result. • The following table shows events at which every segment should light up. segment A B C D E F G events G E g g L G E L E L G E G E • According to this table every segment should be connected to an OR gate that collects its corresponding events. • OR gates are not available , so that we have to use NOR gates in addition to not gates .
  • 9. Display • Instead of this ,a simplification of special kind can limit the usage of gates. • Let us consider that we are making a random experiment by inserting a random values of A0A1 & B0B1. • The output of the experiment is a signal g or L or E. • As shown in the figure sample space consists of three independent events , in another word there is no intersection between any two events. • This property is very useful as a simple simplification can be done using probability theorem and then we can convert the result into boolean expression. E L g Sample space
  • 10. Display pins Boolean function Probability equivalent simplification Boolean equivalent E g  a & g g + E 1 - L e L + E 1 - g d & f g+E+L 1 Vcc Sample space L E L  g g LE Sample space Sample space
  • 11. Display • The following table shows the final 7-segment pins connection. pins a b c d e f g connection g g Vcc Vcc L L g • The result shows that the implementation of the function E is needless. • It is also obvious that the simplification step made us in rich of designing and implementing a driver circuit for the 7- segment display.