BitShift

BitShift(<value>, <shift>)

The function returns the bitwise shift result for the passed value.

Parameters

valueThe number on which the operation is being performed.
shiftThe number of bits to shift. A positive number shifts to the right, a negative number shifts to the left.

Related

BitAND, BitNOT, BitOR, BitXOR

Remarks

Bitwise operations are performed as 32-bit integers.

Examples

MsgBox(BitShift(2, -1))   # --> 4
MsgBox(BitShift(16, 1))   # --> 8
MsgBox(BitShift(1, -31))  # --> -2147483648