Professional Documents
Culture Documents
CM305
CM305
CM305
ANDHRAPRADESH
Name : A. PADMAVATHI
Designation : Head of ECE Section
Branch : Electronics & Comm. Engg.
Institute : Govt. Polytechnic for women, Guntur
Year/ Semester : III
Subject : Digital Electronics
Subject Code : CM-305
Topic : Logic gates & Boolean Algebra
Duration : 100 mts.
Sub topic : Comparator
Teaching aids : Diagrams
CM305.19 to 20 1
Objectives
• Working of 7485 IC
CM305.19 to 20 2
What is digital comparator?
• A digital comparator is a combinational logic circuit that
compares two numbers in binary form and generates a
one or a zero at its output depending on whether they
are the same or not
CM305.19 to 20 3
What is digital comparator?
CM305.19 to 20 4
EX-NOR can used as 1-Bit Equality Comparator
A B Y
A
Y
0 0 1
B
0 1 0
Fig 19.1 1 0 0
1 1 1
Table19.1
CM305.19 to 20 5
4-Bit Equality Comparator
A0 C0
B0
A1 C1
B1 A_EQ_B
A2
B2 C2
A3
B3 C3
Fig 19.2
• Explore dissimilarity
x y
CM305.19 to 20 8
4-Bit Magnitude (digital) Comparator
x3 y3 x2 y2 x1 y1 x0 y0
G 4 G G 2 G G
3 1 0
gt G in=0
eq 1-bit comp 1-bit comp 1-bit comp 1-bit comp
lt L in=0
L4 L3 L2 L1 L0
Fig 19.4
X Y
1101 0110 gt = 1
1110 1011
1011 1011 eq = 1
0101 0111
lt = 1
1010 1011
CM305.19 to 20 9
Logic circuit of 4-bit digital comparator
A3’B3
A3
x3
A3 B3’
B3
A3’B3 + x3A2’B2 +
A2 x2 x3x2A1’B1 +
B2
x3x2x1A0’B0
(A<B)
A1
x1
B1
A3B3’ + x3A2B2’ +
x3x2A1B1’ +
A0 x3x2x1A0B0’
x0 (A>B)
B0
(A=B)
Fig 19.5 x3x2x1x0
CM305.19 to 20 10
Block diagram of 4-bit magnitude comparator
0 A3
1 A2
1 A1
0 A0 4-bit
Comp
A<B 1
1 A3 A>B 0
0 A2 A=B 0
1 A1
0 A0
Fig 19.6
CM305.19 to 20 11
7485 IC - Magnitude comparator
CM305.19 to 20 12
Fig 19.7
CM305.19 to 20 13
The magnitude comparator has four lines for input A, four
lines for input B and three output lines that indicate whether
CM305.19 to 20 14
Table 19.2
CM305.19 to 20 15
7485
Fig 19.8
CM305.19 to 20 16
Summary
• A digital comparator is a combinational logic circuit that
compares two binary numbers
CM305.19 to 20 17
Quiz
1. NAND
3. NOR
5. EX-NOR
7. AND
CM305.19 to 20 18
A equality comparator has outputs
1. A<B
3. A>B
5. A=B
CM305.19 to 20 19
A magnitude comparator has outputs
1. Less than
3. Equal
5. Greater than
CM305.19 to 20 20
Which of the following IC is a magnitude comparator?
1. 7440
3. 7432
5. 7485
7. 7400
CM305.19 to 20 21
7485 is a
CM305.19 to 20 22
Frequently asked questions in Exam
CM305.19 to 20 23
Assignment
CM305.19 to 20 24