Please Explain these 2 slides well in details :) Solution A comparator is basica
ID: 3635903 • Letter: P
Question
Please Explain these 2 slides well in details :)
Explanation / Answer
A comparator is basically used to check for the greater number among 2 binary numbers. Suppose I give you 2 4-digit decimal numbers and ask you to check for the greater number: Say 3451 and 4670 how would you proceed? Step 1: Compare the leftmost bit(also called the most significant bit: MSB or highest order bit) i.e. compare 3 and 4. As 4>3 so 467>345 How about comparing 5672 and 5230? Step 1: Compare the MSB: 5 = 5 so no conclusions here Step 2: Compare the bit to the right of MSB: 6>2 so 567>523. I think you get the idea now. The same thing is done for binary, but as there are only 2 possibilities 0 and 1 it's much simpler. When will 2 numbers be equal? When all the digits are the same. That's exactly what the circuit shows. If you recall, 1 XOR 1 = 0 XOR 0 = 0 The gate shown is a XNOR gate (XOR followed by NOT) So, 1 XNOR 1 = 0 XNOR 0 = 1 (i.e. the 2 bits are equal) If you recall the truth table for AND gate, the output is 1 iff all its inputs are 1. So, the circuit basically outputs 1 if A=B