font "arial",10,100
input "Number to change to binary up to 1024 ",a
n=10
dim b(n+1)
do
if a-2^n>-1 then
b[n]=1
a=a-2^n
end if
n=n-1
until n<0
for x = 0 to 10
text 290-x*25+10,10,b[x]
text 290-x*25+10,30,b[x]*2^x
next x
This is a set of small programs in Basic-256, related to various topics. Just copy,paste and run. Note : Sometimes programs do not run in recent BASIC 256 versions.
No comments:
Post a Comment