BitString (BitString other) { long andBits = myBits & other.myBits; // 0 & ? = ? & 0 = 0; 1 & 1 = 1; ? & 1 = 1 & ? = ? & ? = ? long andMask = (myMask ^ myBits) | (other.myMask ^ other.myBits) | andBits; return new BitString(andBits, andMask); }