Freigeben über


BITRSHIFT( ) Function

Returns the result of shifting the bits of a numeric value to the right a specified number of positions.

BITRSHIFT(nExpression1, nExpression2)

Return Values

Numeric

Parameters

  • nExpression1
    Specifies the numeric value whose bits are shifted to the right. If nExpression1 is not an integer, it is converted to an integer before its bits are shifted.
  • nExpression2
    Specifies the number of bit positions to shift. If nExpression2 is not an integer, it is converted to an integer.

Example

x = 5  && 0101 binary
y = 1  && Shift bits 1 position right

? BITRSHIFT(x,y) && Returns 2, 0010 binary

See Also

BITAND( ) | BITCLEAR( ) | BITLSHIFT( ) | BITNOT( ) | BITOR( ) | BITSET( ) | BITTEST( ) | BITXOR( )