VocabularymathInputs and outputsWord descriptionShifts
x to the left by
n bits if
n is positive, or
-n bits to the right if
n is negative. A left shift of a fixnum may overflow, yielding a bignum. A right shift may result in bits “falling off” the right hand side and being discarded.
ExamplesUSING: math prettyprint ;
0b101 5 shift .b
10100000
USING: math prettyprint ;
0b11111 -2 shift .b
111
DefinitionMethods