Bitwise Expression Functions

This family of functions can be used to perform Bitwise operations on numbers or a group of numeric records.

Function Name Syntax Example Summary Description
BITAND BITAND(a, b) Bitwise AND of two numeric expressions (a and b).
BITAND_AGG BITAND_AGG(a) Same as BITAND, but across all numeric records in group a.
BITNOT BITNOT(a) Bitwise negation of a numeric expression.
BITOR BITOR(a, b) Bitwise OR of two numeric expressions.
BITOR_AGG BITOR_AGG(a) Same as BITOR, but across all numeric records in group a.
BITSHIFTLEFT BITSHIFTLEFT(a, n) Shift the bits for a numeric expression n positions to the left.
BITSHIFTRIGHT BITSHIFTRIGHT(a, n) Shift the bits for a numeric expression n positions to the right, with sign extension.
BITXOR BITXOR(a, b) Bitwise XOR of two numeric expressions.
BITXOR_AGG BITXOR_AGG(a) Same as BITXOR, but across all numeric records in group a.