Difference between revisions of "Bit.blshift"

From ComputerCraft Wiki
Jump to: navigation, search
(Anh em Ta voi nhau coi nap)
(Undo revision 1809 by 37.59.80.67 (talk))
Line 1: Line 1:
Hello my friend heres my new gig easy as it looks Ill send u a total of 5350++ backlinks to your website in 2 tiers. This gig its for 1 website and up to 5 keywords. First tier to your main website 350 page rank 1-5 and the the second tier of 5000 profile backlinks pointing to your first tier.Ill send u a report in a txt file in less than 48 hours.Any question just send me a private message
+
{{lowercase}}
 +
{{Function
 +
|name=bit.blshift
 +
|args=[[int (type)|int]] n, [[int (type)|int]] bits
 +
|api=bit
 +
|returns=[[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
 +
}}
 +
}}

Revision as of 14:23, 24 June 2012


Grid Redstone.png  Function bit.blshift
Shifts a number left by a specified number of bits
Syntax bit.blshift(int n, int bits)
Returns int the value of n shifted left by bits bits, which is equivalent to n×2bits
Part of ComputerCraft
API bit

Examples

Grid paper.png  Example
Shift the number 18 (10010) left by 2 bits, yielding 72 (1001000)
Code
print(bit.blshift(18, 2))
Output 72