How a computer works
Computers can perform many different activities because they can store huge lists of numbers and do arithmetic very rapidly. All computers work essentially the same way. A computer encodes (translates) numbers, words, pictures, sounds, and other forms of data into the 0's and 1's of the binary numeration system. The computer's processor manipulates the binary numbers according to specified instructions. All changes of the data are accomplished by performing arithmetical calculations on these binary numbers. Thus, the binary numbers that represent the data are changed into binary numbers that represent the desired information. The results are decoded (translated back) from binary numbers into decimal numbers, words, pictures, or some other form.
The operation of a computer can be broken down into three steps. They are (1) entering and encoding data and instructions, (2) processing data, and (3) decoding the results and producing output. The storing of information occurs during all three steps of the computing process.
Entering and encoding data and instructions is performed using input equipment. This section explains how the computer encodes data entered through a terminal. It also describes a number of other input devices.
Terminals enable computer users to type characters (letters and numerals) directly into the computer. A terminal includes a keyboard unit and a monitor. The monitor usually consists of a cathode-ray tube (CRT). A CRT is a vacuum tube with a screen like that of a television (see VACUUM TUBE). The CRT display makes it possible for the user to check the data being entered into the computer and to make corrections if necessary.
As each character is typed, the circuitry inside the terminal puts the character's binary code into a temporary storage location called a buffer. As soon as a code appears in the buffer, the processor executes an instruction that moves it from the buffer to the computer's memory. The monitor also has a buffer. Whenever the processor sends a code into this buffer, the corresponding character appears on the screen.
Other input devices are also used with monitors. For example, some terminals enable users to communicate with the computer by drawing pictures or diagrams directly on the screen with a light pen. Such units encode drawings directly from the monitor. A device called a mouse can be used to give commands to a computer. When this handheld box is moved on a flat surface, it causes a pointer to point at a specific instruction or piece of data displayed on a monitor. Clicking a button on the mouse causes the instruction to be carried out or the data to be moved or changed.
Modems are devices that allow computers to communicate with other computers by using telephone lines. A modem translates binary codes into tones. At the other end of the line, another modem translates these tones back into digital data.
Disk drives and tape drives perform many functions in the operation of the computer. One of these functions is providing input in binary form. A disk drive is a machine that, among other things, reads 0's and 1's that are magnetically encoded onto disks. This information then goes to the buffer and the memory. A disk system provides quick and direct access to specific information located anywhere on a disk. Flexible magnetic disks called floppy disks or diskettes are widely used to provide input to personal computers. Hard disks are used with larger computer systems, as well as with some personal computers.
Tape drives and magnetic tapes work in much the same way. However, a tape must be unwound or rewound to the location that contains the desired information. As a result, it takes longer to read information from a tape than from a disk.
Optical scanners also read data and instructions. Some scanners optically sense bar codes and other marks printed on identification and library cards, grocery items, or documents. They then change these codes into electrical signals. Other scanners read information from compact discs or optical disks. Such disks contain digitally encoded information that can be read by a laser beam.
Other input devices include a joystick for moving figures about on a screen and a graphic tablet consisting of a pad and a special pen for producing illustrations. Such devices are used with some personal computers. Voice activators enable computers to understand spoken words. Some mainframes obtain input by means of card readers, which take information from punched cards. The pattern of punches represents letters, numbers, and other symbols. Card readers once were popular, but today they are used less frequently.
Processing data. The processor, also called the central processing unit or CPU, is the heart of the computer. It manipulates the binary numbers that represent input according to a program, and converts them into binary numbers that represent the desired result.
Since the development of the integrated circuit in the 1960's, the processor in many computers is contained on a single microprocessor--a silicon chip no larger than a fingernail (see INTEGRATED CIRCUIT). All the devices and wires that make up the processor are packed onto the surface of the chip. Silicon is one of a group of materials called semiconductors (see SEMICONDUCTOR). The circuitry on the chip contains many tiny devices called transistors. A transistor can either stop electric current or allow it to flow (see TRANSISTOR). The processor of a computer consists of two parts: (1) the control unit and (2) the digital logic unit.
The control unit directs and coordinates the operations of the entire computer according to instructions stored in the memory. The control unit must select the instructions in proper order because their sequence determines each step in the operations. Each set of instructions is expressed through a binary operation code that specifies exactly what must be done to complete a job. The operation code also provides information that tells where data for the processing operation are stored in the memory. The control unit interprets the instructions and relays commands to the logic unit. It also regulates the flow of data between the memory and the logic unit and routes processed information to output or file storage devices.
The digital logic unit, sometimes known as the arithmetic/logic unit or ALU, manipulates data received from the memory. It carries out all the functions and logic processes required to solve a problem. Computers use logic to perform arithmetical calculations--addition, subtraction, multiplication, and division.
In the digital logic unit, electronic circuits called registers temporarily store data from the memory. The data consist of electrical signals that represent binary digits. An electrical signal that has a low voltage level represents 0, and a signal that has a high voltage level represents 1.
To carry out an arithmetical calculation, the electrical signal for each input travels on a wire to another circuit. The answer comes out on a wire from the other end of the circuit. There are a number of basic circuits. Three such circuits are the AND-gate, the OR-gate, and the NOT-gate or inverter. The basic circuits are combined in different ways to perform arithmetic and logic operations with electrical signals that represent binary digits. For example, one combination of logic circuits performs addition. Another combination compares two numbers and then acts on the result of the comparison.
After an operation has been completed, the result may be sent to the memory for storage until it is needed for another operation. In many cases, the result is sent to an output device or a file storage device.
Decoding the results and producing output. People use output equipment to get information from computers. Output equipment translates the electrical signals that represent binary numbers into a form that the user can understand. Often, it also serves as input equipment. There are many types of output devices, such as terminals, printers, modems, and disk and tape drives.
Terminals, in addition to serving as input equipment, display output on the monitor. As information travels from the processor to the terminal, it moves through the buffer that was used in the input function. On a terminal, a user can receive data in the form of words, numbers, graphs, or pictures.
Printers produce output on paper. Like terminals, printers have buffers. To print a character, the processor puts the binary code for that character into the printer's buffer. The printer prints the character that corresponds to the code. Some printers operate much like typewriters. Others use heat, special chemicals, lasers, or combinations of these methods to place characters on paper.
Modems, which translate sounds into binary numbers during the input function, can also provide output by translating binary numbers into sounds. As a result, they enable users to receive information from distant computers.
Disk drives and tape drives also serve as both input and output equipment. Magnetic disks and tapes receive output in binary form. The drives interpret binary information from disks and tapes and present it to the user, often on a monitor. Output data presented on disks and tapes can easily be put back in the computer when needed.
Other output devices include plotters, key punch machines, and audio devices. Plotters use pens to create drawings, diagrams, and graphs on paper or clear plastic. Key punch machines record data by punching holes in cards or paper tape. Audio devices produce spoken words through a type of telephone or loudspeaker. Such devices are becoming increasingly important.
Storing information. Computers can store information in two types of locations during the computing process--the memory and file storage devices. Memory, which is built into the computer, holds instructions and data during processing. File storage devices provide long-term storage of large amounts of information.
Memory, also called the internal memory or main memory, stores information and programs inside the computer. The memory receives data and instructions from an input device or a file storage device. It also receives information from the processor. The memory stores only the information that is currently needed by the processor. After the processor has finished with it, the information is transferred to file storage devices for permanent storage or sent directly to an output device for immediate use.
The devices and wires that make up the memory can be built from integrated circuits that fit onto one or more chips. The circuits, wires, and transistors form many memory cells capable of storing binary digits. These cells are arranged into groups. Each group is assigned an address--a number that makes it possible to locate specific pieces of information quickly.
File storage devices, also called auxiliary storage units, can store huge amounts of information for long periods of time. Such units are slower than the memory that is built into the computer. But they can hold much more information, and they are less expensive. For this reason, file storage devices are commonly used to store large quantities of data, programs, and processed information.
The most important file storage devices are magnetic disks and magnetic tapes. Disks and tapes are operated by disk drives and tape drives, which also serve as input and output equipment. These units encode data onto the surfaces of disks and tapes by turning the electrical signals that represent the 0's and 1's of binary code into magnetism. Every 0 is represented on the disk or tape by a little magnet pointing in a certain direction, and every 1 by a magnet pointing in the opposite direction. To read information from a disk or tape, the drive unit translates the magnetic signals into electrical signals and sends them to the memory. Magnetic disks are said to be random-access devices because any part of the information on them can be inspected or replaced with ease.
Some other types of file storage devices contain read-only memory (ROM)--information that the computer cannot change. ROM units may consist of a compact disc, a cartridge, or a silicon chip. They are used to store large databases and programs for computer games.
Programming a computer (Next)
History of computers | Importance of computers | Basic Principles | Kinds of computers | How Computer Works | Programming a computer | Computer Industry | Development of computers | Problems of computer age|
Main Page | Products | Services | Entertainment | History | Contact Us