C Program to find whether a no is power of two – Bit Algorithm – Given a positive integer, write a function to find if it is a power of two or not.
how to calculate the power of a number
2 Articles
2
Find whether a given number is a power of 4 or not – Bit Algorithm – A simple method is to take log of the given number on base 4, and if we get an integer.