BITRSHIFT function

BITRSHIFT(Number, ShiftAmount) BITRSHIFT(Number; ShiftAmount)

Number

Number or { Number }

The number to be shifted right.

ShiftAmount

Number or { Number }

The number of bits to shift the number.

Returns

Number or { Number }

The result.

Shifts a number right by the specified number of bits.

Examples

DEC2BIN(BITRSHIFT(BIN2DEC("00010011"), 2), 8)DEC2BIN(BITRSHIFT(BIN2DEC("00010011"); 2); 8)

Returns "00000100".

BITRSHIFT(19, 2)BITRSHIFT(19; 2)

Returns 4. This example is equivalent to the preceding example, but does not convert the decimal numbers to binary to ease readability.