Interesting programs on small machines I am teaching a course and have a tiny implementation of a counter-style machine that has the following instructions and two registers, r0 &amp; r1

INC ri   ; ri &lt;- ri + 1
DEC ri  ; ri &lt;- r1 - 1
JNZ  address    ; if (r0 != 0) then jump to &lt;address&gt;. Else, skip.
LDR ri, address  ; load value at &lt;address&gt; into ri
STR ri, address  ; store the value in &lt;ri&gt; to &lt;address&gt;


What interesting programs can I make using this instruction set using no more than 16 instructions (the range of my address space).

So far, the best I have is "check if memory contains an odd value in the range 0-7"

Also, does it help if I add the following instruction:

JLT address ; if (r0 &lt; 0) then jump to &lt;address&gt;. Else, skip.
even many simple counter machines have been proven Turing complete and this result might be surprising to nonresearchers (or researchers who dont specialize in the area). suggest a more relevant research question would be to review the existing models (many listed on wikipedia), determine if yours fits into them anywhere, and if it does not, describe the precise difference with one of the "nearest" models analyzed in the literature.