GETBITS

GETBITS(integer, bitstartpos, length);

Example:

##GETBITS("NUM", 5, 3)
If "NUM" has the value "01100101" (binary data) it will return the result "101".