--Zeehkers
function int2bin(a)
local b = a
local c = ""
while b > 0 do
b = b / 2
if b > math.floor(b) and b < math.floor(b) + 1 then
c = c.."1"
else
c = c.."0"
end
b = math.floor(b)
print(string.reverse(c))
function bin2int(a)
local b = 0
for c = 1, #tostring(a), 1 do
b = b + math.floor((string.sub(a, c, c)) * 2 ^ ((#tostring(a) - c)))
print(tostring(b))
int2bin(100)
bin2int(1100100)
1100100 100