title | titleSuffix | description | author | ms.author | ms.reviewer | ms.service | ms.subservice | ms.topic | ms.devlang | ms.date | ms.custom |
---|---|---|---|---|---|---|---|---|---|---|---|
IntBitNot |
Azure Cosmos DB for NoSQL |
An Azure Cosmos DB for NoSQL system function that returns the complement of a number. |
jcodella |
jacodel |
sidandrews |
cosmos-db |
nosql |
reference |
nosql |
02/27/2024 |
query-reference |
[!INCLUDENoSQL]
Returns the bitwise complement of the operand. For example, every 1
bit individually yields 0
for the corresponding bit in the result. For more information, see bitwise complement operator.
IntBitNot(<int_expr>)
Description | |
---|---|
int_expr |
An integer expression, which is used as the sole operand. |
Returns a 64-bit integer.
Note
For more information, see __int64.
This example tests the function with various static values.
:::code language="nosql" source="~/cosmos-db-nosql-query-samples/scripts/intbitnot/query.novalidate.sql" highlight="2-4":::
:::code language="json" source="~/cosmos-db-nosql-query-samples/scripts/intbitnot/result.novalidate.json":::
- This function expects integers for both arguments and performs operations assuming the values are a 64-bit integer.
- If any of the arguments aren't an integer, the function returns undefined.
- Overflow behavior is similar to the implementation in C++ (wrap-around).