# ^ operator

Source: https://ref.dm-lang.org/operator/caret

### Format
> `A ^ B`

### Returns
> The binary "xor" of A and B.

A and B must be between 0 and 2\*\*24 - 1, giving an effective width of 24 bits.

If A and B are lists, the result is a list containing items that are in either list but not both. list(1,2) ^ list(2,3) is equivalent to list(1,3). The items found only in A come first in the result, followed by any items found only in B.

### See also
- [^= operator](https://ref.dm-lang.org/operator/caretequals.md)
- [operators](https://ref.dm-lang.org/operator/index.md)
