n = 1024
repeat while n>0
put n
n = n/2 -- integer division implicitely returns floor: 1/2 -> 0
end repeat