public BigInteger AndNot(BigInteger val) { return this.And(val.Not()); }
public BigInteger And(BigInteger value) { if ((this.sign == 0) || (value.sign == 0)) { return Zero; } int[] numArray = (this.sign > 0) ? this.magnitude : this.Add(One).magnitude; int[] numArray2 = (value.sign > 0) ? value.magnitude : value.Add(One).magnitude; bool flag = (this.sign < 0) && (value.sign < 0); int[] mag = new int[Math.Max(numArray.Length, numArray2.Length)]; int num2 = mag.Length - numArray.Length; int num3 = mag.Length - numArray2.Length; for (int i = 0; i < mag.Length; i++) { int num5 = (i >= num2) ? numArray[i - num2] : 0; int num6 = (i >= num3) ? numArray2[i - num3] : 0; if (this.sign < 0) { num5 = ~num5; } if (value.sign < 0) { num6 = ~num6; } mag[i] = num5 & num6; if (flag) { mag[i] = ~mag[i]; } } BigInteger integer = new BigInteger(1, mag, true); if (flag) { integer = integer.Not(); } return integer; }