0% found this document useful (0 votes)
71 views15 pages

Building 4-Bit Magnitude Comparator Using 7485 IC - de Part 13

Uploaded by

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

Building 4-Bit Magnitude Comparator Using 7485 IC - de Part 13

Uploaded by

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

10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

 

Building 4-Bit Magnitude Comparator Using 7485 IC – DE Part


13

By Hai Prasaath K July 28, 2018

In a previous tutorial – Arithmetic Circuits, digital circuits for performing arithmetic operations were designed.
Like Arithmetic operations, comparison of numbers is also an important mathematical operation. From computing
perspective, the comparison of numbers plays vital role in decision making and logical operations. In digital
systems, the numbers are in the form of binary numbers. The comparison of two numbers determines whether one
number is greater than, equal, or less than the other number. A digital comparator is widely used in combinational
systems and is specially designed to compare the relative magnitudes of binary numbers.

For comparing two binary numbers, first their MSB (Most Significant Bits) are compared. If the MSB of one these
numbers is 1 while of other is 0, then it is greater than the other and the process of comparison ceases. If their
MSB are equal like both are 1 or 0, then the next significant bit is compared in both numbers. If the next significant
bit of one of these numbers is 1 while of other is 0, then it is greater than the other and the process of comparison
ceases there. Otherwise, it continues to less significant bits until it is determined which number is greater or both
numbers are found equal after comparing LSB (Least Significant Bit) of the numbers. So, if two numbers A and B
are compared then, the result of comparison is that either A > B, A < B or A = B.

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 1/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

In microcontrollers and microprocessors, digital comparators for comparison of binary numbers are in-built. A
digital comparator can be 4-bit, 8-bit, 16-bit, 32-bit or 64-bit system depending upon it compares 4-bit, 8-bit, 16-
bit, 32-bit or 64-bit numbers respectively. More than one comparator can also be connected in cascade
arrangement to perform comparison of long numbers. Like two 4-bit comparators can be cascaded for comparison
of 8-bit numbers. A comparator produces three outputs as L, E and G which corresponds to less than, equal and
greater than results.
 
There are also discrete ICs available for comparison of binary numbers. In this project SN7485 IC is used which is a
4-bit magnitude comparator. The two 4-bit numbers are input to the IC through a DC supply via 8 position DIP
switch. The result of the comparison is verified by connecting LEDs at the output pins of the IC.

Components Required –

Fig. 1: List of components required for making 7485 IC based 4-Bit Magnitude Comparator

Circuit Diagram –

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 2/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

 

Fig. 2: Circuit Diagram of SN-7485 IC based 4-Bit Magnitude Comparator

Circuit Connections –

For comparison of 4-bit numbers, SN7485 IC is used in this project. The IC is a 4-bit magnitude comparator which
can be used for comparison of straight binary numbers and BCD coded numbers. The 16-pin IC has the following
pin configuration –

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 3/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

 

Fig. 3: Table listing pin configuration of 7485 IC

The IC has the following pin diagram –

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 4/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

 

Fig. 4: Pin Diagram of 7485 4-Bit Magnitude Comparator IC

It can be noted that the SN7485 have additional input terminals that allow more individual comparators to be
“cascaded” together to compare words larger than 4-bits with magnitude comparators of “n”-bits being produced.
These cascading inputs are connected directly to the corresponding outputs of the previous comparator to
compare 8, 16 or even 32-bit words. In this project, simply two 4-bit numbers are compared, so there is no need f
cascading.

The input binary numbers are passed to the IC to the respective input pins via an 8-position DIP switch. The result
of comparison is verified by connecting LEDs at output pins 5, 6 and 7 of the IC.

Fig. 5: Prototype of SN7485 IC based 4-Bit Magnitude Comparator

How the circuit works –

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 5/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

The circuit is based on the working of the SN7485 IC. When the two numbers are input through the DIP switch
where switches are connected to regulated 5V DC supply, the IC performs comparison of the two 4-bit numbers
and depending upon the result of the comparison, one of the three output pins is set to HIGH. The LEDs are
connected at the output pins of the IC such that on HIGH output they start glowing. So, if number A is greater than
number B, the LED connected at pin 5 will start glowing. If both numbers are equal, the LED connected at pin 6 will
start glowing. If number A is less than number B, the LED connected at pin 7 will start glowing.
 
These type of digital comparators are used in the address decoding circuitry in computers and microprocessor
based devices to select a specific input/output device for the storage of data.

They are also used in control applications in which the binary numbers representing physical variables such as
temperature, position, etc. are compared with a reference value. Then the outputs from the comparator are used
to drive the actuators so as to make the physical variables closest to the set or reference value. Like the digital
comparators are used in applications like process controllers and servo motor control.

Testing the circuit –

