Binary digits: Difference between revisions

(→‎{{header|EasyLang}}: Rewritten EasyLang)
Line 5,065:
next
</syntaxhighlight>
=={{header|RPL}}==
RPL handles both floating point numbers and binary integers, but the latter are visualized with a <code>#</code> at the beginning and a specific letter at the end identifying the number base, according to the current display mode setting. 42 will then be displayed # 42d, # 2Ah, # 52o or # 101010b depending on the display mode set by resp. <code>DEC</code>, <code>HEX</code>, <code>OCT</code> or <code>BIN</code>.
 
To comply with the task, we have just to remove these characters.
{{works with|Halcyon Calc|4.2.7}}
≪ BIN R→B →STR 3 OVER SIZE 1 - SUB ≫
'→PLNB' STO
 
42 →PLNB
{{out}}
<pre>
2A
</pre>
 
=={{header|Ruby}}==
<syntaxhighlight lang="ruby">[5,50,9000].each do |n|
Line 5,077 ⟶ 5,091:
110010
10001100101000</pre>
 
=={{header|Run BASIC}}==
<syntaxhighlight lang="runbasic">input "Number to convert:";a
1,150

edits