What is a Digital Comparator and Magnitude ComparatorNowadays, electronics are completely a part of human life and the whole world observes dramatic progress in the utilization of electronic devices. Providing many advantages, electronics is now so prevalent that it’s almost streamlined to think of the devices that don’t make use of it than that of devices that do. The enhanced trend in electronic technology today allowed us to discuss the widely used devices digital comparator and magnitude comparators. Then after the extensive performance of operational amplifiers, the most widely accepted simple electronic devices are comparators. So, let’s dive deep into the topics of what is a digital comparator, its operation, performance, and applications.Digital Comparator And Magnitude ComparatorA detailed discussion of digital comparator and magnitude comparator mainly includes the following. What is Digital Comparator?As data comparison is mostly required in many digital systems at the time of logical or arithmetic functions, digital comparators are the one best option to compare data. Digital comparators are the most appropriate combinational logic circuits used to compare relative magnitudes of two binary numbers.The device accepts two binary numbers (A and B)as input and generates an output based on the magnitude of given inputs (example: A=B or A>B or A<B). Digital Comparators are developed through logic gates like AND, NOT or NOR gates. Digital comparators are available as identity comparators and magnitude comparators.What is Magnitude Comparator?Magnitude comparators are mostly utilized in microcontrollers and CPUs to address data comparison, register and perform all other arithmetic operations. Magnitude comparators are implemented in many devices and every auto-turn-off device is surely designed using a comparator.A comparator is a decision-making tool and it holds the ability to be executed in numerous control devices. Accepting two binary numbers as input (A and B), data comparison through magnitude comparators produces the output to indicate equality (A=B), logic 1 in two conditions when (A>B or A<B).Types of Magnitude ComparatorsThere are different kinds of magnitude comparators which include the following.1-bit Magnitude ComparatorA comparator that compares two binary bits and produces three outputs based on the relative magnitudes of given binary bits is called a 1-bit magnitude comparator. Truth TableABA<BA>BA=B00001011001001011001The truth table derives the expressions of A<B, A>B and A=B as belowA<B – A’BA>B – AB’A=B – A’B’+ABWith these expressions, the Circuit diagram can be as follows1-bit-magnitude2-bit Magnitude ComparatorA comparator that compares two binary numbers (each number having 2 bits) and produces three outputs based on the relative magnitudes of given binary bits is called a 2-bit magnitude comparator.Truth TableA1A0B1B0A<BA=BA>B0000010000110000101000011100010000101010100110100011110010000011001001101001010111001100001110100111100011111010The truth table derives the expressions of A<B, A>B, and A=B as belowA<B – A1’B1’+ A0’B1B0 + A1’A0’B0A>B – A1B1’ + A0B1’B0’ + A1A0B0’A=B – (A0 Ex-Nor B0) (A1 Ex-Nor B1)With these expressions, the Circuit diagram can be as follows2-bit magnitude3-bit Magnitude ComparatorA comparator that compares two binary numbers (each number having 3 bits) and produces three outputs based on the relative magnitudes of given binary bits is called a 3-bit magnitude comparator.3-bit magnitudeThe equal functions are A0 = B0, A1= B1, A2 = B2Then A=B = (A0’B0’ + A0B0)(A1’B1’ + A1B1)(A2’B2’ + A2B2)The output is A< B in the cases ofA2<B2A2 = B2 then A1<B1A2 = B2, A1 = B1 then A0<B0A<B = A2’B2 + [(A2’B2’ + A2B2) * A1’B1] + [(A2’B2’ + A2B2) *[(A1’B’ + A1B1) * A0’B0]The output is A> B in the cases ofA2>B2A2 = B2 then A1>BA2 = B2, A1 = B1 then A0>B0A>B = A2B2’ + + [(A2’B2’ + A2B2) * A1B1’] + + [(A2’B2’ + A2B2) * [(A1’B’ + A1B1) * A0B0’]3-bit-logic-diagram4-bit Magnitude ComparatorA comparator that compares two binary numbers (each number having 4 bits) and produces three outputs based on the relative magnitudes of given binary bits is called a 4-bit magnitude comparator.The input bits can be termed as A = A3 A2 A1 A0 and B = B3 B2 B1 B0The output is A> B in the cases ofA3 = 1 and B3 = 0A3 = B3 and A2 = 1, B2 = 0A3 = B3 and A2= B2 and A1 = 1 and B1 = 0A3 = B3 and A2= B2 and A1 = B1 and A0 = 1 and B0 = 0And A>B can be expressed asA>B = A3B3’ + (A3 Ex-Nor B3) A2B2’ + (A3 Ex-Nor B3) (A2 Ex-Nor B2) A1B1’ + (A3 Ex-Nor B3) (A2 Ex-Nor B2) (A1 Ex-Nor B1) A0B0’WhileA<B = A3‘B3 + (A3 Ex-Nor B3) A2’B2 + (A3 Ex-Nor B3) (A2 Ex-Nor B2) A1’B1 + (A3 Ex-Nor B3) (A2 Ex-Nor B2) (A1 Ex-Nor B1) A0’B0And similarly, A=B can be expressed asA=B = (A3 Ex-Nor B3) (A2 Ex-Nor B2) (A1 Ex-Nor B1)(A0 Ex-Nor B0)With these expressions, the Circuit diagram can be as follows.4-bit-magnitudeMostly, 4-bit comparators are in the form of IC’s and the IC 7485 is widely used. Data comparison can be performed by grounding A>B, A<B and A+B inputs to the Vcc terminal. Furthermore, this integrated circuit performs a cascading operation where it helps for cascading multiple comparators.8-bit Magnitude ComparatorHere, data comparison is possible through the cascading of two 4-bit comparators. The circuit is connected as below8-bit-magnitudeThe outputs of the lower-order comparator are connected to the corresponding cascading inputs of the higher-order comparatorIn the lower order comparator, the cascading input (A=B) needs to be connected HIGH, and A, B needs to be connected to LOW. The result of the 8-bit comparator is the output of the higher-order comparator.Applications ComparatorDigital comparator and magnitude comparator is used in different applications where data comparison is mostly required in many of the activities, and these hold many benefits too.Now, look into few of the applications of comparatorsUsed for authorization purposes (such as password management) and biometric applications.These are implemented in process controllers and also in servo motor controls.Implemented for the data comparison of variables like temperature, the pressure is compared with that of reference values.Used to address decoding circuitry in computers.Thus, this is all about digital comparator and magnitude comparator. So, the augmented performance of comparators allowed these devices to gain more prominence in the electronics industry and let them be implemented in many applications. Share This Post: Facebook Twitter Google+ LinkedIn Pinterest Post navigation ‹ Previous Top List of PCB Manufacturers in IndiaNext › What is Embedded System Design : Steps in the Design Process Related Content What is a Sampling Oscilloscope & Its Working What is a BCD Counter : Circuit & Its Working What is a Shunt Capacitor & Its Working What is Static VAR Compensator : Design & Its WorkingAdd Comment Cancel replyComment:Name * Email * Website