The XOR operator:
Compares two bits and returns a "1" if the operands are different.
Here is the truth table for this:
| Bit 1 | Bit 2 | Result |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
For example one:
1001 1011 #155 0110 1001 #105 1111 0010 #242
For example two:
1000 0000 #128 1000 0000 #128 0000 0000 #0
Hope this helps!
~Hammy
In reply to Re: Bitwise Operators - TT&^/TT
by HamNRye
in thread Bitwise Operators - &^
by dsb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |