A computer is a programmable electronic or otherwise physically implemented machine that accepts data and instructions, performs operations on that information according to those instructions, stores information, and produces results. Modern general-purpose computers normally perform digital computation, representing information internally using discrete states that are usually expressed as binary digits, or bits. The term computer does not refer exclusively to desktop PCs or laptops.
Smartphones, servers, tablets, supercomputers, game consoles, embedded controllers, industrial computers and many other devices contain computers or computing systems. What distinguishes a computer from a simple passive machine is its ability to execute a defined set of instructions and thereby perform different operations without having to be physically rebuilt for every task. A calculator, for example, can be considered a specialised computer when its internal architecture performs programmable or algorithmically controlled computation, while a conventional mechanical clock performs a predetermined physical process without the general programmability associated with computers.
The fundamental conceptual model of a computer is that it receives input, processes information, stores intermediate or persistent data and produces output. Input can come from keyboards, mice, cameras, microphones, sensors, networks, storage devices or other computers. Processing is performed by electronic circuits and software instructions that manipulate numerical representations of data. Output can appear on displays, speakers, printers, network connections, actuators or storage devices.
Memory allows instructions and data to be retained while computation takes place, while persistent storage retains information when the computer is powered off. Modern computers can perform billions or trillions of elementary operations per second, although useful performance depends on architecture, workload, memory access, parallelism and many other factors rather than processor frequency alone.
Computers are based predominantly on semiconductor electronics. The transistor is the fundamental electronic switching component from which modern digital logic is constructed. Large numbers of transistors are integrated into chips containing logic gates, registers, arithmetic units, control circuits, caches, memory structures and other components. A processor interprets machine instructions and manipulates data according to the instruction-set architecture it implements. Memory technologies provide temporary or persistent storage, while input and output controllers connect the computational system to external devices. Although users interact with high-level software such as web browsers and word processors, the operations ultimately become sequences of machine-level instructions executed by physical circuits. This layered relationship between physical electronics and abstract software is fundamental to understanding what a computer is.
The history of computing extends considerably beyond modern electronic computers. Ancient and historical societies developed devices for calculation and record keeping, including counting instruments and mechanical calculating mechanisms. Charles Babbage's proposed Analytical Engine in the nineteenth century contained concepts resembling a programmable general-purpose computer, although it was not completed as a fully operational machine during his lifetime. In the twentieth century, electromechanical and then electronic machines demonstrated increasingly sophisticated automatic computation.
Vacuum-tube computers were followed by transistorised systems, integrated circuits and microprocessors. The invention and mass production of the microprocessor enabled increasingly compact and affordable computers, supporting the development of personal computers and embedded computing. Subsequent advances in semiconductor manufacturing, storage, networking and software transformed computers from specialised machines into pervasive infrastructure embedded throughout modern society.
A computer can be classified according to purpose, scale, architecture and deployment. General-purpose computers are designed to run many different programs, whereas specialised computers are designed for particular functions. Personal computers include desktops and laptops, while servers provide computational or network services to other systems. Mainframes are engineered for highly reliable large-scale transaction processing and substantial input and output workloads. Supercomputers are designed for extremely demanding computational workloads such as climate modelling, physics simulations and scientific calculations. Embedded computers are incorporated into larger products and may control engines, appliances, industrial machines, medical devices or communications equipment. Microcontrollers combine processor, memory and peripheral functions on a single chip and are widely used in systems that require inexpensive, low-power control.
A computer is not synonymous with a processor. The central processing unit is one component of a computer, responsible for executing instructions, but a functioning computer normally requires memory, storage, input and output mechanisms, power delivery and software. Likewise, a computer is not synonymous with the operating system installed on it. The operating system manages resources and provides services, but applications can run on top of it and hardware can exist without a particular operating system.
Computer science is also distinct from the computer itself. Computer science studies computation, algorithms, programming languages, data structures, information and computational systems, whereas a computer is a physical system capable of carrying out computational processes. These distinctions are important because everyday language often uses the word computer to refer simultaneously to hardware, software and the complete system.
Computers have become general-purpose because programmable architectures allow the same physical machine to perform many unrelated tasks. A processor does not inherently understand that it is being used to edit a document, display a web page or analyse a photograph. Instead, software provides sequences of instructions that cause the hardware to perform the operations required by different applications. This programmability is supported by abstraction layers.
Machine instructions are grouped into functions by operating systems, libraries and applications, allowing humans to interact with complex systems without directly manipulating individual electronic circuits. Modern computers can also communicate with other computers, allowing individual machines to participate in distributed systems in which computation and storage are spread across networks rather than being performed entirely within one physical device.
The defining importance of the computer is therefore its ability to perform programmable information processing. Computers can calculate, compare, search, transform, store, transmit and analyse information at speeds and scales that are impractical for unaided humans. They underpin modern communications, scientific research, business systems, industrial automation, entertainment, transportation, finance, healthcare and government administration. Their capabilities are nevertheless bounded by physical resources, algorithms, software quality, data quality, energy consumption, memory capacity and communication constraints.
A computer does not independently possess human understanding simply because it can manipulate information rapidly; its behaviour is determined by its hardware, software, inputs and operating environment. The modern computer is best understood as a programmable computational system whose extraordinary flexibility comes from combining digital electronics with layers of software abstraction.