sbool isPowerOfTwo(int x) { ret (x != 0) && ((x & (x - 1)) == 0); }