Coding 2^x with only +1 / -1 operations (unary append / remove a bit)

Solution 1:

The base solution is:

r2 = 1
r1 loop: double r2

(pseudocodish, imagine "rx loop" to mean the empty rx, loop body, pop rx, goto combination you already used in the example code)

You can double r2 using concat. I wonder if concat r2,r2 is allowed... :) Can we double r2 using the other operations and r3 instead?

like:

r3 = 0
r2 loop: {
   push r3
   push r3
}

and then copy it back into r2:

r3 loop: push r2

All enclosed in the r1 loop from the beginning of course. I'll leave translating the pseudocode into the real instructions to you.