Finding if a number is a power of 2 completed