Q:

Modulus without math operators

I want to create a method which given a number n and the number 16 and applies the modulus operator to them (n % 16). The thing which makes it hard for me is that I need to not use any of math operators (+, -, /, *, %).

A:

Since 16 is 2^4 you can obtain the same result by truncating the value to the 4 least significant bits.
So:
x & 0xF is equivalent to x % 16
This is valid just because you are working with a power of two.

