This language bar is your friend. Select your favorite languages!

Idiom #76 Binary digits from an integer

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

E.g. 13 -> "1101"

#Edit dateEdit SummaryEditor
👁 Δ 61 2019-10-14, 11:55 [Elixir] Revert code, fix URLs programming-idioms.org
👁 Δ 60 2019-09-28, 16:49 [Cpp] oops example12345
👁 Δ 59 2019-09-28, 16:48 [Cpp] snafoo example12345
👁 Δ 58 2019-09-28, 16:46 [Cpp] sizeof example12345
👁 Δ 57 2019-09-28, 16:42 New Cpp implementation by user [example12345] example12345
👁 Δ 56 2019-09-28, 09:48 New Fortran implementation by user [tkoenig] tkoenig
👁 Δ 55 2019-09-26, 21:16 [Haskell] Use imports leif
👁 Δ 54 2019-09-26, 16:12 New Csharp implementation by user [Nikola Sivkov] Nikola Sivkov
👁 Δ 53 2019-07-10, 12:19 Admin deletes impl 1501: Does not convert x to a string programming-idioms.org
👁 Δ 52 2019-07-09, 02:22 [Csharp] convert binary to integer Ushiosan23
👁 Δ 51 2019-06-20, 06:20 [Elixir] covert haa
👁 Δ 50 2019-06-20, 06:13 [Elixir] convert elixir program haa
👁 Δ 49 2017-09-29, 15:02 Admin deletes impl 2126 programming-idioms.org
👁 Δ 48 2017-09-26, 01:46 New Python implementation by user [bingoabs] bingoabs
👁 Δ 47 2017-08-21, 19:43 Admin deletes impl 709 programming-idioms.org
👁 Δ 46 2017-08-21, 19:42 [Lua] No need for sample values programming-idioms.org
👁 Δ 45 2017-08-21, 13:21 New Lua implementation by user [Bug38] Bug38
👁 Δ 44 2017-04-20, 21:50 [Ruby] removed the sprintf line, aiming for simplest solution steenslag
👁 Δ 43 2016-11-11, 16:17 +keywords programming-idioms.org
👁 Δ 42 2016-08-14, 16:31 [Java] Missing semicolon programming-idioms.org
👁 Δ 41 2016-08-14, 16:24 Linked to idiom #142 [Hexadecimal digits of an integer] programming-idioms.org
👁 Δ 40 2016-02-18, 16:58 New Csharp implementation by user [javasucks]
👁 Δ 39 2016-02-17, 11:21 New Csharp implementation by user [javasucks]
👁 Δ 38 2016-02-16, 20:27 New JS implementation by user [Worms]
👁 Δ 37 2016-01-01, 01:32 [Java] +DocURL
👁 Δ 36 2016-01-01, 00:21 New Java implementation by user [lck]
👁 Δ 35 2015-12-30, 13:58 [Go]+DocURL to strconv.FormatInt
👁 Δ 34 2015-12-30, 13:57 [Go]+DocURL to package fmt
👁 Δ 33 2015-12-18, 03:14 New Erlang implementation by user [elbrujohalcon]
👁 Δ 32 2015-11-30, 12:37
👁 Δ 31 2015-10-31, 14:31
👁 Δ 30 2015-10-31, 14:27
👁 Δ 29 2015-10-29, 14:05
👁 Δ 28 2015-09-04, 09:09
👁 Δ 27 2015-09-04, 08:46
👁 Δ 26 2015-09-03, 15:46
👁 Δ 25 2015-09-03, 15:45
👁 Δ 24 2015-09-03, 15:04
👁 Δ 23 2015-08-31, 11:23
👁 Δ 22 2015-08-22, 23:24
👁 Δ 21 2015-08-22, 23:09
👁 Δ 20 2015-08-22, 22:48
👁 Δ 19 2015-08-22, 22:48
👁 Δ 18 2015-08-22, 21:57
👁 Δ 17 2015-08-22, 15:43
👁 Δ 16 2015-08-22, 15:42
👁 Δ 15 2015-08-22, 15:30
👁 Δ 14 2015-08-22, 14:58
👁 Δ 13 2015-08-21, 23:37
👁 Δ 12 2015-08-21, 23:36
👁 Δ 11 2015-08-21, 15:11
👁 Δ 10 2015-08-21, 14:49
👁 Δ 9 2015-08-21, 14:09
👁 Δ 8 2015-08-21, 14:09
👁 Δ 7 2015-08-21, 14:06
👁 Δ 6 2015-08-21, 13:56
👁 Δ 5 2015-08-21, 13:46
👁 Δ 4 2015-08-21, 13:45
👁 Δ 3 2015-08-21, 13:38
👁 Δ 2 2015-08-21, 13:37
1 2015-08-21, 13:37