If you take the original Turing machine definition as follows:
...an infinite memory capacity obtained in the form of an infinite tape marked out into squares, on each of which a symbol could be printed. At any moment there is one symbol in the machine; it is called the scanned symbol. The machine can alter the scanned symbol and its behavior is in part determined by that symbol, but the symbols on the tape elsewhere do not affect the behavior of the machine. However, the tape can be moved back and forth through the machine, this being one of the elementary operations of the machine. Any symbol on the tape may therefore eventually have an innings. (Turing 1948, p. 61)
If you want to map these operations to those done on a processor capable of interpreting assembler/binary instructions - which operations would be mapped?
(I'm aware of the jump from Turing machines to Von Neuman machines inherent in this question)
Markov algorithm is another remarkably simple computational model, based on string rewriting, equivalent to the Turing machines.
Non-mathematical usage In colloquial usage, the terms "Turing-complete" and "Turing-equivalent" are used to mean that any real-world general-purpose computer or computer language can approximately simulate the computational aspects of any other real-world general-purpose computer or computer language.
With this head, the machine can perform three very basic operations: Read the symbol on the square under the head. Edit the symbol by writing a new symbol or erasing it. Move the tape left of right by one square so that the machine can read and edit the symbol on a neighbouring square.
A Turing machine consists of an infinitely long tape, which has been divided up into cells. Each cell can contain either a 1, a 0, or an empty space. Above one cell of the tape is a head, which can either move left or right, and can read the symbols written in the cells.
Reading what you've written I'd say you just need:
In an ARM-like assembly, for example, if you have R0 containing the address on the tape you should just need
ADDS r0, r0, #1 ;moves the tape forward
ADDS r0, r0, #-1 ;moves the tape backwards
ADDS [r0], [r0], #1 ;increments the value 'pointed by' the tape
ADDS [r0], [r0], #-1 ;decrements the value 'pointed by' the tape
Then, branches to do stuff in case of certain values assumed by the current symbol
BEQ Somewhere
This is more or less how Brainfuck works.
an infinite memory capacity obtained in the form of an infinite tape marked out into squares, on each of which a symbol could be printed.
Let's call that a int array. int[] Symbols
At any moment there is one symbol in the machine; it is called the scanned symbol.
int inxSym;
int scannedSymbol = Symbols[inxSym];
(At the CPU level, this is known as "main memory" or in modern system "program segment".
The machine can alter the scanned symbol
Symbols[inxSym] = newSymbol;
and its behavior is in part determined by that symbol,
switch(scannedSymbol) {....}
(At the CPU level, this is "executing an instruction". There is no op code to tell it to do so; it's just what CPU do.)
but the symbols on the tape elsewhere do not affect the behavior of the machine.
Nothing to do there.
However, the tape can be moved back and forth through the machine, this being one of the elementary operations of the machine.
++inxSym;
--inxSym
inxSym +=10;
// etc.
(At the CPU level, this is handle with JMP op codes)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With