```
operator ^ {
associativity left
precedence
}
```

### Declarations

Returns the result of performing a bitwise XOR operation on the two given values.

A bitwise XOR operation, also known as an exclusive OR operation, results
in a value that has each bit set to `1`

where *one or the other but not
both* of its arguments had that bit set to `1`

. For example:

```
let x: UInt8 = 5 // 0b00000101
let y: UInt8 = 14 // 0b00001110
let z = x ^ y // 0b00001011
// z == 11
```

**Parameters:**
**lhs:** An integer value.
**rhs:** Another integer value.

#### Declaration

`func ^(lhs: Int8, rhs: Int8) -> Int8`

#### Declared In

`Int8`

, `FixedWidthInteger`

Returns the result of performing a bitwise XOR operation on the two given values.

A bitwise XOR operation, also known as an exclusive OR operation, results
in a value that has each bit set to `1`

where *one or the other but not
both* of its arguments had that bit set to `1`

. For example:

```
let x: UInt8 = 5 // 0b00000101
let y: UInt8 = 14 // 0b00001110
let z = x ^ y // 0b00001011
// z == 11
```

**Parameters:**
**lhs:** An integer value.
**rhs:** Another integer value.

#### Declaration

`func ^(lhs: Int16, rhs: Int16) -> Int16`

#### Declared In

`Int16`

, `FixedWidthInteger`

Returns the result of performing a bitwise XOR operation on the two given values.

`1`

where *one or the other but not
both* of its arguments had that bit set to `1`

. For example:

```
let x: UInt8 = 5 // 0b00000101
let y: UInt8 = 14 // 0b00001110
let z = x ^ y // 0b00001011
// z == 11
```

**Parameters:**
**lhs:** An integer value.
**rhs:** Another integer value.

#### Declaration

`func ^(lhs: Int32, rhs: Int32) -> Int32`

#### Declared In

`Int32`

, `FixedWidthInteger`

Returns the result of performing a bitwise XOR operation on the two given values.

`1`

where *one or the other but not
both* of its arguments had that bit set to `1`

. For example:

```
let x: UInt8 = 5 // 0b00000101
let y: UInt8 = 14 // 0b00001110
let z = x ^ y // 0b00001011
// z == 11
```

**Parameters:**
**lhs:** An integer value.
**rhs:** Another integer value.

#### Declaration

`func ^(lhs: Int64, rhs: Int64) -> Int64`

#### Declared In

`Int64`

, `FixedWidthInteger`

Returns the result of performing a bitwise XOR operation on the two given values.

`1`

where *one or the other but not
both* of its arguments had that bit set to `1`

. For example:

```
let x: UInt8 = 5 // 0b00000101
let y: UInt8 = 14 // 0b00001110
let z = x ^ y // 0b00001011
// z == 11
```

**Parameters:**
**lhs:** An integer value.
**rhs:** Another integer value.

#### Declaration

`func ^(lhs: UInt, rhs: UInt) -> UInt`

#### Declared In

`UInt`

, `FixedWidthInteger`

Returns the result of performing a bitwise XOR operation on the two given values.

`1`

where *one or the other but not
both* of its arguments had that bit set to `1`

. For example:

```
let x: UInt8 = 5 // 0b00000101
let y: UInt8 = 14 // 0b00001110
let z = x ^ y // 0b00001011
// z == 11
```

**Parameters:**
**lhs:** An integer value.
**rhs:** Another integer value.

#### Declaration

`func ^(lhs: UInt8, rhs: UInt8) -> UInt8`

#### Declared In

`UInt8`

, `FixedWidthInteger`

Returns the result of performing a bitwise XOR operation on the two given values.

`1`

where *one or the other but not
both* of its arguments had that bit set to `1`

. For example:

```
let x: UInt8 = 5 // 0b00000101
let y: UInt8 = 14 // 0b00001110
let z = x ^ y // 0b00001011
// z == 11
```

**Parameters:**
**lhs:** An integer value.
**rhs:** Another integer value.

#### Declaration

`func ^(lhs: UInt16, rhs: UInt16) -> UInt16`

#### Declared In

`UInt16`

, `FixedWidthInteger`

Returns the result of performing a bitwise XOR operation on the two given values.

`1`

where *one or the other but not
both* of its arguments had that bit set to `1`

. For example:

```
let x: UInt8 = 5 // 0b00000101
let y: UInt8 = 14 // 0b00001110
let z = x ^ y // 0b00001011
// z == 11
```

**Parameters:**
**lhs:** An integer value.
**rhs:** Another integer value.

#### Declaration

`func ^(lhs: UInt32, rhs: UInt32) -> UInt32`

#### Declared In

`UInt32`

, `FixedWidthInteger`

Returns the result of performing a bitwise XOR operation on the two given values.

`1`

where *one or the other but not
both* of its arguments had that bit set to `1`

. For example:

```
let x: UInt8 = 5 // 0b00000101
let y: UInt8 = 14 // 0b00001110
let z = x ^ y // 0b00001011
// z == 11
```

**Parameters:**
**lhs:** An integer value.
**rhs:** Another integer value.

#### Declaration

`func ^(lhs: UInt64, rhs: UInt64) -> UInt64`

#### Declared In

`UInt64`

, `FixedWidthInteger`

Returns the result of performing a bitwise XOR operation on the two given values.

A bitwise XOR operation, also known as an exclusive OR operation, results in a value that has each bit set to

`1`

whereone or the other but not bothof its arguments had that bit set to`1`

. For example:Parameters:lhs:An integer value.rhs:Another integer value.## Declaration

`func ^(lhs: Int, rhs: Int) -> Int`

## Declared In

`Int`

,`FixedWidthInteger`