From ComputerCraft Wiki
Revision as of 18:37, 1 June 2013 by AfterLifeLochie (Talk | contribs) (Now perhaps jesusthekiller won't submit false bugreports.)

Jump to: navigation, search

This function has been deprecated.
This function has been removed from ComputerCraft in version 1.42.

Grid Redstone.png  Function bit.tonumb
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


Grid paper.png  Example
Convert the binary representation 10010 into its corresponding value, 18
t = {}
t[1] = 0
t[2] = 1
t[3] = 0
t[4] = 0
t[5] = 1
Output 18