This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
1 changed file
with
23 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 |
---|---|---|
@@ -1,2 +1,25 @@ | ||
# TuringMachine | ||
A Turing machine interpreter made in Java using Processing libraries. | ||
|
||
## Description | ||
In [this Wikipedia article](https://en.wikipedia.org/wiki/Turing_machine) it is explained what a Turing machine is. | ||
What I have made is a "simulator" of that machine. | ||
|
||
## Programming | ||
Inside the "data" folder, there are 5 example programs of how to code a Turing Machine program. The extension of the file is completely arbitrary and it can be changed. | ||
|
||
Firstly, you -define the initial state of the tape (example): | ||
```Td | ||
{q011101111}; | ||
``` | ||
|
||
After that (in this order), you define the final state: | ||
```Td | ||
#define F = {f}; | ||
``` | ||
|
||
And finally, you define all the states that you want. The syntax is the following: (state, oldValue, newValue, L/R/H (meaning "left/right/halt"), goToState);<br/><br/> | ||
Example: | ||
```Td | ||
(q0, 1, 0, R, q1); | ||
``` |