# operator ^

> Returns the result of a componentwise bitwise exclusive or operation on two bool4 vectors.

## Definition

* **Type:** Operator
* **Namespace:** [Unity.Mathematics](/engine/6000.7/script-reference/unity/mathematics.md)
* **Assembly:** UnityEngine.MathematicsModule

## operator ^(bool4, bool4)

Returns the result of a componentwise bitwise exclusive or operation on two bool4 vectors.

```csharp
public static bool4 operator ^(bool4 lhs, bool4 rhs)
```

### Parameters

**** (\[bool4]\(/engine/6000.7/script-reference/unity/mathematics/bool4)): Left hand side bool4 to use to compute componentwise bitwise exclusive or.**** (\[bool4]\(/engine/6000.7/script-reference/unity/mathematics/bool4)): Right hand side bool4 to use to compute componentwise bitwise exclusive or.

### Returns

| Type                                                                | Description                                             |
| ------------------------------------------------------------------- | ------------------------------------------------------- |
| [bool4](/engine/6000.7/script-reference/unity/mathematics/bool4.md) | bool4 result of the componentwise bitwise exclusive or. |

## operator ^(bool4, bool)

Returns the result of a componentwise bitwise exclusive or operation on a bool4 vector and a bool value.

```csharp
public static bool4 operator ^(bool4 lhs, bool rhs)
```

### Parameters

**** (\[bool4]\(/engine/6000.7/script-reference/unity/mathematics/bool4)): Left hand side bool4 to use to compute componentwise bitwise exclusive or.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Right hand side bool to use to compute componentwise bitwise exclusive or.

### Returns

| Type                                                                | Description                                             |
| ------------------------------------------------------------------- | ------------------------------------------------------- |
| [bool4](/engine/6000.7/script-reference/unity/mathematics/bool4.md) | bool4 result of the componentwise bitwise exclusive or. |

## operator ^(bool, bool4)

Returns the result of a componentwise bitwise exclusive or operation on a bool value and a bool4 vector.

```csharp
public static bool4 operator ^(bool lhs, bool4 rhs)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Left hand side bool to use to compute componentwise bitwise exclusive or.**** (\[bool4]\(/engine/6000.7/script-reference/unity/mathematics/bool4)): Right hand side bool4 to use to compute componentwise bitwise exclusive or.

### Returns

| Type                                                                | Description                                             |
| ------------------------------------------------------------------- | ------------------------------------------------------- |
| [bool4](/engine/6000.7/script-reference/unity/mathematics/bool4.md) | bool4 result of the componentwise bitwise exclusive or. |
