Writing a program in Turing
Turing is a programming machine, so how easy is it to write a program?
- First, you need to know the language. Turing's machine language includes a range of instructions (as shown on the separate menu entry on the right).
- Next you need to design and write the program.
- Next you need to enter the program into the computer
- Finally you need to run the program.
Programs in Turing (as with real computers) are stored in memory locations. A memory location might store a whole instruction (0 = stop program) or the instruction might need two successive locations (38 followed by another number = add the number to the number already in the accumulator).
- are usually stored from memory 0 onwards and the run button assumes programs start here.
- can be run from start to finish or one instruction at a time. Usually when a program is first written it is tested one step at a time (fetch then execute then fetch...) and then run completely once it has proved correct.
- End when a stop program instruction (0) is reached.