0% found this document useful (0 votes)
284 views11 pages

5-Magnitude Comparator Drafting and Design

1. A magnitude comparator is a circuit that compares two binary numbers and determines if one number is equal to, less than, or greater than the other number. 2. A 4-bit magnitude comparator has eight inputs for two 4-bit binary numbers and three outputs indicating less than, equal to, or greater than conditions based on the input bit values. 3. Comparators are used in CPUs, microcontrollers, process controllers, servo motor control, password verification, and other applications to compare binary numbers representing physical variables.

Uploaded by

Jan Joson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
284 views11 pages

5-Magnitude Comparator Drafting and Design

1. A magnitude comparator is a circuit that compares two binary numbers and determines if one number is equal to, less than, or greater than the other number. 2. A 4-bit magnitude comparator has eight inputs for two 4-bit binary numbers and three outputs indicating less than, equal to, or greater than conditions based on the input bit values. 3. Comparators are used in CPUs, microcontrollers, process controllers, servo motor control, password verification, and other applications to compare binary numbers representing physical variables.

Uploaded by

Jan Joson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Magnitude Comparator

Drafting and Design


Dr. Nelson C. Rodelas, PCpE
Magnitude Comparator
• A magnitude digital Comparator is a combinational circuit that compares
two digital or binary numbers in order to find out whether one binary
number is equal, less than or greater than the other binary number. 
• We logically design a circuit for which we will have two inputs one for A
and other for B and have three output terminals, one for A > B condition,
one for A = B condition and one for A < B condition. 
4-Bit Magnitude Comparator
• A comparator used to compare two binary numbers each of four bits
is called a 4-bit magnitude comparator. It consists of eight inputs each
for two four bit numbers and three outputs to generate less than,
equal to and greater than between two binary numbers. 
• In a 4-bit comparator the condition of A>B can be possible in the
following four cases: 
1. If A3 = 1 and B3 = 0
2. If A3 = B3 and A2 = 1 and B2 = 0
3. If A3 = B3, A2 = B2 and A1 = 1 and B1 = 0
4. If A3 = B3, A2 = B2, A1 = B1 and A0 = 1 and B0 = 0
4-Bit Magnitude Comparator
• Similarly the condition for A<B can be possible in the following four
cases: 
1. If A3 = 0 and B3 = 1
2. If A3 = B3 and A2 = 0 and B2 = 1
3. If A3 = B3, A2 = B2 and A1 = 0 and B1 = 1
4. If A3 = B3, A2 = B2, A1 = B1 and A0 = 0 and B0 = 1
• The condition of A=B is possible only when all the individual bits of
one number exactly coincide with corresponding bits of another
number. 
Truth Table
Applications of Comparators
• Comparators are used in central processing units (CPUs) and
microcontrollers (MCUs).
• These are used in control applications in which the binary numbers
representing physical variables such as temperature, position, etc. are
compared with a reference value.
• Comparators are also used as process controllers and for Servo motor
control.
• Used in password verification and biometric applications.
74LS85 4-bit magnitude comparator
Pinout and Examples
• 74LS85 or SN54/7485 is a 4-bit magnitude comparator of two binary
format inputs.
• The IC 74LS85 is a magnitude comparator integrated circuit that can
be used to compare the binary data. 
• The 74LS85 can compare two 4-bit binary data and output can be
received from the output pins in the form of HIGH and LOW state. 
74LS85 Pin Configuration
74LS85 Pin Configuration
B3 Pin 1 Pin 1 will be used to give the input of data B (First Data = A, Second Data = B) to the IC. The MSB (Most Significant Bit) of 4-bit data B will be given at this pin.

IA < B Pin 2

IA = B Pin 3 Pin 2 – Pin 4 is the input pins. Those pins will be only used when we need to compare the data longer than the 4-bits. These pins will receive the values from the output
pins of the previous IC to compare the next bits. Pin 2 will receive the HIGH state in case of data B is greater than data A, Pin 3 will receive the HIGH state in case of data
A and B are equal and Pin 4 will receive the HIGH state when input B is less then A. At the same time only one pin will be HIGH others will be LOW.
I­A > B Pin 4

OA > B Pin 5 Pin 5 is an output pin. In the case of data, A is higher than data B the output state will be HIGH at pin 5.

OA = B Pin 6 Pin 6 is an output pin. In the case of data, A and B are equal the output state will be HIGH at pin 6.

OA < B Pin 7 Pin 7 is an output pin. In the case of data, A is less then data B the output state on pin 7 will be HIGH.

GND Pin 8 Pin 8 is a ground pin. It will use as the common ground with Power supply and other devices.

B0 Pin 9 Pin 9 will use to receive the LSB (Least Significant Bit) of the 4-bit input data B.

A0 Pin 10 Pin 10 is an input pin. It will use to receive the LSB of the 4-bit input data A.

B1 Pin 11 Pin 11 will be used as the input pin. It will receive the second LSB of 4-bit input data B.

A1 Pin 12 Pin 12 will be used as the input pin for data A. It will receive the second LSB of 4-bit input data A.

A2 Pin 13 Pin 13 will be used to receive the second bit of 4-bit input data A.

B2 Pin 14 Pin 14 will be used to receive the second bit of 4-bit input data B.

A3 Pin 15 Pin 15 will be used to receive the MSB of 4-bit input data A.

VCC Pin 16 Pin 16 will be used to give the power to the IC to make it functional.
Multisim Circuit
Activity
• Create 4-bit Comparator that will display the number inputted using
the 7-segment display and display the output “L” for less than, “G” for
greater than, and “E” for equal using 7-segment display.

You might also like