Good day! I was reading your tutorial, but something is not clear.
Tutorials - Bitwise Operators and Bit Manipulations in C and C++ - Cprogramming.com
This does not seems right:
"You can think of XOR in the following way: you have some bit, either 1 or 0, that we'll call A. When you take A XOR 0, then you always get A back: if A is 1, you get 1, and if A is 0, you get 0. On the other hand, when you take A XOR 1, you flip A. If A is 0, you get 1; if A is 1, you get 0."
According to the trueth table:
0 ^ 0 = 0
0 ^ 1 = 1
1 ^ 0 = 1
1 ^ 1 = 0
So can someone clarify this please?