# BitNot

Performs a bitwise logical NOT operation.

## Method Signature

```
BitNot(number=[integer])
```

### Arguments

| Argument | Type      | Required | Description                    | Default |
| -------- | --------- | -------- | ------------------------------ | ------- |
| `number` | `integer` | `true`   | Numeric value for bitwise NOT. |         |

## Examples

### Calculate bitwise logical NOT

Uses the bitNot function to perform the logical NOT operation of a signed 32-bit integer (two's complement)

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

```java
bitNot( 0 );

```

Result: -1

### Additional Examples

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

```java
writeOutput( bitNot( 0 ) );
writeOutput( "<br>" );
writeOutput( bitNot( 255 ) );

```

## 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)
* [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)
* [BitXor](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/binary/bitxor)
