2 bit comparator = 1bit magnitude comparator +1 bit magnitude comparator
if A>B =A(~B)(B bar);
if A<B = ~A.B;
A==B = AB + (~A)(~B);
block of instruction shown above is for 1 bit comparator
means if A>B ==true then High bit is set on (A>B) output.
if A<B true then high bit is set on (A==B) output,
If we cascade two 1 bit comparator then we can design 2-bit comparator...