numof 1 bits in 0 to 255 by AndoDaan

s='0'for c=0,7 do for i=1,2^c do p=1+s:sub(i,i)s=s..p end end print(s)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page