MongoDB Query Language (MQL) Bitwise Operators
Bitwise operators perform bitwise operations on integer values during update operations. These operators allow you to manipulate individual bits within numeric fields using operations like AND, OR, XOR, and bit shifting, useful for flag management and binary data manipulation.
$bitAnd
The $bitAnd operator performs a bitwise AND operation on integer values and returns the result as an integer.
$bitNot
The $bitNot operator performs a bitwise NOT operation on integer values and returns the result as an integer.
$bitOr
The $bitOr operator performs a bitwise OR operation on integer values and returns the result as an integer.
$bitXor
The $bitXor operator performs a bitwise XOR operation on integer values.