public boolean isPowerOfFour(int n) {
        // If a number is power of 2, It will have 1 bit at even position and if its a power of 4, 
        // which is not a power of 2 e.g. 128 it will have 1 bit at odd position.

        return (n >0) && ((n &(n-1)) ==0) && ((n & 0xaaaaaaaa) ==0);
        
    }