Example #1
0
 /**
  * Returns a new {@code BigInteger} whose value is {@code ~this}. The result
  * of this operation is {@code -this-1}.
  * <p>
  * <b>Implementation Note:</b> Usage of this method is not recommended as
  * the current implementation is not efficient.
  *
  * @return {@code ~this}.
  */
 public static BigInteger Not(BigInteger value)
 {
     return(Logical.Not(value));
 }
Example #2
0
 public static BigInteger XOr(BigInteger a, BigInteger b)
 {
     return(Logical.Xor(a, b));
 }
Example #3
0
 /**
  * Returns a new {@code BigInteger} whose value is {@code this & ~val}.
  * Evaluating {@code x.andNot(val)} returns the same result as {@code
  * x.and(val.not())}.
  * <p>
  * <b>Implementation Note:</b> Usage of this method is not recommended as
  * the current implementation is not efficient.
  *
  * @param val
  *            value to be not'ed and then and'ed with {@code this}.
  * @return {@code this & ~val}.
  * @throws NullPointerException
  *             if {@code val == null}.
  */
 public static BigInteger AndNot(BigInteger value, BigInteger other)
 {
     return(Logical.AndNot(value, other));
 }
Example #4
0
 /// <summary>
 /// Computes the bit per bit operator between two numbers
 /// </summary>
 /// <param name="a">The first term of the operation.</param>
 /// <param name="b">The second term of the oepration</param>
 /// <remarks>
 /// <strong>Note:</strong> Usage of this method is not recommended as
 /// the current implementation is not efficient.
 /// </remarks>
 /// <returns>
 /// Returns a new <see cref="BigInteger"/> whose value is the result
 /// of an logical and between the given numbers.
 /// </returns>
 /// <exception cref="ArgumentException">
 /// If either <paramref name="a"/> or <paramref name="b"/> is <c>null</c>.
 /// </exception>
 public static BigInteger And(BigInteger a, BigInteger b)
 {
     return(Logical.And(a, b));
 }