# xor {#xor}

## Syntax {#syntax}

`xor(X, Y)`

## Arguments {#arguments}

**X** and **Y** can be a scalar, pair, vector or matrix.

## Details {#details}

Pair each elements in *X* and *Y* to perform the "exclusive or" operation.

## Examples {#examples}

```
1 xor 0
// output: 1

x = 5 6 7
x xor 0
// output: [1,1,1]

x = 1 2 3
y = 2 1 3
x xor y
// output: [0,0,0]

true xor false
// output: 1
```

Related function: [or](../../Programming/Operators/OperatorReferences/or.md), [not](../n/not.md)

