src/util/Util.java
public static int bitpower(int exp) {
		int result = 1;
		int base = 2;
	    while (exp != 0)
	    {
	        if ((exp & 1) == 1)
	            result *= base;
	        exp >>= 1;
	        base *= base;
	    }
		return result;
	}
/** Returns 2 to the power of exp
	 * @param exp Exponent
	 * @return 2^exp
	 * */
Returns 2 to the power of exp
@param exp Exponent
@return 2^exp
Returns 2 to the power of exp @param exp Exponent @return 2^exp
public static int bitpower(int exp) {
		int result = 1;
		int base = 2;
	    while (exp != 0)
	    {
	        if ((exp & 1) == 1)
	            result *= base;
	        exp >>= 1;
	        base *= base;
	    }
		return result;
	}
public static int bitpower ( int exp ) { int result = 1 ; int base = 2 ; while ( exp != 0 ) { if ( ( exp & 1 ) == 1 ) result *= base ; exp >>= 1 ; base *= base ; } return result ; }
Returns 2 to the power of exp
 @param exp Exponent
 @return 2^exp
Returns 2 to the power of exp @param exp Exponent @return 2^exp