Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6aab50
commit 792b4ce
Showing
5 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
There are two simple Turing Machine programs that increment a unary number. | ||
|
||
inc1 the most naïve possible implementation of incrementing a number by 1. | ||
|
||
incby takes two unary numbers and increment the second one by the value of the first one | ||
|
||
e.g.: 1101110… ⇒ 110111110… | ||
|
||
-- Vadim Zaytsev, http://grammarware.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
J06 | ||
MF | ||
J12 | ||
W1 | ||
MF | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
J0 stop | ||
L skip | ||
MF | ||
J1 skip | ||
W1 | ||
MF | ||
L stop | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
J015 | ||
W0 | ||
MF | ||
J13 | ||
MF | ||
J15 | ||
W1 | ||
MB | ||
J18 | ||
MB | ||
J110 | ||
W1 | ||
MF | ||
J12 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
J0 stop | ||
L incby | ||
W0 | ||
REP 2 { | ||
L skip4 | ||
MF | ||
J1 skip4 | ||
} | ||
W1 | ||
REP 2 { | ||
L back3 | ||
MB | ||
J1 back3 | ||
} | ||
W1 | ||
MF | ||
J1 incby | ||
L stop | ||
|