In This Topic

BITRSHIFT

In This Topic

This function calculates the value shifted right by specified number of bits.

BITRSHIFT(*value, shift_amt*)

This function has the following arguments:

Argument | Description |
---|---|

value |
Refers to the value that you want to shift. |

shift_amt |
Refers to the number of bits to be shifted by. |

Shifting a number right is similar to removing digits from right end of the binary representation of the number. If *shift_amt* is a negative number, then *value* will be shifted to left.

Accepts numeric data for both arguments. Returns numeric data.

BITRSHIFT(5,2) gives the result 1.

BITRSHIFT(15,2) gives the result 3.

See Also