Skip to main content

Integer.bit_shift_l

bit_shift_lthat

Group: Bitwise

Documentation​

Performs a bitwise left-shift on the number. 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_l 4