The job of the CPU is to execute programs. A program is simply a list of unambiguous instructions meant to be followed mechanically by a computer. A computer is built to carry out instructions that are written in a very simple type of language called machine language . Each type of computer has its own machine language, and it can directly execute a program only if it is expressed in that language. In addition to the program, memory can also hold data that is being used or processed by the program.
Main memory consists of a sequence of locations .
These locations are numbered, and the sequence number of a location is called its address . An address provides a way of picking out one particular piece of information from among the millions stored in memory. The CPU can also store information in memory by specifying the information to be stored and the address of the location where it is to be stored. The CPU executes a program that is stored as a sequence of machine language instructions in main memory. It does this by repeatedly reading, or fetching , an instruction from memory and then carrying out, or executing , that instruction.