Difference between revisions of "Bit.tobits"
From ComputerCraft Wiki
(Use type template, plus *presumed* fix to example code (untested due to function no longer existing))
(Now perhaps jesusthekiller won't submit false bugreports.)
|Line 1:||Line 1:|
Revision as of 18:36, 1 June 2013
| This function has been deprecated.|
This function has been removed from ComputerCraft .
|Converts a number to an array (numerically-indexed table) containing the corresponding binary bit values (the inverse of bit.tonumb)|
|Returns||table the bits making up the value n, with entries up to the most-significant 1 bit in n|
|Convert the number 18 into its binary representation (10010)|
for k, v in pairs(bit.tobits(18)) do print(k, ", ", v) end
As of ComputerCraft 1.42 the bit library has moved to Java code, and as such this function is no longer required or included.