Logo

Programming-Idioms

History of Idiom 76 > diff from v26 to v27

Edit summary for version 27 by :

Version 26

2015-09-03, 15:46:11

Version 27

2015-09-04, 08:46:09

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"

Code
Integer.to_string(x, 2)
Doc URL
http://elixir-lang.org/docs/v1.0/elixir/Integer.html#to_string/2
Demo URL
http://play.elixirbyexample.com/s/b73b898ff9