| A computer is a machine that stores and processes information. Information is
entered into the computer, is processed by the computer, then comes out of the computer. The kind of information that goes into and comes out of the computer varies widely.
The information can be numbers, words, sounds, pictures, movies, etc.
Information that resides on a computer is called data.
The figure below shows a typical personal computer (PC).

The core of the system is the box that contains the primary computer components: the central processing unit (CPU), memory, and disk drive.
The rest of the computer components are found on the
outside, or periphery, of the main box and are referred to as the computer's peripheral devices.

Some of the peripheral devices are used to enter information into the computer, and are referred to
as input devices. The keyboard and the mouse are both input devices. Other peripheral devices
are used to display the information that comes out of the computer. These are referred to as
output devices. An example of an output device is the screen.
A calculator program is a good program to illustrate how a computer takes in, processes, and generates information. The
data is entered via one of the input devices, such as the keyboard or mouse. In this case the input might be a couple of numbers,
such as 5 and 12, and also a request to add these numbers:

The computer processes the information and puts the result (the number 17) on the screen (the output device):

A computer program is a set of instructions that
tell the computer how to process information. An example of a program is Microsoft's Excel spreadsheet program, which is used for performing calculations.
Other typical programs are text editors, web browsers, e-mail programs and games. If we look at some
of the internal details of the computer, we see that the programs are stored on the computer
on the disk drive:

The disk drive is used for long term storage of programs and data.
To run a program (i.e., for someone to use the program) it must be placed in the computer's memory,
which is the computer's work area. A program must be in the computer's memory for the computer's
'brain', the central processing unit (CPU), to run through the program's instructions. Therefore,
when you ask the computer to run a program, the first thing that happens is that a copy of the program (which is stored on the disk drive)
is made and the copy is moved into memory:

Once the program is in memory, the CPU starts running through the program's instructions.
Typically the program will start off by generating some output -- often the output is an image
on the screen.

At this point the user (the user is a person using the computer) starts interacting with the computer,
entering information via the keyboard and mouse, and looking at the output
on the monitor. When the user terminates the program, the copy of the program in memory is discarded, while the
original version of the program still is safe on the disk drive:

|