# BitXor

Performs a bitwise logical XOR operation.

## Method Signature

```
BitXor(number1=[integer], number2=[integer])
```

### Arguments

| Argument  | Type      | Required | Description                    | Default |
| --------- | --------- | -------- | ------------------------------ | ------- |
| `number1` | `integer` | `true`   | Numeric value for bitwise XOR. |         |
| `number2` | `integer` | `true`   | Numeric value for bitwise XOR. |         |

## Examples

### Calculate bitwise logical XOR

Uses the bitXor function to perform the logical XOR operation on each pair of the corresponding bits

[Run Example](https://try.boxlang.io/?code=eJxLyiyJyC%2FSUDDVUTBW0LTmAgAqBwQD)

```java
bitXor( 5, 3 );

```

Result: 6

### Additional Examples

[Run Example](https://try.boxlang.io/?code=eJwrL8osSfUvLSkoLdFQSMosicgv0lAwNLLQUTBV0FTQtOYCAMcpCbg%3D)

```java
writeOutput( bitXor( 128, 5 ) );

```

## Related

* [BinaryDecode](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/binarydecode)
* [BinaryEncode](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/binaryencode)
* [BitAnd](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitand)
* [BitMaskClear](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitmaskclear)
* [BitMaskRead](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitmaskread)
* [BitMaskSet](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitmaskset)
* [BitNot](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitnot)
* [BitOr](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitor)
* [BitSh](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitsh)
* [bitShln](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitshln)
* [bitShrn](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitshrn)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitxor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
