modulo operator

modulo operator

(mathematics)(mod) The operator that returns the remainderafter integer division of its first argument by its second.Written as "%" in C and some other languages.

Where the second argument is a power of two, the result can becalculated much more quickly using bitwise and with theappropriate bit-mask.