Binary digits: Difference between revisions

Content added Content deleted
(Added Epoxy)
Line 2,208: Line 2,208:
110010
110010
10001100101000
10001100101000
</pre>

=={{header|Epoxy}}==
<lang epoxy>fn bin(a,b:true)
var c:""
while a>0 do
c,a:tostring(a%2)+c,bit.rshift(a,1)
cls
if b then
c:string.repeat("0",16-#c)+c
cls
return c
cls

var List: [5,50,9000]

iter Value of List do
log(Value+": "+bin(Value,false))
cls</lang>
{{out}}
<pre>
5: 101
50: 110010
9000: 10001100101000
</pre>
</pre>