The Mathematica Journal


About the Journal
Current Issue
Editorial Policy
Back Issues
Contact Information


The Mathematica Programmer

Turing Machines and Code Optimization

Volume 3, Issue 3
Summer 1993
Roman E. Maeder

The Turing Machine is a very simple, yet universal computing device. Probably every computer science student has at one point written a Turing Machine Simulator. We develop such a simulator in Mathematica and present some tools that make it easier to write programs for Turing Machines. We then construct an assembler and use it to show explicitly how the primitive recursive functions can be programmed on a Turing Machine. Finally, we present some code-optimization techniques that are also used in today's RISC machines.

About Mathematica 
© Wolfram Media, Inc. All rights reserved.