Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bitxor question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00461084
Message ID:
00461147
Vues:
16
>>BITXOR(X,N)=Y
>>BITXOR(Y,N)=X
>>
>>how do we find the value of 'N'
>>
>>Thanks to anyone who can illuminate
>>
>Harry,
>
>Sergey's has already given you the correct syntax. Just to add a bit more information, bits in the same position result in the following
A   B   Result
>0   0     0
>1   0     1
>0   1     1
>1   1     0
To sum it up, if bits in the same position match, the return value is that the bit in the return value is not set (it's cleared). If they do not match, the bit is set.

Further to George & Sergey,

If BITXOR(X,N)=Y
then all variations on X,N,Y are true

BITXOR(N,X)=Y
BITXOR(Y,N)=X
BITXOR(N,Y)=X
BITXOR(Y,X)=N
BITXOR(X,Y)=N
Len Speed
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform