> For the complete documentation index, see [llms.txt](https://guide.cronuszen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.cronuszen.com/gpcscripting/gpc-script-guide/reference/constants/32-bit-masks.md).

# 32-bit masks

One-bit masks spanning all 32 positions of a Live integer.

### Constants

<table data-search="false"><thead><tr><th>Name</th><th align="right">Value</th><th>Description</th></tr></thead><tbody><tr><td><code>BITMASK_1</code></td><td align="right"><code>1</code></td><td>32-bit mask with bit 0 set.</td></tr><tr><td><code>BITMASK_2</code></td><td align="right"><code>2</code></td><td>32-bit mask with bit 1 set.</td></tr><tr><td><code>BITMASK_3</code></td><td align="right"><code>4</code></td><td>32-bit mask with bit 2 set.</td></tr><tr><td><code>BITMASK_4</code></td><td align="right"><code>8</code></td><td>32-bit mask with bit 3 set.</td></tr><tr><td><code>BITMASK_5</code></td><td align="right"><code>16</code></td><td>32-bit mask with bit 4 set.</td></tr><tr><td><code>BITMASK_6</code></td><td align="right"><code>32</code></td><td>32-bit mask with bit 5 set.</td></tr><tr><td><code>BITMASK_7</code></td><td align="right"><code>64</code></td><td>32-bit mask with bit 6 set.</td></tr><tr><td><code>BITMASK_8</code></td><td align="right"><code>128</code></td><td>32-bit mask with bit 7 set.</td></tr><tr><td><code>BITMASK_9</code></td><td align="right"><code>256</code></td><td>32-bit mask with bit 8 set.</td></tr><tr><td><code>BITMASK_10</code></td><td align="right"><code>512</code></td><td>32-bit mask with bit 9 set.</td></tr><tr><td><code>BITMASK_11</code></td><td align="right"><code>1024</code></td><td>32-bit mask with bit 10 set.</td></tr><tr><td><code>BITMASK_12</code></td><td align="right"><code>2048</code></td><td>32-bit mask with bit 11 set.</td></tr><tr><td><code>BITMASK_13</code></td><td align="right"><code>4096</code></td><td>32-bit mask with bit 12 set.</td></tr><tr><td><code>BITMASK_14</code></td><td align="right"><code>8192</code></td><td>32-bit mask with bit 13 set.</td></tr><tr><td><code>BITMASK_15</code></td><td align="right"><code>16384</code></td><td>32-bit mask with bit 14 set.</td></tr><tr><td><code>BITMASK_16</code></td><td align="right"><code>32768</code></td><td>32-bit mask with bit 15 set.</td></tr><tr><td><code>BITMASK_17</code></td><td align="right"><code>65536</code></td><td>32-bit mask with bit 16 set.</td></tr><tr><td><code>BITMASK_18</code></td><td align="right"><code>131072</code></td><td>32-bit mask with bit 17 set.</td></tr><tr><td><code>BITMASK_19</code></td><td align="right"><code>262144</code></td><td>32-bit mask with bit 18 set.</td></tr><tr><td><code>BITMASK_20</code></td><td align="right"><code>524288</code></td><td>32-bit mask with bit 19 set.</td></tr><tr><td><code>BITMASK_21</code></td><td align="right"><code>1048576</code></td><td>32-bit mask with bit 20 set.</td></tr><tr><td><code>BITMASK_22</code></td><td align="right"><code>2097152</code></td><td>32-bit mask with bit 21 set.</td></tr><tr><td><code>BITMASK_23</code></td><td align="right"><code>4194304</code></td><td>32-bit mask with bit 22 set.</td></tr><tr><td><code>BITMASK_24</code></td><td align="right"><code>8388608</code></td><td>32-bit mask with bit 23 set.</td></tr><tr><td><code>BITMASK_25</code></td><td align="right"><code>16777216</code></td><td>32-bit mask with bit 24 set.</td></tr><tr><td><code>BITMASK_26</code></td><td align="right"><code>33554432</code></td><td>32-bit mask with bit 25 set.</td></tr><tr><td><code>BITMASK_27</code></td><td align="right"><code>67108864</code></td><td>32-bit mask with bit 26 set.</td></tr><tr><td><code>BITMASK_28</code></td><td align="right"><code>134217728</code></td><td>32-bit mask with bit 27 set.</td></tr><tr><td><code>BITMASK_29</code></td><td align="right"><code>268435456</code></td><td>32-bit mask with bit 28 set.</td></tr><tr><td><code>BITMASK_30</code></td><td align="right"><code>536870912</code></td><td>32-bit mask with bit 29 set.</td></tr><tr><td><code>BITMASK_31</code></td><td align="right"><code>1073741824</code></td><td>32-bit mask with bit 30 set.</td></tr><tr><td><code>BITMASK_32</code></td><td align="right"><code>-2147483648</code></td><td>32-bit mask with bit 31 set.</td></tr></tbody></table>

### Example

```gpc
int flags;
main {
    flags = flags | BITMASK_3;
    if((flags & BITMASK_3) == BITMASK_3) set_val(TRACE_1, 1);
}
```

Back to all constant categories.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://guide.cronuszen.com/gpcscripting/gpc-script-guide/reference/constants/32-bit-masks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
