Computers are general-purpose machines that are designed to follow instructions to complete data processing tasks. Although the specific architecture of different types of computers may be different, all computers accomplish data processing using five basic elements of the computer system: input, output, datapath, control and memory. Each of these elements is associated with one or more hardware devices that are built into the computer or connected externally.
Elements of a Computer:
Input and Output
Communication with the outside world takes place through the input and output elements of the computer system. Data is input into a computer through external hardware devices like mice, keyboards, touchscreens and storage devices. Once data has been processed, it can be converted to a human-readable format for output to devices like printers, displays, speakers or headphones. The computer can also convert data to other output formats, such as electrical signals for controlling automated equipment.
The datapath element is made up of several units that perform data processing within the CPU (central processing unit), which is often referred to as the brains of the computer. The CPU interprets programming instructions and controls internal and external devices. One of the most important units within the CPU is the ALU (arithmetic logic unit), which performs arithmetic and logical operations on data. Some computers have a dedicated graphics processing unit (GPU) to support high-speed display of complex visual images. The datapath also contains circuits and registers that track system states, such as the program counter for the currently executing software.
The control element of the computer is responsible for movement of data between memory and the CPU. This element coordinates the execution of program instructions with all the other elements of the computer system by providing timing and control signals. The job of the control element is done by the control unit (CU), which on most modern computers is part of the CPU. The control unit is often described as the central nervous system of the computer.
Computers use both internal and external memory when performing operations. Internal memory is used to hold the software instructions and related data for programs that are currently executing. Internal memory consists of RAM (random access memory), which is temporary because it retains data only while power is applied. When the computer is turned off, the memory clears. Data which is not being used by the computer is usually stored in external memory on devices like hard drives and flash drives.