# bitmask(bool4)

> Returns a bitmask representation of a bool4. Storing one 1 bit per component in LSB order, from lower to higher bits (so 4 bits in total). The component x is stored at bit 0, The component y is stored at bit 1, The component z is stored at bit 2, The component w is stored at bit 3 The bool4(x = true, y = true, z = false, w = true) would produce the value 1011 = 0xB

## Definition

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

```csharp
public static int bitmask(bool4 value)
```

### Parameters

**** (\[bool4]\(/engine/6000.5/script-reference/unity/mathematics/bool4)): The input bool4 to calculate the bitmask for

### Returns

| Type                                                       | Description                                         |
| ---------------------------------------------------------- | --------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | A bitmask representation of the bool4, in LSB order |