The output of the circuit can be tested by passing different 4-bit binary numbers to the input pins of the 7485 IC.
On comparison of the two binary numbers, either of three output pins will be HIGH and the respective LED will
start glowing. The following observations were made on working with the 7485 IC

Fig. 6: Table listing output of 7485 IC based 4-Bit Magnitude Comparator


In the next tutorial, learn about more combinational circuits like multiplexers and encoders.

Circuit Diagrams

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 6/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

Circuit-Diagram-SN-7485-IC-based-4-Bit-Magnitude-Comparator

 

Filed Under: Digital Electronics, Tutorials

← Previous Article Next Article →

Questions related to this article?


Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.

Tell Us What You Think!!


You must be logged in to post a comment.

EXPAND YOUR KNOWLEDGE


AND STAY CONNECTED
Get the latest info on technologies, tools
and strategies for EE professionals.
https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 7/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

GET THE ENEWSLETTER

Search this website GO

 
Featured Products at

Switchcraft's panel connectors save


space and increase the number of
connectors that fit into a standard
rack
Learn more

Switchcraft/Conxall standard off-


the-shelf 2-meter overmolded
cables are designed for harsh
environment connectors
Learn more

Switchcraft's 15 Amp DC power


jacks and plugs offer a sturdy metal
coupling ring, so connections are
securely locked in
Learn more

Switchcraft’s high-quality, PCB


mount USB and RJ45 connectors
are ideal for low-to-high volume
production applications
Learn more

EE TECH TOOLBOX

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 8/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

 

Tech Toolbox: Power Efficiency


This Tech Toolbox tackles the perennial
challenge of maximizing power efficiency.
Explore innovative power conversion
topologies and processor power
management techniques shaping next-
generation electronics.

DOWNLOAD PDF

VIEW ALL TECH TOOLBOXES

EE LEARNING CENTER

BROWSE CLASSROOMS

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 9/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

BROWSE DESIGN GUIDES

 

EXPAND YOUR KNOWLEDGE


AND STAY CONNECTED
Get the latest info on technologies, tools
and strategies for EE professionals.

GET THE ENEWSLETTER

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our
engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those
questions asked and answered by your peers!

EDA BOARD

ELECTRO-TECH-ONLINE

EDABOARD.COM DISCUSSIONS

Which software is used today for logic synthesis? Any recommendation?


How can I explain the reason for the asymmetric radiation pattern (vivaldi)?
What low-cost sensor detects objects moving between 10kph and 170kph at a 2m range?
Most reliable/accurate way to measure charge pump current of single chip PLL
circular steel ring antenna

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 10/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

ELECTRO-TECH-ONLINE.COM DISCUSSIONS

Digital oscilloscope trace appears dim


Display TFT ST7789 (OshonSoft Basic).
Seeed XIAO SAMD21 to MOSFET 241028
Want to convert from 9v alkaline to solar rechargeable 
Fixing the 7-segment LED of Sony sound system

FEATURED SERIES -RPI PYTHON PROGRAMMING

RPi Python Programming 06: Python basics

RPi Python Programming 05: Introduction to Python

RPi Python programming 04: Setting up Raspberry Pi Linux computer

RPi Python Programming 03: Raspberry Pi as Linux System

RPI Python Programming 02: Raspberry Pi Models

RPi Python Programming 01: Introduction to Raspberry Pi 4

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 11/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

 
RECENT ARTICLES

How to design, simulate, and verify in Verilog using the AND-OR-NOT gates
How to design, simulate, and verify all digital gates in Verilog
How to compile, simulate, and verify a Verilog program using MAX+II
SiFive 128 GB board features SATA and PCIe interfaces
Navitas’ power IC draws under 10µA at startup with 500 W output

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 12/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

 

EE ENGINEERING TRAINING DAYS

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 13/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13

 

SUBMIT A GUEST POST

  

ANALOG IC TIPS

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 14/15
10/29/24, 4:58 PM Building 4-Bit Magnitude Comparator Using 7485 IC - DE Part 13
CONNECTOR TIPS

BATTERY POWER TIPS

DESIGNFAST

EDABOARD FORUMS

EE WORLD ONLINE

 ELECTRO-TECH-ONLINE FORUMS 
EV ENGINEERING

MICROCONTROLLER TIPS

POWER ELECTRONIC TIPS

SENSOR TIPS

TEST AND MEASUREMENT TIPS

5G TECHNOLOGY WORLD

SUBSCRIBE TO OUR NEWSLETTER

ABOUT US

CONTACT US

ADVERTISE

Copyright © 2024 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used,
except with the prior written permission of WTWH Media
Privacy Policy

https://www.engineersgarage.com/building-4-bit-magnitude-comparator-using-7485-ic-de-part-13/ 15/15

You might also like