Logic for ìAgtBî (unsigned)
Consider A > B, both N bit numbers, A[N-1:0], B[N-1:0] If (A(N-1) = ë1í and (B(N-1) = ë0í) then AgtB = ë1í; elsif ((A(N-1) = B(N-1)) and (A(N-2) = ë1í and (B(N-2)=ë0í) ) then AgtB = ë1í;
A=01xxÖ B=00xxxxA=11xxÖ B=10xxxx
Look at ìbit(i)î. The enable signal from previous bit is A= B up until now . If this is ë1í, then we need to do a comparison.However, if ìAgtBî is already true, then we donít need to do comparison and can skip this comparison!