Moves bits in a numeric value to the right by the specified number of positions and returns the resulting value.
Note: |
---|
If the specified expressions are not integers, they are converted to integers before performing the operation. |
BITRSHIFT(nExpression1, nExpression2) |
Parameters
- nExpression1
- Specifies the numeric value in which to move bits to the right.
- nExpression2
- Specifies the number of bit positions to move to the right.
Return Value
Numeric. BITRSHIFT(В ) returns the specified expression with bits moved by the specified number of positions.
Remarks
BITRSHIFT(В ) does not support Varbinary values.
Example
В | Copy Code |
---|---|
x = 5 && 0101 binary y = 1 && Shift bits 1 position right ? BITRSHIFT(x,y) && Returns 2, 0010 binary |