Arm/pow2
From ASMBits
arm/popcountPrevious
Nextarm/mask
Write a function that will return whether its parameter is a power of 2. The parameter is an unsigned integer and will not be 0.
int pow2(unsigned int num);
Expected solution length: Around 5 lines.
Sample Input
pow2(4)
Sample Output
r0=1
arm/popcountPrevious
Nextarm/mask