I´m trying to make very fast MOD operations. I saw in several pages we can do alternatively calculate the MOD using the AND operator with (Divisor-1). Eg.:
result = (100 mod 8) is the same as result = (100 and 7)
It functions perfectly if the divisor is less than 8 bits, but if we calculate (1245 mod 67) we can see the result is different of (1245 and 66).
So, how can I calculate this faster than using the MOD operator provided by VB.NET language?
Thanks!