code: public static int binaryLCA(int x, int y) {
  		if (x == y) {
  			return x;
  		}
  		int xor = x ^ y;
  		int idx = getMaxExp(xor);
  		if (idx == -1) {
  			throw new UnsupportedOperationException();
  		}
  		return replaceBy1and0sFrom(x, idx);
  	}
docs: Get the lowest common ancestor of x and y in a complete binary tree
  
  @param x a node
  @param y a node
  @return the lowest common ancestor of x and y in a complete binary tree