Difference between revisions of "Bit.blshift"

From ComputerCraft Wiki
Jump to: navigation, search
m (Int linking fix.)
(jsfdhngikvj)
Line 1: Line 1:
{{lowercase}}
+
igudfvjkhvbui jk
{{Function
+
|name=bit.blshift
+
|args=[[int (type)|int]] n, [[int (type)|int]] bits
+
|api=bit
+
|returns=[[int (type)|int]] the value of <var>n</var> shifted left by <var>bits</var> bits, which is equivalent to <var>n</var>×2<sup><var>bits</var></sup>
+
|addon=ComputerCraft
+
|desc=Shifts a number left by a specified number of bits
+
|examples=
+
{{Example
+
|desc=Shift the number 18 (10010) left by 2 bits, yielding 72 (1001000)
+
|code=print(bit.blshift(18, 2))
+
|output=72
+
}}
+
}}
+
 
+
[[Category:API_Functions]]
+

Revision as of 17:10, 4 December 2012

igudfvjkhvbui jk