> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metrics-man.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bitnot

# \$bitNot

The `$bitNot` operator performs a bitwise NOT (complement) operation on an integer value.

## Input

* A single integer value

## Output

* The result of performing a bitwise NOT operation on the input value

## Examples

### Basic Bitwise NOT

```json theme={null}
{
  "$bitNot": [
    5
  ]
}
```

Result: `-6` (binary: ...11111010, two's complement of 5)

### Field Value

```json theme={null}
{
  "$bitNot": [
    {
      "$input": "value"
    }
  ]
}
```

Result: The bitwise NOT of the value field
