TRUECALC
Functions

BITRSHIFT

Right-shift an integer by a number of bits

Try it

When to use it

When should I use BITRSHIFT?

Use BITRSHIFT to divide an integer by a power of two by shifting its bits right, which is useful for extracting upper bit fields or fast integer division.

Used in

engineering · science

Syntax

BITRSHIFT(number, shift_amount)

Examples

=BITRSHIFT(8,2) // => 2
=BITRSHIFT(18,2) // => 4
=BITRSHIFT(16,4) // => 1

On this page