of     1   

HalfPinky456
#203464035Sunday, December 04, 2016 4:09 AM GMT

the prize is to feel good about yourself and to provide education to others go go go attempt to call girlfriend (a nil value) | nothin' like a good argument ¯\_(ツ)_/¯
pidgey
#203465179Sunday, December 04, 2016 4:24 AM GMT

num=1 function toBits(num) -- returns a table of bits, least significant first. local t={} -- will contain the bits while num>0 do rest=math.fmod(num,2) t[#t+1]=rest num=(num-rest)/2 end return t end bits=toBits(num) print(table.concat(bits)) thx stackoverflow
lordrambo
#203467247Sunday, December 04, 2016 4:52 AM GMT

tonumber(256, 2) should be 1 with eight 0s following
cntkillme
#203471057Sunday, December 04, 2016 5:41 AM GMT

tonumber converts from another base, not to (i.e. tonumber("101", 2) -> 5) OP a better challenge would be to convert a number in some base to another given an array of possible characters to use.

    of     1