Is there some cool algorithm with bit wise operations?
x mod y = x - y*(x/y)
where (x/y) is an integer divide.