Binary digits: Difference between revisions

Content deleted Content added
Galileo (talk | contribs)
Galileo (talk | contribs)
Line 4,195: Line 4,195:
0 >ps >ps
0 >ps >ps
( "The decimal value " tps " should produce an output of " ) lprint
( "The decimal value " tps " should produce an output of " ) lprint
ps> 8 int>bit
ps> 20 int>bit
( len 1 -1 ) for
( len 1 -1 ) for
get dup ps> or if print 1 >ps else drop 0 >ps endif
get dup ps> or if print 1 >ps else drop 0 >ps endif
Line 4,209: Line 4,209:
<pre>The decimal value 5 should produce an output of 101
<pre>The decimal value 5 should produce an output of 101
The decimal value 50 should produce an output of 110010
The decimal value 50 should produce an output of 110010
The decimal value 9000 should produce an output of 101000
The decimal value 9000 should produce an output of 10001100101000


=== Press any key to exit ===</pre>
=== Press any key to exit ===</pre>