Efficient way to manipulate large powers of two
- by bguiz
The most efficient way to code powers of two is by bit shifting of integers.
1 << n gives me 2^(n-1)
However, if I have a number that is larger than the largest value allowed in an int, what can I use to efficiently manipulate powers of 2?