Write out number in binary representation

Is it possible to write out a number in base 2 so the interpreter understands it?

E.g:

local dec = 10 -- base 10
local hex = 0xFFF -- base 16

What about base 2?

1 Like

No, but you can use tonumber to parse a binary number represented as a string:

tonumber('1000', 2) -- 8
11 Likes