Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Post History

60%
+1 −0
Challenges Make my value binary

Embed ESCR, 16 characters [int n "base 2"] The INT function produces the text representation of an integer with lots of formatting options. The only non-default option needed was to set the numb...

posted 2y ago by Olin Lathrop‭  ·  edited 2y ago by Olin Lathrop‭

Answer
#2: Post edited by user avatar Olin Lathrop‭ · 2022-02-11T18:58:44Z (about 2 years ago)
  • Embed <a href="http://www.embedinc.com/pic/escr">ESCR</a>, 16 characters
  • <pre>[int n "base 2"]</pre>
  • The INT function produces the text representation of an integer with lots of formatting options. The only non-default option needed was to set the number base to 2.
  • Full example:
  • <pre>loop with n from 0 to 10
  • show n ": " [int n "base 2"]
  • endloop</pre>
  • and its output:
  • <pre>0: 0
  • 1: 1
  • 2: 10
  • 3: 11
  • 4: 100
  • 5: 101
  • 6: 110
  • 7: 111
  • 8: 1000
  • 9: 1001
  • 10: 1010</pre>
  • 16 characters: OK<br>
  • Readability: priceless
  • <h2>Embed <a href="http://www.embedinc.com/pic/escr">ESCR</a>, 16 characters</h2>
  • <pre>[int n "base 2"]</pre>
  • The INT function produces the text representation of an integer with lots of formatting options. The only non-default option needed was to set the number base to 2.
  • Full example:
  • <pre>loop with n from 0 to 10
  • show n ": " [int n "base 2"]
  • endloop</pre>
  • and its output:
  • <pre>0: 0
  • 1: 1
  • 2: 10
  • 3: 11
  • 4: 100
  • 5: 101
  • 6: 110
  • 7: 111
  • 8: 1000
  • 9: 1001
  • 10: 1010</pre>
  • 16 characters: OK<br>
  • Readability: priceless
#1: Initial revision by user avatar Olin Lathrop‭ · 2022-02-11T17:29:21Z (about 2 years ago)
Embed <a href="http://www.embedinc.com/pic/escr">ESCR</a>, 16 characters

<pre>[int n "base 2"]</pre>

The INT function produces the text representation of an integer with lots of formatting options.  The only non-default option needed was to set the number base to 2.

Full example:

<pre>loop with n from 0 to 10
  show n ": " [int n "base 2"]
  endloop</pre>

and its output:

<pre>0: 0
1: 1
2: 10
3: 11
4: 100
5: 101
6: 110
7: 111
8: 1000
9: 1001
10: 1010</pre>

16 characters: OK<br>
Readability: priceless