Skip to main content

Integer.bit_shift

bit_shiftthat

Group: Bitwise

Documentation

Shifts the bits of this by the amount that. Left-shifts fill the new bits with zeroes, while right-shifts perform sign extension. Returns an error if the shift amount exceeds 2^32.

Arguments

  • that: The number of bits by which the shift should be performed. Positive numbers perform a left-shift, while negative numbers perform a right-shift.

Examples

Shift the bits of the number 1 left by four bits.

      1.bit_shift 4