Shifts a number's bits to the right.

Syntax

BITZRSHIFT(<int expN>, <shift expN>)

<int expN>

A 32-bit integer.

<shift expN>

The number of places to shift, from 0 to 32.

Description

BITZRSHIFT( ) moves each bit in the numeric value <int expN> to the right the number of times you specify in <shift expN>. Each time the bits are shifted, the most significant bit (bit 31, the bit farthest to the left) is set to 0, and the least significant bit (bit 0, the bit farthest to the right) is lost.

Shifting a number’s bits to the right once has the effect of dividing the number by two, dropping any fractions.

Like most other bitwise functions, BITZRSHIFT( ) treats <int expN> as an unsigned integer. To shift a signed integer, use BITRSHIFT( ) instead.