apoc.bitwise.op
Function APOC Core
apoc.bitwise.op(60,'|',13) bitwise operations a & b, a | b, a ^ b, ~a, a >> b, a >>> b, a << b. returns the result of the bitwise operation
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 |