Today I needed a simple algorithm for checking if a number is a power of 2.
The algorithm needs to be:
ulong
return (i & -i) == i