# BitMaskClear

Performs a bitwise mask clear operation.

## Method Signature

```
BitMaskClear(number=[integer], start=[integer], length=[integer])
```

### Arguments

| Argument | Type      | Required | Description                                                              | Default |
| -------- | --------- | -------- | ------------------------------------------------------------------------ | ------- |
| `number` | `integer` | `true`   | 32-bit signed integer on which the mask clear operation is performed.    |         |
| `start`  | `integer` | `true`   | Start bit for the clear mask (Integer in the range 0-31, inclusive).     |         |
| `length` | `integer` | `true`   | Length of bits in the clear mask (Integer in the range 0-31, inclusive). |         |

## Examples

### Bitwise Mask Clear

Uses the bitMaskClear function to clear (setting to 0) each of the corresponding bits

[Run Example](https://try.boxlang.io/?code=eJxLyizxTSzOds5JTSzSUDDWUTDQUTBU0LTmAgBqAQa1)

```java
bitMaskClear( 3, 0, 1 );

```

Result: 2

### Using non zero start parameter

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

```java
bitMaskClear( 3, 1, 1 );

```

Result: 1

### Using non zero mask start and length parameters

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

```java
bitMaskClear( 10, 1, 2 );

```

Result: 8

### Additional Examples

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

```java
writeOutput( bitMaskClear( 255, 5, 5 ) );
writeOutput( "<br>" );
writeOutput( bitMaskClear( 255, 0, 4 ) );

```

## Related

* [BinaryDecode](/boxlang-language/reference/built-in-functions/binary/binarydecode.md)
* [BinaryEncode](/boxlang-language/reference/built-in-functions/binary/binaryencode.md)
* [BitAnd](/boxlang-language/reference/built-in-functions/binary/bitand.md)
* [BitMaskRead](/boxlang-language/reference/built-in-functions/binary/bitmaskread.md)
* [BitMaskSet](/boxlang-language/reference/built-in-functions/binary/bitmaskset.md)
* [BitNot](/boxlang-language/reference/built-in-functions/binary/bitnot.md)
* [BitOr](/boxlang-language/reference/built-in-functions/binary/bitor.md)
* [BitSh](/boxlang-language/reference/built-in-functions/binary/bitsh.md)
* [bitShln](/boxlang-language/reference/built-in-functions/binary/bitshln.md)
* [bitShrn](/boxlang-language/reference/built-in-functions/binary/bitshrn.md)
* [BitXor](/boxlang-language/reference/built-in-functions/binary/bitxor.md)


---

# 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/bitmaskclear.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.
