-
# State Head Write Move Next -
-
Unary multiplication by 2
A machine that reads from the tape an integer in unary notation (n is represented by a list of n occurrences of the symbol 1) and writes it back doubled.
Instructions: click the link above; when the machine has been loaded, click the tape head (the cell with a large black border), type
1
as many times as you like, press theEnter
key and hit the play button.After the machine halts, if you hit the stop button, then the play button again it will duplicate again the latest result.
-
Binary increment by one
A machine that reads from the tape an integer in binary notation and writes it back incremented by one.
Instructions: click the link above; when the machine has been loaded, click the tape head (the cell with a large black border), type a sequence of
1
s and0
s, press theEnter
key and hit the play button.After the machine halts, if you hit the stop button, then the play button again it will increment again the latest result.
-
Binary addition
A machine that reads from the tape two integers in binary notation, separated by a blank, and writes back their sum.
Instructions: click the link above; when the machine has been loaded, click the tape head (the cell with a large black border), type a sequence of
1
s and0
s, pressSpace
, then type again a sequence of1
s and0
s, press theEnter
key and hit the play button.
-
Unary multiplication by 2