src/NeinMath/Integer.cs
/// <summary>
/// Performs a bitwise XOR operation on an Integer and a signed 32-bit
/// integer.
/// </summary>
/// <param name="right">The second value.</param>
/// <returns>The result of the bitwise XOR operation.</returns>
Performs a bitwise XOR operation on an Integer and a signed 32-bit
integer.
Performs a bitwise XOR operation on an Integer and a signed 32 - bit integer .
public Integer Xor(int right)
        {
            var leftBits = sign
                ? Bits.TwosComplement(bits, length) : bits;
            var rightPad = right < 0
                ? 0xFFFFFFFF : 0x00000000;
            var result = Calc.Xor(leftBits, length, (uint)right, rightPad);
            var signed = sign ^ (right < 0);
            if (signed)
                result = Bits.TwosComplement(result, result.Length);
            return new Integer(result, result.Length, signed);
        }
public Integer Xor ( int right ) { var leftBits = sign ? Bits . TwosComplement ( bits , length ) : bits ; var rightPad = right < 0 ? 0xFFFFFFFF : 0x00000000 ; var result = Calc . Xor ( leftBits , length , ( uint ) right , rightPad ) ; var signed = sign ^ ( right < 0 ) ; if ( signed ) result = Bits . TwosComplement ( result , result . Length ) ; return new Integer ( result , result . Length , signed ) ; }
Performs a bitwise XOR operation on an Integer and a signed 32-bit
integer.
Performs a bitwise XOR operation on an Integer and a signed 32 - bit integer .
The result of the bitwise XOR operation.
The result of the bitwise XOR operation .
right
int
The second value.
The second value .