Binary digits: Difference between revisions
Content deleted Content added
Not a robot (talk | contribs) Add MAD |
Not a robot (talk | contribs) Add FOCAL |
||
Line 2,022: | Line 2,022: | ||
pause |
pause |
||
</lang> |
</lang> |
||
=={{header|FOCAL}}== |
|||
<lang FOCAL>01.10 S A=5;D 2 |
|||
01.20 S A=50;D 2 |
|||
01.30 S A=9000;D 2 |
|||
01.40 Q |
|||
02.10 S BX=0 |
|||
02.20 S BD(BX)=A-FITR(A/2)*2 |
|||
02.25 S A=FITR(A/2) |
|||
02.30 S BX=BX+1 |
|||
02.35 I (-A)2.2 |
|||
02.40 S BX=BX-1 |
|||
02.45 D 2.6 |
|||
02.50 I (-BX)2.4;T !;R |
|||
02.60 I (-BD(BX))2.7;T "0";R |
|||
02.70 T "1"</lang> |
|||
{{out}} |
|||
<pre>101 |
|||
110010 |
|||
10001100101000</pre> |
|||
=={{header|Forth}}== |
=={{header|Forth}}== |