Chapter 3 - P2 - MSI Lgic Circuit (Comparator)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

HCMC University of Technology and Education

Faculty of Electrical & Electronic Engineering

Lecture:
DIGITAL SYSTEMS
Chapter 5: Part 2
MSI Logic Circuits (Comparators)

Assoc. Prof. Nguyen Thanh Hai, PhD

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
 AB

O A B O AB O A B

Outputs 4
Assoc. Prof. Nguyen Thanh Hai, PhD
HCMC University of Technology and Education
Faculty of Electrical & Electronic Engineering Comparators

Comparing Input Cascading Input Output


A3,B3 A2,B2 A1,B1 A0,B0 A>B A<B A=B A>B A<B A=B
A3>B3 X X X X X X H L L
A3<B3 X X X X X X L H L
A3 =B3 A2>B2 X X X X X H L L
A3 =B3 A2<B2 X X X X X L H L
A3 =B3 A2=B2 A1>B1 X X X X H L L
A3 =B3 A2=B2 A1<B1 X X X X L H L
A3 =B3 A2=B2 A1=B1 A0>B0 X X X H L L
A3 =B3 A2=B2 A1=B1 A0<B0 X X X L H L
A3 =B3 A2=B2 A1=B1 A0=B0 H L L H L L
A3 =B3 A2=B2 A1=B1 A0=B0 L H L L H L
A3 =B3 A2=B2 A1=B1 A0=B0 X X H L L H
A3 =B3 A2=B2 A1=B1 A0=B0 L L L H H L
A3 =B3 A2=B2 A1=B1 A0=B0 H H L L L L

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
 AB comparator comparator
5 V

O A B O AB O A B O A B O AB 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

Example: According to the above figure

7
Assoc. Prof.
Nguyen ThanhNguyen
Hai, PhD
Thanh Hai, PhD
HCMC University of Technology and Education
Faculty of Electrical & Electronic Engineering Comparators

Example: According to the above figure

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

You might also like