Professional Documents
Culture Documents
Chapter 3 - P2 - MSI Lgic Circuit (Comparator)
Chapter 3 - P2 - MSI Lgic Circuit (Comparator)
Chapter 3 - P2 - MSI Lgic Circuit (Comparator)
Lecture:
DIGITAL SYSTEMS
Chapter 5: Part 2
MSI Logic Circuits (Comparators)
1
HCMC University of Technology and Education
Faculty of Electrical & Electronic Engineering Comparators
Magnitude Comparator is used to compare two bit groups of input
Assume that we like to compare between Group A (1 bit) and
Group B (1 bit) as shown in Table, so there are 3 cases for
outputs (equal, smaller and bigger). We have 3 outputs, so we
need to determine 3 expressions for drawing logic circuit
Input Output
A B A=B A<B A>B
O A B A B
0 0 1 0 0
O A B AB
0 1 0 1 0
1 0 0 0 1 O A B A B
1 1 1 0 0
2
Assoc. Prof. Nguyen Thanh Hai, PhD
HCMC University of Technology and Education
Faculty of Electrical & Electronic Engineering Comparators
From the expressions, we can draw the logic circuit, in which 2
inputs, called Group A (1 bit) and Group B (1 bit), so there are 3
cases for outputs (equal, smaller and bigger) as circuit shown
bellow, we are easy to check.
O A B A B
O A B A B
O A B AB
3
Assoc. Prof. Nguyen Thanh Hai, PhD
HCMC University of Technology and Education
Faculty of Electrical & Electronic Engineering Comparators
In case of many bits in each group, we can compare between
magnitudes of 2 groups, meaning comparing between binary bits
based (MSB/LSB)
We can check with IC 74HC85 having Group A (4 bits) and
Group B (4 bits)
Data inputs
A3A 2A1A 0 B3B2B1B0
I A B
Cascading 74HC85
4 bit
inputs I A B magnitude
I comparator
AB
O A B O AB O A B
Outputs 4
Assoc. Prof. Nguyen Thanh Hai, PhD
HCMC University of Technology and Education
Faculty of Electrical & Electronic Engineering Comparators
5
Assoc. Prof.
Nguyen ThanhNguyen
Hai, PhD
Thanh Hai, PhD
HCMC University of Technology and Education
Faculty of Electrical & Electronic Engineering Comparators
The circuit is designed using 2 IC 74HC85 for magnitude
comparator, in which Group A (8 bit) and Group B (8 bit) are
compared together
Low
bits
-order High
- order bits
A3 A 2 A1 A 0 B3 B2 B1 B0 A3 A 2 A1 A 0 B3 B2 B1 B0
I A B 74HC85 74HC85
4 bit 4 bit
I A B magnitude
I magnitude
AB comparator comparator
5 V
O A B O AB O A B O A B O AB O A B
Outputs 8- bit comparison Outputs
6
Assoc. Prof. Nguyen Thanh Hai, PhD
HCMC University of Technology and Education
Faculty of Electrical & Electronic Engineering Comparators
7
Assoc. Prof.
Nguyen ThanhNguyen
Hai, PhD
Thanh Hai, PhD
HCMC University of Technology and Education
Faculty of Electrical & Electronic Engineering Comparators
8
Assoc. Prof. Nguyen Thanh Hai, PhD
HCMC University of Technology and Education
Faculty of Electrical & Electronic Engineering Comparators
The End
9
Assoc. Prof. Nguyen Thanh Hai, PhD