BigInteger.ExclusiveOr(BigInteger, BigInteger) Opérateur
Définition
Important
Certaines informations concernent des produits en version préliminaire qui peuvent être considérablement modifiés avant leur sortie. Microsoft n’offre aucune garantie, expresse ou implicite, concernant les informations fournies ici.
Effectue une opération de bits Or (XOr) exclusive sur deux valeurs BigInteger.
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) = System::Numerics::IBitwiseOperators<System::Numerics::BigInteger, System::Numerics::BigInteger, System::Numerics::BigInteger>::op_ExclusiveOr;
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 Xor (left As BigInteger, right As BigInteger) As BigInteger
Paramètres
- left
- BigInteger
Première valeur.
- right
- BigInteger
Seconde valeur.
Retourne
Résultat de l'opération de bits Or.
Implémente
Remarques
Le résultat d’une opération exclusive Or au niveau du bit est true si les valeurs des deux bits sont différentes ; sinon, il s’agit falsede . Le tableau suivant illustre l’opération exclusive Or .
Bit x dans left |
Bit x dans right |
Valeur retournée |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
La ExclusiveOr méthode active le code suivant :
BigInteger number1 = BigInteger.Pow(2, 127);
BigInteger number2 = BigInteger.Multiply(163, 124);
BigInteger result = number1 ^ number2;
let number1 = BigInteger.Pow(2, 127)
let number2 = BigInteger.Multiply(163, 124)
let result = number1 ^^^ number2
Dim number1 As BigInteger = BigInteger.Pow(2, 127)
Dim number2 As BigInteger = BigInteger.Multiply(163, 124)
Dim result As BigInteger = number1 XOr number2
La ExclusiveOr méthode effectue l’opération exclusive Or au niveau du bit sur deux BigInteger valeurs comme si elles étaient toutes deux dans la représentation complémentaire de deux avec l’extension de signe virtuel.