public boolean overlapsWith(CidrBlock other) {
        if (this.isIpv6() != other.isIpv6()) return false;

        int ignoreLastNBits = addressLength - Math.min(this.prefixLength(), other.prefixLength());
        return this.addressInteger.shiftRight(ignoreLastNBits).equals(other.addressInteger.shiftRight(ignoreLastNBits));
    }
Add 'n' to the byte at the given offset, truncating overflow bits.  0 refers to the most significant byte of the address.
vespajlib/src/main/java/ai/vespa/net/CidrBlock.java