A Turing Machine Language Program

 

This is my first program written in Turing Machine Langage. A celebration of minimalism. It compares two numbers in base 1 and selects the largest. Like the four nucleotides in DNA, Turing Machine Language only contains four instructions. R = move the ”tape” right one step. L = Move the tape left one step. 1 = print the digit 1. 0 = print the digit 0.

Each line in the program is a program instruction telling the machine what to do with a hypothetical infinite tape containing strings with ones and zeros.

The first letter indicates the action tha machine should take if the current position of the tape contains a zero.
The second letter indicates the action tha machine should take if the current position of the tape contains a one.

Annonser

Kommentera

Fyll i dina uppgifter nedan eller klicka på en ikon för att logga in:

WordPress.com Logo

Du kommenterar med ditt WordPress.com-konto. Logga ut / Ändra )

Twitter-bild

Du kommenterar med ditt Twitter-konto. Logga ut / Ändra )

Facebook-foto

Du kommenterar med ditt Facebook-konto. Logga ut / Ändra )

Google+ photo

Du kommenterar med ditt Google+-konto. Logga ut / Ändra )

Ansluter till %s