In- depth understanding of XOR operation Instances
I. Code IMPLEMENTATION
#include <stdio.h> int main () {int a = 10; int B = 12; A = A^b; b = a^b; A = A^b; printf ("%d%d", A, b); System ("pause"); return 0; }
two. Heterogeneity or nature
Each element is its own additive inverse (a^a = 0)
Three. Compilation analysis
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7A/D8/wKiom1a-4e3AMag_AAAseGbNtco084.png "title=" 1.PNG " alt= "Wkiom1a-4e3amag_aaasegbntco084.png"/>
1. Remove the values of a and B
2. Place the value of a in eax, and B and eax, and save the value of a.
3. Place the value of a in eax, Xor B with eax, and save the value of B.
4. Place the value of a in eax, and B and eax, and save the value of a.
The concept of A^a = 0 was used;
This article is from the "make a small driver" blog, please be sure to keep this source http://10799170.blog.51cto.com/10789170/1741808
Programming with C: Do not allow third-party variables to be created