You've probably used a computer for work or leisure. Many people use computers for everyday tasks such as check the bank balance or write a school report. Computers are good for these tasks. They can treat repetitive tasks, such as adding numbers or insert words on a page without getting bored or exhausted. Computers are also good for games because they can play sequences of sounds and images, involving the human user in the process.
The flexibility of a computer is a very surprising phenomenon. The same machine can be used to query a bank balance, print a school project and play a game. In comparison, other types of machines run a much smaller variety of tasks - a car walking and toaster roasting.
To achieve this flexibility, the computer must be programmed to perform each task. The computer is a machine that stores data (numbers, words, images), interacts with devices (monitor, sound system, printer) and executes programs. Programs are sequences of instructions and decisions that the computer runs to accomplish a task. A program calculates the bank balance; another, perhaps designed and built by a different company processes text; and a third program, probably from another company, runs a game.
Current computer programs are so sophisticated that it's hard to believe they are all compounds from extremely primitive operations.
A typical operation can be one of those listed below:
• Put a red dot on this screen position.
• Send the letter A to the printer.
• Get a number from this memory location.
• Add two numbers.
• If this value is negative, continue the program from this instruction.
A program reports to a computer in detail the sequence two steps needed to complete a task. A program contains a huge number of simple operations and the computer executes at high speed. The computer has no intelligence - it simply executes sequences of instructions that were previously prepared.
To use a computer, it is not necessary to have knowledge about programming. When you write a school report using a word processor, this software package is programmed by the manufacturer and is ready for use. This is only expected - you can drive a car without being mechanical and toasting a slice of bread without being electrician.