Math: Bitwise Functions
Docs are available before the release of Designer Cloud so you can get a sneak peek. This content might change between now and the official release.
A bitwise function operates on one or more bit patterns or binary numerals at the level of their individual bits. Use a bitwise function to manipulate values for comparisons and calculations. Bitwise functions can only be used with Number data types.
BinaryAnd(n,m): Returns a binary of (n) and (m). The result is 1 if both n and m are 1, and 0 otherwise. If 0 is equated with false, and 1 with true the BinaryAnd operation works like a logical And.
BinaryAnd(1,1) returns 1.
BinaryAnd(1,0) returns 0.
BinaryNot(n): Returns a Binary Not of (n).
BinaryNot(6) returns -7.
BinaryNot(2) returns -3.
BinaryOr(n,m): Returns a Binary Or of (n) and (m).
BinaryOr(6,6) returns 6.
BinaryOr(6,2) returns 6.
BinaryXOr(n,m): Returns a Binary XOr of (n) and (m).
BinaryXOr(6,6) returns 0.
BinaryXOr(6,2) returns 4.
ShiftLeft(n,b): Left shifts (n) (as integer) by (b) bits.
ShiftRight(n,b): Right shifts (n) (as integer) by (b) bits.