Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Implementation edit is for fixing errors and enhancing with metadata.

Instead of changing the code of the snippet, consider creating another Lua implementation.

Other implementations
import "strconv"
s := strconv.FormatInt(x, 2)
import "fmt"
import "math/big"
s := fmt.Sprintf("%b", x)
import std.conv;
auto s = to!string(x,2);
var Iter,n:integer;
  S := '';
  for Iter := 0 to n do
    s:= Char(Ord('0')+(x shr Iter) and 1) + S;   
let s = format!("{:b}", x);
$s = sprintf("%b", $x);
  _x: Integer;
  _s: String;
  _s := IntToBin(_x,8*SizeOf(Integer));
var s = x.toRadixString(2);
$s = sprintf "%b", $x;
import Numeric (showIntAtBase)
import Data.Char (intToDigit)
s x = showIntAtBase 2 intToDigit x ""
s = x.to_s(2)
s = Integer.to_string(x, 2)
s = '{:b}'.format(x)
S = io_lib:format("~.2B~n", [X]).
String s = Integer.toBinaryString(x);
let s = x.toString(2);
String s = Convert.ToString(x,2);
write (unit=s,fmt='(B0)') x
#include <bitset>
std::bitset<sizeof(x)*8> y(x);
auto s = y.to_string();
Integer.digits(x, 2) |> Enum.join("")
import Data.List
foldl (\acc -> (++ acc) . show) "" . unfoldr (\n -> if x == 0 then Nothing else Just (x `mod` 2, x `div` 2))
String s = Convert.ToString(x,2).PadLeft(16, '0');
write (unit=s,fmt='(B32)') x