BigInteger.BitwiseAnd(BigInteger, BigInteger) Betreiber
Definition
Führt eine bitweise And
-Operation für zwei BigInteger-Werte aus.Performs a bitwise And
operation on two BigInteger values.
public:
static System::Numerics::BigInteger operator &(System::Numerics::BigInteger left, System::Numerics::BigInteger right);
public static System.Numerics.BigInteger operator & (System.Numerics.BigInteger left, System.Numerics.BigInteger right);
static member ( &&& ) : System.Numerics.BigInteger * System.Numerics.BigInteger -> System.Numerics.BigInteger
Public Shared Operator And (left As BigInteger, right As BigInteger) As BigInteger
Parameter
- left
- BigInteger
Der erste Wert.The first value.
- right
- BigInteger
Der zweite Wert.The second value.
Gibt zurück
Das Ergebnis der bitweisen And
-Operation.The result of the bitwise And
operation.
Hinweise
Die- BitwiseAnd Methode definiert die And
bitweise-Operation für- BigInteger Werte.The BitwiseAnd method defines the bitwise And
operation for BigInteger values. And
Durch die bitweise-Operation wird ein Ergebnisbit nur dann festgelegt, wenn die entsprechenden Bits in left
und right
ebenfalls festgelegt sind, wie in der folgenden Tabelle dargestellt.The bitwise And
operation sets a result bit only if the corresponding bits in left
and right
are also set, as shown in the following table.
Bit in left Bit in left |
Bit in right Bit in right |
Bit in ErgebnisBit in result |
---|---|---|
00 | 00 | 00 |
11 | 00 | 00 |
11 | 11 | 11 |
00 | 11 | 00 |
Die- BitwiseAnd Methode ermöglicht Code wie den folgenden:The BitwiseAnd method enables code such as the following:
BigInteger number1 = BigInteger.Add(Int64.MaxValue, Int32.MaxValue);
BigInteger number2 = BigInteger.Pow(Byte.MaxValue, 10);
BigInteger result = number1 & number2;
Dim number1 As BigInteger = BigInteger.Add(Int64.MaxValue, Int32.MaxValue)
Dim number2 As BigInteger = BigInteger.Pow(Byte.MaxValue, 10)
Dim result As BigInteger = number1 And number2
Die- BitwiseAnd Methode führt die And
bitweise-Operation für zwei BigInteger -Werte aus, als wären Sie beide in der Komplement-Darstellung von zwei Elementen mit der Erweiterung für virtuelle Vorzeichen.The BitwiseAnd method performs the bitwise And
operation on two BigInteger values as if they were both in two's complement representation with virtual sign extension.