MongoDB Query Language (MQL) Bitwise Query Operators
Bitwise query operators perform bitwise operations to match documents based on bit patterns in numeric fields. These operators enable you to query documents by checking whether specific bit positions are set or clear, useful for flag-based filtering and binary data manipulation.
$bitsAllClear
The $bitsAllClear operator is used to match documents where all the bit positions specified in a bitmask are clear.
$bitsAllSet
The bitsAllSet command is used to match documents where all the specified bit positions are set.
$bitsAnyClear
The $bitsAnyClear operator matches documents where any of the specified bit positions in a bitmask are clear.
$bitsAnySet
The $bitsAnySet operator returns documents where any of the specified bit positions are set to 1.