What is the magnitude comparator circuit? Design a 3 bit magnitude comparator circuit

magnitude comparator

What is the magnitude comparator circuit?

In this article you will get the idea of  what is the magnitude comparator circuit? A combinational circuit which compares two binary or digital numbers to find out whether the binary number is equal, greater than, less than the other binary number is called Magnitude Comparator Circuit. In this circuit we have 2 inputs A and B. There are 3 outputs available:

A=B

A>B

A<B

These comparators are used in Microcontrollers and CPU’S to perform data comparison, register and arithmetic operations. They are used in many devices. Every automatic device is based on magnitude comparators. Without magnitude comparator the automatic devices are useless. Comparators are the basics for working of the automatic devices. In these circuits different gates are used to perform the specific actions. There are different kinds of gates used in comparators. In our daily life magnitude comparators are used in different devices and different things. They are the main thing in working of automatic devices. In comparators there are inputs which comparator or process these inputs on the basis of information given to the comparator. There could be 2 or more inputs.

Block diagram of magnitude comparator circuit

The basic diagram of magnitude comparators is given below:

magnitude comparator
magnitude comparator

Types of Magnitude Comparators:

  1. 1-bit magnitude comparator
  2. 2-bit magnitude comparator
  3. 3-bit magnitude comparator
  4. 4-bit magnitude comparator
  5. 8-bit magnitude comparator

3-BIT MAGNITUDE COMPARATOR:

A comparator which compare 2 binary numbers having 3-bits and produce the resultant of  3 outputs on the basis of magnitude of given binary numbers is called 3-bit magnitude comparator. 3-input magnitude comparator is more effective than the 2-in magnitude comparator while it is less effective than the 4-bit and 6-bit magnitude. 3-bit magnitude comparator gives expression which is less complex than the 2-bit magnitude while this expression is complex in the cases of 4-bir and 6-bit and so on.

Also check

How to Design a 4 bit Magnitude Comparator Circuit? Explanation with examples

Block diagram of 3-magnitude comparator circuit

The diagram for 3-input magnitude comparator is given below:

3-bit magnitude comparator
3-bit magnitude comparator

Equations:

The equations for 3-bit magnitude comparator are given below:

The equal functions are :

                                            Ao = Bo 

Then:

A=B=(Ao’Bo’+AoBo)(A1’B1’+A1B1)(A2’B2’+A2B2)

The output is:

                                  A<B

In the cases of : 

                               A2<B2

A2=B2 then A1<B1

A2=B2, A1=B1 then Ao<Bo

A<B=A2’B2+[(A2’B2’+A2B2)*A1’B1]+[(A2’B2’+A2B2)*[(A1’B’+A1B1)*Ao’Bo]

The output is A>B.

In the case of:

                            A2>B2

A2=B2 then A1>B:

A2=B2, A1=B1 then Ao>Bo

A>B=A2B2’++[(A2’B2’+A2B2)*A1B1’]++[(A2’B2’+A2B2)*[(A1’B’+A1B1)*AoBo’]

TRUTH TABLE:

The truth table of 3-input magnitude comparator is given below:

truth table of magnitude comparator
truth table of magnitude comparator

K-MAP FOR 3-INPUT COMPARATOR: (A, B, C)

The table for min terms of 3-input comparator k-map is given below:

k-map for comparator
k-map for comparator

There are 3 inputs A, B, C which will also return in the form of 3 outputs. There are 8 min terms available in this starting from Mo to M7. By using the k-map we can easily design or form truth tables for comparators. The technique of k-map is very easy and simple. There is very less error in k-map method as compared to the Boolean Laws. In his method there is no need of remembering the every rule of Boolean Laws. There are very few steps in this technique to find the expression for our given information.

This technique always results in simple, minimum and easy expression which the user can easily understand and can easily solve it. This technique is only efficient when the method is carried out very precisely. If there is some mistake by the user the resultant expression will not be correct and there could be errors in this expression. So it is very important to carry out the method very carefully and precisely.

When the variables are increased the k-map simplification becomes more complicated. From this we found out that the k-map simplification is only useful when the input variables are only from 3 to 6 variables. Other than that the k-map simplification will result in the form of wrong expression and there will be difficult for the user to understand and solve the expression.

EXAMPLES:

Examples of 3-bit magnitude comparator are given below:

Here F shows the function while A, B, C are the inputs of the function.

EXAMPLE#1

comparator k-map
comparator k-map

The resulting expression is in the form of B compliment multiply by C and + with inputs A and B.

F=B’C+AB 

EXAMPLE #2:  

comparator example
comparator example

The result is B compliment multiply by C and + by A

                   F=B’C+AB+AB’

                   F=B’C+A (B+B’)

                   F=B’C+A

These are the very good examples of 3-bit magnitude comparators. The resultant expression depends upon how we combine the terms. If we combine the terms vertically the result is different while in case of horizontal combination the result is different than the vertical combination. In each example the method of combining the bits is different than other. In every combination we get an equation of that example. We combine the bits 2 by 2. In some cases we also combine 4 bits. Combining 2-bits gives us a complex equation. While combining 4-bits gives us the less complex equation. We can combine them vertically but also horizontally. It depends on our easiness. Both methods are useful.

 

LOGIC DIAGRAM:

 

The logic diagram of 3-bit magnitude comparator is given below:

3-bit magnitude comparator
3-bit magnitude comparator

Applications of comparator circuit

The basic applications of magnitude comparator are as follows:

  1. These comparators are used in control applications.
  2. These are used in applications used for binary numbers presenting variables such as temperature, position etc.
  3. These comparators are used in our daily life applications.
  4. These comparators are also used in process controllers.
  5. These are also used in Servo motor controls.
  6. These are also used in applications for password verification.
  7. These are also used in applications for Biometric verification.
  8. Comparators are also used in CPU’S.

https://www.youtube.com/watch?v=sCZebMUI458

 

Related topics

Leave a Reply

Your email address will not be published. Required fields are marked *