Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>^ bitwise exclusive or operator (xor)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ^                       Bitwise Exclusive OR Operator (XOR)

 exp1 ^ exp2            Bitwise exclusive OR
 exp1, exp2              any integral expression

    The ^ operator performs a bit-by-bit exclusive OR (aka XOR)
    operation on exp1 and exp2.  (In an exclusive OR, a bit of the result
    is true if either one of the corresponding bits of exp1 or exp2 is
    true; the result is false if both corresponding bits are true or both
    bits are false.)  Example:

           i = 0x0FF0;
           j = 0xFF00;
           k = i ^ j;          /* k == 0xF0F0 */


See Also: & | ^^ && ||

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson