Skip to main content

Study of IC 74LS85 as a Magnitude Comparator

 TITLE: Study of IC 74LS85 as a Magnitude Comparator

 AIM: Design and Implement 4 bit comparator.

 COMPONENTS REQUIRED :

 Digital Trainer Kit, IC 7485, Patch Cord ,+ 5V  Power Supply

THEORY:

COMPARATOR:                                                                                                                        Comparators can be designed for comparing multi-bit numbers. It receives two n-bit numbers A and B as inputs and outputs are A>B, A=B & A<B. Depending upon relative magnitude of two numbers, one of outputs will be HIGH.

The 4-bit comparators are available in MSI(7485) which compares straight binary & natural BCD codes. ICs can be cascaded to compare words of greater lengths without external gates. The A>B, A=B and A<B outputs of a stage handling less significant bits are connected to the corresponding A>B, A=B and A<B cascading inputs of the next stage handling more-significant bits. The stage handling the least-significant bits must have A=B input connected to logic 1 level and A>B and A<B inputs connected to logic 0 level.

TYPES OF COMPARATORS

·        1 Bit Comparator

·        2 Bit Comparator

·        4 Bit Comparator----------- up to n Bit Comparator

·        For comparison of binary numbers having more bits, cascading of ICs can be done.

·        But the IC generally used in the market is IC 74LS85 (4 Bit comparator)

 DIFFERENT COMPARATOR IC’s

 

IC no.

Description

Output

74LS85

4 Bit Magnitude Comparator

A>B / A=B / A<B

74HC/HCT688

8 Bit Identity Comparator

Only for A=B

SN54ALS688

8 Bit Identity Comparator

Only for A=B

 

IC74LS85

 The 74LS85 is a 4-Bit Magnitude Comparator which compares two4-bit words (A, B), each word having four Parallel Inputs (A0–A3, B0–B3); A3,B3 being the most significant inputs. Operation is not restricted to binary  codes, the device will work with any monotonic code. Three Outputs are provided: “A greater than B” (OA>B), “A less than B” (OA<B), “A equal to B”(OA=B). Three Expander Inputs, IA>B, IA<B, IA=B, allow cascading without  external gates. For proper compare operation, the Expander Inputs to the least significant position must be connected as follows: IA<B=IA>B=L, IA=B=H. For serial (ripple) expansion, the OA>B, OA<B and OA=B Outputs are connected respectively to the IA>B, IA<B and IA=B Inputs of the next most significant comparator,

 

Pin Diagram:

EXAMPLE – 1 BIT COMPARATOR –

A

B

A>B

A=B

A<B

0

0

0

1

0

0

1

0

0

1

1

0

1

0

0

1

1

0

1

0

 

In above truth table, 2 bits A and B are compared.

Explanation-

Case 1: A=0, B=0 and A=1, B=1

A=B is High.

Case 2: A=1, B=0

A>B is High.

Case 3: A=0, B=1

A<B is High.

 

TRUTH TABLE FOR 4 BIT COMPARATOR USING IC 74LS85-:

Comparing

 

Inputs

Cascading Inputs

Outputs

 

A>B

A=B

A<B

A>B

A=B

A<B

A>B

X

X

X

1

0

0

A<B

X

X

X

0

0

1

A=B

X

1

X

0

1

0

A=B

1

X

X

1

0

0

A=B

X

X

1

0

0

1


 ADVANTAGES OF COMPARATOR

1.     Easy designing of Circuit.

2. For decision making in electronic circuits, comparators are helpful.

 APPLICATIONS OF COMPARATOR

1.     Comparators are used in central processing units (CPUs) and microcontrollers (MCUs).

2.     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.

3.     Comparators are also used as process controllers and for Servo motor control.

4.     Used in password verification and biometric applications.                                                 

  Logic Diagram:


 

PROCEDURE:

1)     Design 4 bit comparator circuit as per requirement.

2)     Check all the components for their working.

3)     Give biasing to the IC.

4)     Make connections as shown in the diagram and observe output.

 

CONCLUSION:






 



Comments

Popular posts from this blog

Add, remove, search an item in listview in C#

Below is the C# code which will help you to add, remove and search operations on listview control in C#. Below is the design view of the project: Below is the source code of the project: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Treeview_control_demo {     public partial class Form2 : Form     {         public Form2()         {             InitializeComponent();             listView1.View = View.Details;                   }         private void button1_Click(object sender, EventArgs e)         {             if (textBox1.Text.Trim().Length == 0)...

display files and directories in Listview

Below is the C# code which displays all files and directories in listview control with their file size and creation date. If it is file then it also displays the extension of the file e.g. .txt, .jpg etc Below is the design view of the project: Listview to display files and directories with size and date created Below is the source code of the project: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.IO; namespace search_in_listview {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();                   }         private void button1_Click(object sender, EventArgs ...

Add worklog in Jira using Python

 Below is the Python code to add the worklog in Jira. You need to install a request library for this. Here is the code: import requests from requests.auth import HTTPBasicAuth import json url = "https://your jira address here/rest/api/2/issue/ticket_number/worklog" auth = HTTPBasicAuth("username", "jira access token") headers = {     "Accept": "application/json",     "Content-Type": "application/json" } payload = json.dumps({     "comment": {         "content": [             {                 "content": [                     {                         "text": "This is for QA Testing",                         "type": "text"                     } ...