bit operations #
Bitwise right shift, usually accessed via the >>> operator.
Interprets the integer as an infinite sequence of bits in two's complement and shifts the value to the right.
Examples:
( 0b0111 : Int) >>> 1 = 0b0011( 0b1000 : Int) >>> 1 = 0b0100(-0b1000 : Int) >>> 1 = -0b0100(-0b0111 : Int) >>> 1 = -0b0100
Equations
Instances For
Bitwise left shift, usually accessed via the <<< operator.
Examples:
1 <<< 2 = 41 <<< 3 = 80 <<< 3 = 00xf1 <<< 4 = 0xf10(-1) <<< 3 = -8