17 May
2017
17 May
'17
12:46 a.m.
Edward Diener wrote:
An alternative algorithm I have been considering is when the bit sizes are unequal is:
a) The bits comprising the common length are the low order bits. b) If the bitset with the larger bit size has any 1 bit outside the bits comprising the common length, the smaller bit size is always < the larger bit size. c) Else do a bit-by-bit comparison for the bits comprising the common length going from the higher order bit to the lower order bit of just those bits.
Could also add d) if still equal, the larger bit size > the smaller bit size. This makes 000111 > 111 instead of equal, so that equality (which I presume checks sizes) and equivalence match.