Determines if a number is a power of two.