Counts the number of bits in `x`.
Parameters
x:
int64
The input value.
bits:
int64
The bit width to operate within.
Performs bitwise AND operation on two integer values.
Returns the arithmetic right shift operation on x in 2’s complement representation. shift must not be negative.
Parameters
x:
int64
The input value.
shift:
int64
Returns the logical right shift operation on x (treated as bits-bit integer) shifted by shift. shift must not be negative.
Parameters
x:
int64
The input value.
shift:
int64
bits:
int64
The bit width to operate within.
Performs bitwise NOT operation (complement) on an integer value.
Performs bitwise OR operation on two integer values.
Returns the left shift operation on x (treated as bits-bit integer) shifted by shift. shift must not be negative.
Parameters
x:
int64
The input value.
shift:
int64
bits:
int64
The bit width to operate within.
Performs bitwise XOR operation on two integer values.
Applies boolean AND or bitwise AND to two values.
Examples
SELECT TRUE & FALSE;
| TRUE & FALSE |
| ------------ |
| false        |
SELECT 6 & 3;
| 6 & 3 |
| ----- |
| 2     |
Overloads
Applies boolean OR or bitwise OR to two values.
Examples
SELECT TRUE | FALSE;
| TRUE \| FALSE |
| ------------- |
| true          |
SELECT 4 | 1;
| 4 \| 1 |
| ------ |
| 5      |
Overloads
Applies boolean NOT or bitwise NOT to a value.
Examples
SELECT ~TRUE;
| ~TRUE |
| ----- |
| false |
Overloads
▲~x
▲~x
▲~x
▲~x
▲~x
▲~x