3 ms·
There's no straightforward way of implementing a general exponentiation function using only bitwise operations. Of course it is straightforward to compute 2^x f
by foldr 9y ago
There's no straightforward way of implementing a general exponentiation function using only bitwise operations. Of course it is straightforward to compute 2^x for x an integer >= 0, or x*2, but it's not clear that this is the question that was posed.