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

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 (a and b).

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 (a and b).

BITXOR_AGG

BITXOR_AGG(a)

Same as BITXOR, but across all numeric records in group a.

GETBIT

GETBIT(a, n)

Get the bit at position n in a numeric expression.