For example 2^5 is 32, so given the input 32, the result would be 5. I know I could do this like:
while( num > 0 ) num >>= 1;
but I was wondering if there was some bit operation or something because I'd rather not use a loop for this particular situation.