2nd kinds of machines invented by humans: programmable machines
 

Programmable Machines:

  • Programmable machine = a device which function can be altered by a program

 

 

Program:

  • Program = a series of instructions that instruct a machine to accomplish a specific task         

Examples of programmable devices and programs

Mechanical piano/music box Mechanical loom
  • A mechanical piano can play different songs
  • The drum in the center of the piano contains spikes that cause the piano to play a note


  • Program: different spike patterns cause the piano to play different songs
  • The mechanical loom can weave fabric in different patterns
  • The loom's movement is controlled by holes punched in a card


  • Program: different hole patterns casue the loom to weave a different patterns

Representing (= encoding) instructions for programmable machines

Instruction:

  • Instructions (or program instructions ) tell a machine what to do

            

  • Instructions are represented using an encoding method

Commonly used encoding method (using numbers):

  • 1 means add
  • 2 means subtract
  • And so on.