code: public static boolean isPowerOfTwo(BigInteger x) {
      checkNotNull(x);
      return x.signum() > 0 && x.getLowestSetBit() == x.bitLength() - 1;
    }
docs: Returns {@code true} if {@code x} represents a power of two.