dantheman wrote:
thanks rick
so if get this
if supervar mod 4 is either 2 or 3 i should add 2 so i will get the
poper answer of 1151 and 21319
thank you very much i appreciate it
Well . . . what he (Jon) said. The "proper answer" depends on what the actual
problem is. I only mentioned an "arithmetic interpretation" because you framed
your original question in terms of integer results. Really it's a logical AND
operation being performed bitwise on a bunch of adjacent bits, that's all.
Normally, with a mask such as 0xFFFD the "natural" assumption would be that the
point of the AND operation is to force a particular bit to zero while leaving
all the others unchanged, rather than to perform some exotic arithmetic trick.
Your comment above about adding 2 seems to be about how to reverse the AND
operation. The more natural way to do that would be to perform a logical OR
with the inverse of your mask. In this case, OR'ing with 0x0002 would be the
logical inverse of AND'ing with 0xFFFD.
-rick-