OBTAINING HIGHER COMPARATOR USING LOWER COMPARATORS
QCan we implement higher comparator 4bit comparator using 2bit comparators.
Ans: Yes we can implement the above required as follow:
Firstly lower two bits of A & B are compared and then next bits and then next. We feed the result of first 2 bits to lower bit of next comparator. Then we feed the result of this comparator to lower bit of next comparator. This way with the use of 3 2bit comparators we get 4bit comparator.
e.g. Compare A=1011_{2} and B=1010_{2}
We firstly compare 11 (A_{1}A_{0}) and 10 (B_{1}B_{0}) and we get a HIGH at f (A>B). Hence we put a HIGH at A_{0} & a LOW at B_{0} and A_{2} & B_{2 }at A_{1} B_{1} pins of next comparator. So if A_{2} is greater than B_{2} then we get a high at f(A>B) for 3 bits and if A_{2} is less than B_{2} then we get a high at f(A<B) for 3 bits and if A_{2} is equal to B_{2} then we compare A_{0} and B_{0}. Similarly we repeat this and get the result.
Similarly we can obtain other higher bit comparators.
