SpreadJS Documentation
BITRSHIFT
SpreadJS Documentation > Formula Reference > Formula Functions > BITRSHIFT

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

Syntax

BITRSHIFT(value, shift_amt)

Arguments

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.

Remarks

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.

Data Types

Accepts numeric data for both arguments. Returns numeric data.

Examples

BITRSHIFT(5,2) gives the result 1.

BITRSHIFT(15,2) gives the result 3.

See Also