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

# Bitor

# \$bitOr

The `$bitOr` operator performs a bitwise OR operation on integer values.

## Input

* An array of integer values (at least 2 values required)

## Output

* The result of performing a bitwise OR operation on all input values

## Examples

### Basic Bitwise OR

```json theme={null}
{
  "$bitOr": [
    5,
    3
  ]
}
```

Result: `7` (binary: 101 OR 011 = 111)

### Multiple Values

```json theme={null}
{
  "$bitOr": [
    4,
    2,
    1
  ]
}
```

Result: `7` (binary: 100 OR 010 OR 001 = 111)

### Field Value

```json theme={null}
{
  "$bitOr": [
    {
      "$input": "flag1"
    },
    {
      "$input": "flag2"
    }
  ]
}
```

Result: The bitwise OR of flag1 and flag2 fields
