FANDOM


Syntax

LSH integer integer

Explanation

LSH outputs the first input logically shifted the number of bit positions specified by the second input. If the second input is positive, the logical shift is to the right. If the second input is negative, the logical shift is to the left.

Examples

? LSH 2 1

Result: 1

?

2 in base 10 is 10 in base 2. 10 shifted one bit right is 1; 1 in base 2 is 1 in base 10.

? LSH 2 -1

Result: 4

?

2 in base 10 is 10 in base 2. 10 shifted one bit left is 100; 100 in base 2 is 4 in base 10.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.