This language bar is your friend. Select your favorite languages!
Edit summary for version 7 :

Version 6

Version 7

Idiom #76 Binary digits from an integer

Create the string s of integer x written in base 2.

E.g. 13 -> "1101"

Idiom #76 Binary digits from an integer

Create the string s of integer x written in base 2.

E.g. 13 -> "1101"

Imports
import std.conv;
Code
auto str = to!string(13,2);
Comments bubble
using std.conv.to(int value, radix)
Demo URL
http://dpaste.dzfl.pl/e384473470a0