+2  A: 

A google search for "define: xor" will point you to http://en.wikipedia.org/wiki/Xor, the fountain of all knowledge. Reading this will give you an insight as to what exclusive-or (XOR) means :)

Goodluck

[edit] And just to clarify, xor does not mean and/or, sorry. And the definition of xor is programming language independent.

Jacob
There is no `^^`, since it can't be made to short-circuit, and `!=` and `^` both work as non-short-circuiting boolean XOR.
Matthew Flaschen
...unless your language doesn't have strict booleans.
dan04
+1  A: 

XOR stands for 'eXclusive OR'. Exclusive Or operation result is true, only if one of the arguments is true, not both.

Having 1 as the value of true, and 0 as the value of false, bitwise operation gives 1 when only one of the bits at corresponding position is 1.

George Polevoy
+6  A: 

Exclusive or between two bits means that the result is 1 if one and only one bit is 1.

The truth table is:

   | 0 | 1
---+---+---
 0 | 0 | 1
 1 | 1 | 0

When you talk about xoring a larger value, it's just taking each bit one at a time, so:

    1111 0000
xor 1010 1010
    ---- ----
  = 0101 1010

For what it's worth, a full list of binary operations:

  • and, 1 only if both its inputs are 1, else 0.
  • or, 0 only if both its inputs are 0, else 1.
  • xor, 1 only if one (not both) of its inputs is 1, else 0.
  • not, 1 only if its input is 0, else 1.

And the truth tables:

and| 0 | 1      or| 0 | 1     xor| 0 | 1     not| 0 | 1
---+---+---    ---+---+---    ---+---+---    ---+---+---
 0 | 0 | 0      0 | 0 | 1      0 | 0 | 1        | 1 | 0 
 1 | 0 | 1      1 | 1 | 1      1 | 1 | 0 
paxdiablo