Computability
Math · Advanced · Lesson 2 of 7

Programming a Machine

Write your own rules

An interactive lesson with 6 steps, about 5 minutes: you predict, drag and solve, with instant feedback on every answer. It runs in your browser and needs JavaScript.

What you’ll learn

  • Programming a Turing machine means designing its rule table.
  • The same rules work for inputs of any length.
  • Unary arithmetic is easy to implement with a few states.

Steps

  1. Flip every bit
  2. Counting in unary
  3. An adding machine
  4. Subtract one
  5. Which way?
  6. Timing the adder