Registers: R(x), R(y)
Commands:
(s1, R(x), s0, s2, s3) branch commandInitial configuration:(s2, R(x), s4) destructor command
(s3, R(x), s5) destructor command
(s4, R(y), 0, s1) constructor command
(s5, R(y), 1, s1) constructor command
State s1,
R(x) : 01101
R(y) :
Computation:
State s1, Command (s1, R(x), s0, s2, s3)
R(x) : 01101
R(y) :
State s2, Command (s2, R(x), s4)
R(x) : 1101
R(y) :
State s4, Command (s4, R(y), 0, s1)
R(x) : 1101
R(y) : 0
State s1, Command (s1, R(x), s0, s2, s3)
R(x) : 1101
R(y) : 0
State s3, Command (s3, R(x), s5)
R(x) : 101
R(y) : 0
R(x) : 101
R(y) : 10
R(x) : 101
R(y) : 10
R(x) : 01
R(y) : 10
R(x) : 01
R(y) : 110
R(x) : 01
R(y) : 110
R(x) : 1
R(y) : 110
R(x) : 1
R(y) : 0110
R(x) : 1
R(y) : 0110
R(x) :
R(y) : 0110
R(x) :
R(y) : 10110
R(x) :
R(y) : 10110
Input: 01101 Output: 10110
This register machine takes the contents of R(x) and places them in reverse order in R(y).