bit.tonumb
From ComputerCraft Wiki
Revision as of 18:30, 28 November 2012 by AfterLifeLochie (Talk | contribs) (Moved to CAT:APIFunctions)
| Converts an array (numerically-indexed table) containing binary bit values to a number (the inverse of bit.tobits) | |
| Syntax | bit.tonumb(table bit_tbl) |
| Returns | int the number resulting from the conversion of bit_tbl from binary |
| Part of | ComputerCraft |
| API | bit |
Examples
| Convert the binary representation 10010 into its corresponding value, 18 | |
| Code |
t = {}
|
| Output | 18 |
As of ComputerCraft 1.42 the bit library has moved to Java code, and as such this function is no longer required or included.