Use bitwise operator instead of modulo.