IFX_BIT_RIGHTSHIFT Function

The IFX_BIT_RIGHTSHIFT function performs a bit right shift operation on an integer or bigint value and returns the shift result.

The IFX_BIT_RIGHTSHIFT function performs a bit right shift operation on an integer or bigint value and returns the shift result. It takes as arguments an integer or bigint operand and an integer operator. The type of the operand will be the function's return type. The operator determines the number of bits by which the passed in value gets shifted to the right, its value should range between 0 and 31 for integer operands, and between 0 and 63 for bigint operands (any other values might be taken as their modulo of 32 or 64 respectively, but that's not guaranteed).
Example:

select name, IFX_BIT_RIGHTSHIFT(partnum, 20) as dbspace_num
  from sysmaster:sysdatabases;