---
title: BitwiseExpression type | Wartiva GraphQL API
description: Perform bit-level operations (AND, OR, XOR, shifts) on packet data or metadata values. Wartiva GraphQL API reference with arguments, fields, and examples.
url: https://wartiva.com/api-docs/types/bitwise-expression.html
updated: 2026-10-07
---

Endpoint configuration · GraphQL type

# `BitwiseExpression` type

Perform bit-level operations (AND, OR, XOR, shifts) on packet data or metadata values.

## Fields

| Field Name | Description |
|---|---|
| `sourceRegister` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | Register index holding the input value. |
| `destRegister` - [`NftRegister!`](https://wartiva.com/api-docs/types/nft-register.html) | Register index where the result is stored. |
| `len` - [`Uint32!`](https://wartiva.com/api-docs/types/uint32.html) | Number of bytes to operate on. |
| `mask` - [`Binary!`](https://wartiva.com/api-docs/types/binary.html) | Bitmask applied with AND. |
| `xor` - [`Binary!`](https://wartiva.com/api-docs/types/binary.html) | Bitmask applied with XOR. |

## Used by

- [`ChainExpression`](https://wartiva.com/api-docs/types/chain-expression.html) union: A union of all possible nftables chain expression types.

## Example

### Example

```json
{
  "sourceRegister": "VERDICT",
  "destRegister": "VERDICT",
  "len": "1073741824",
  "mask": Binary,
  "xor": Binary
}

```

---

Wartiva is in early access. Request access: https://wartiva.com/early-access.html  
All pages: https://wartiva.com/llms.txt
