1 DIM V(16)
10 INPUT A: INPUT B: INPUT C: FOR I = A TO B STEP C
20 C2 = LOG(I) / LOG(2)
30 FOR J = 0 TO C2: K = 2 ^ (J - 1): V(J) = (I MOD K) + K: NEXT J
50 FOR J = 0 TO C2: PRINT INT(V(J));: NEXT J: PRINT I
60 NEXT I
