to check wether a number is power of 2 or not