apoc.bitwise.op
Syntax |
|
||
Description |
Returns the result of the bitwise operation |
||
Arguments |
Name |
Type |
Description |
|
|
The lefthand side value of the bitwise operation. |
|
|
|
The type of bitwise operation to perform. |
|
|
|
The righthand side value of the bitwise operation. |
|
Returns |
|
Usage examples
AND (a & b)
RETURN apoc.bitwise.op(60,"&",13) AS output;
output |
---|
12 |
OR (a | b)
RETURN apoc.bitwise.op(60,"|",13) AS output;
output |
---|
61 |
XOR (a ^ b)
RETURN apoc.bitwise.op(60,"&",13) AS output;
output |
---|
49 |
NOT (~a)
RETURN apoc.bitwise.op(60,"~",0) AS output;
output |
---|
-61 |
LEFT SHIFT (a << b)
RETURN apoc.bitwise.op(60,"<<",2) AS output;
output |
---|
240 |
RIGHT SHIFT (a >> b)
RETURN apoc.bitwise.op(60,">>",2) AS output;
output |
---|
15 |
UNSIGNED RIGHT SHIFT (a >> b)
RETURN apoc.bitwise.op(60,">>>",2) AS output;
output |
---|
15 |