You can use the machine just using Ruby to running the main script with some flags:
ruby ./main.rb -m 0011 true
- The first flag need to be
-m
for the multiplication machine or-p
for the power of machine. - The second flag need to be the initial tape state
- The last flag is optional, and means that you wish to have a print of the machine proccess.
The output will be the final state of the tape.
Do 2 * 2 with print process:
ruby ./main.rb -m 0011 true
Do 3 ^ 1 ^ 4 without printing the process:
ruby ./main.rb -p 00010000
Do 2 * 2 * 2 *2 without printing the process:
ruby ./main.rb -m 00110011
---