Difference between revisions of "Shift left"
From WikiManual
m |
|||
Line 1: | Line 1: | ||
− | It picks two stack values shifts the first one's bits the amount specified by the second one. | + | It picks two stack values and shifts the first one's bits the amount specified by the second one. |
Shifting 1 by x will return the x power of 2. | Shifting 1 by x will return the x power of 2. |
Revision as of 11:51, 11 August 2007
It picks two stack values and shifts the first one's bits the amount specified by the second one.
Shifting 1 by x will return the x power of 2.
Shifting x by 1 is the same as multiplying it by 2.
Shifting x by 2 is the same as multiplying it by 4.
Shifting x by 3 is the same as multiplying it by 8, and so on.