to check a number is power of 2