Computer hardware
Computer hardware is the physical part of a computer: the chips, circuit boards, drives, and devices you can touch. It includes the processor that runs programs, the memory and storage that hold data, and the input and output devices, such as keyboards and screens, that connect the computer to people and other machines.[1]
The field of computer hardware covers what these parts are, how they work together, and how they grew from room-sized machines of the 1940s into the chips inside phones and laptops.
Hardware, software, and firmware
A computer system combines three kinds of parts. They differ in whether they are physical and whether they can be changed while a program runs.
- Hardware is the physical components of a system.[2]
- Software is the programs and instructions that tell the hardware what tasks to do. It is not a physical object.[1]
- Firmware is programs and data stored in hardware, typically in read-only memory, so that they cannot be rewritten while the programs run.[2] Firmware tells a device how to talk to the rest of the computer's hardware.[2]
Hardware is usually split into two groups:[1]
- Internal hardware sits inside the computer case.
- External hardware is the peripheral devices that plug in from outside.
All of these parts work under the control of the operating system, the main software that manages the computer's resources.[1]
The main parts of a computer
A typical computer has parts for processing, memory, storage, power, and contact with the outside world.[1] The table lists the main ones in a typical desktop or laptop.
| Part | What it does |
|---|---|
| Central processing unit (CPU) | Carries out program instructions and runs calculations[1] |
| Random-access memory (RAM) | Holds the data the CPU is using right now[1] |
| Storage drive (hard disk drive or solid-state drive) | Keeps files and programs for the long term[1] |
| Motherboard | The main circuit board, which connects the internal parts so they can communicate[1] |
| Graphics processing unit (GPU) | Draws images, video, and 3D graphics. It can be built into the CPU or sit on a separate graphics card.[1] |
| Power supply unit | Converts power from the wall outlet into the voltages and currents each part needs[1] |
| Cooling | Heat sinks, fans, or liquid loops that carry heat away from chips[1] |
| Input and output devices | Keyboards, mice, and touchscreens bring data in. Monitors, printers, and speakers send it out.[1] |
| Networking hardware | Network cards, routers, and switches link computers together[1] |
External devices connect through ports such as USB, HDMI, Ethernet, and audio jacks.[1]
How the parts work together
The von Neumann model
A classic model of how a computer is laid out comes from John von Neumann's First Draft of a Report on the EDVAC, dated June 30, 1945.[3] The report split the machine into five parts:[3]
- A central arithmetic part (CA), which does arithmetic.
- A central control part (CC), which directs the order of operations.
- A memory (M).
- Input (I), which brings information in from outside.
- Output (O), which sends results out.
Today the control and arithmetic parts together make up the CPU.[4] A key idea of this von Neumann architecture is that the memory holds both the program's instructions and its data.[4] A machine built this way is called a stored-program computer.
The instruction cycle
The CPU runs a program by repeating the same few steps for each instruction, a loop called the instruction cycle.[4] Two small, fast storage slots inside the CPU, called registers, keep track of the work. The program counter holds the memory address of the next instruction, and the instruction register holds the instruction being run.[4]
- Fetch. The control unit reads the instruction at the address in the program counter, puts it in the instruction register, and updates the program counter to point at the next instruction.
- Decode. The control unit sends the bits that name the operation to the arithmetic logic unit (ALU) and reads the input values from registers.
- Execute. The ALU performs the operation, such as adding two numbers.
- Store. The control unit writes the result to memory.[4]
Input and output units take no direct part in the cycle. They load programs and data into memory and store or display the results.[4]
Buses
The parts send data to each other over buses. A bus is a channel that carries binary values (values made only of 0s and 1s) between a sender and a receiver.[4] Computers typically have three kinds:[4]
- The address bus carries the memory address of a read or write.
- The data bus carries the data itself.
- The control bus carries signals that request actions, such as "read" or "write".
A parallel bus sends many bits (single binary digits, each a 0 or a 1) at once over side-by-side wires. For example, a data bus of 32 parallel wires can move a 4-byte value, one bit per wire.[4] The original PCI expansion bus was 32 bits wide, ran at 33 MHz, and peaked at 132 MB/s of bandwidth (the amount of data a link can move per second), which all its devices had to share.[5]
PCI Express replaced the shared bus with point-to-point links, so each device gets its own dedicated path.[5] It sends data serially in packets (small blocks of data sent as a unit) over pairs of transmit and receive wires called lanes. Lanes can be grouped into links of x1, x2, x4, x8, x12, or x16 to raise bandwidth.[5]
Memory and storage
The memory hierarchy
No single storage device is both very fast and very large, so computers use several kinds at once.[6] This trade-off between speed and capacity is called the memory hierarchy.[6]
Faster devices also cost more per byte. That is why a computer cannot simply use the fastest kind of memory for everything.[6]
The table shows typical values for a 2020 workstation.[7]
| Device | Typical capacity | Time to respond (latency) | Built from |
|---|---|---|---|
| Register | 4 to 8 bytes | under 1 ns | SRAM |
| CPU cache | 1 to 32 megabytes | about 5 ns | SRAM |
| Main memory | 4 to 64 gigabytes | about 100 ns | DRAM |
| Flash disk (solid-state drive, SSD) | 0.5 to 2 terabytes | 0.1 to 1 ms | Flash memory |
| Hard disk | 0.5 to 10 terabytes | 5 to 10 ms | Spinning magnetic platters |
| Remote network server | varies | 20 to 200 ms | Varies |
The speed gaps between levels are large. A hard disk at 5 to 10 ms takes about 50,000 to 100,000 times longer to respond than main memory at about 100 ns.
The cache itself has levels, an arrangement called a multi-level cache:[6]
- Level 1 (L1) is small and fast, and sits close to the ALU.
- Level 2 (L2) is larger and slower.
- Level 3 (L3) is shared between cores. Many multicore chips (chips with more than one processor core) have one.
Primary and secondary storage
Storage is split into two kinds by how the CPU reaches it. The two kinds also tend to differ in what happens when power is cut.
| Examples | Can CPU instructions name it directly? | Keeps data without power? | |
|---|---|---|---|
| Primary storage | Registers, main memory | Yes[7] | No. RAM is volatile, so its data disappears when the computer turns off.[8] |
| Secondary storage | Hard disks, SSDs | No. Its data must first be copied into main memory.[7] | Yes. Drives are used for long-term storage, and SSDs use nonvolatile flash memory.[1] |
Hard drives and solid-state drives
A hard disk stores data magnetically on a few flat, round platters that spin, typically at 5,000 to 15,000 revolutions per minute.[7] A mechanical arm with a read and write head at its tip moves across the platter to reach rings of data called tracks.[7] Two mechanical delays slow every access:[7]
- Seek time is the few milliseconds the arm needs to move to the right track.
- Rotational latency is the few more milliseconds spent waiting for the data to spin under the head.
A solid-state drive has no moving parts, so it responds faster. Most commercial SSDs use flash memory.[7]
SSDs have largely replaced spinning disks in consumer devices such as laptops.[7] Hard disks still give more storage for the money.[1]
Chips and transistors
Transistors and logic gates
Modern processors are built from billions of tiny transistors, which act as electronic switches.[1] A transistor switches between on and off, and binary values are represented by high voltage (1) and low voltage (0).[9]
A few transistors arranged together form a logic gate, such as AND, OR, or NOT. A gate takes one or two binary inputs and produces one binary output.[9] At the lowest level, every circuit in a computer is built by linking gates together.[9]
Integrated circuits and microprocessors
An integrated circuit puts transistors and other parts, along with the metal lines that connect them, on one piece of silicon. This lets a complete circuit fit on a single chip.[10]
A microprocessor puts the CPU functions of a computer onto a single chip. It still needs supporting chips to make a complete system.[11]
Systems on a chip
A system on a chip (SoC) goes further. It puts a CPU, GPU, memory, input and output interfaces, and power management circuits onto one chip.[12]
SoCs power smartphones, tablets, and embedded systems, and they are now used more and more in personal computers and servers.[12] Putting everything on one chip saves power because fewer separate connections are needed.[12]
How processors are designed
Instruction set and microarchitecture
A processor's design has two layers: what it promises to software, and how its circuits keep that promise.[13]
| Layer | What it defines | Example |
|---|---|---|
| Instruction set architecture (ISA) | The set of instructions and their binary codes, the CPU's registers, and what each instruction does to the processor's state[13] | The x86 instruction set[13] |
| Microarchitecture | The circuitry that carries out a given ISA[13] | The different x86 processors made by Intel and by AMD[13] |
Because the layers are separate, different chips can implement the same ISA in different ways.[13] Other well-known ISAs include ARM, MIPS, PowerPC, and SPARC.[13]
This split lets one ISA span many machines. IBM's System/360 ISA was announced on April 7, 1964. Four of its models varied in performance by a factor of 50 and in cost by a factor of nearly 6.[14]
RISC and CISC
ISAs fall into two broad styles that differ in how much each instruction does.[13] Speed is counted in clock cycles, the regular timing beats of the processor.
| RISC (reduced instruction set computer) | CISC (complex instruction set computer) | |
|---|---|---|
| Instructions | Small set of basic instructions[13] | Larger set of higher-level instructions[13] |
| Time per instruction | About one clock cycle[13] | May take several clock cycles[13] |
| Program | More instructions[13] | Fewer instructions[13] |
| Circuit design | Simpler[13] | More complex[13] |
John Cocke and colleagues found that programs ran up to three times faster when compilers (programs that translate code into processor instructions) used only the simple instructions of the IBM 360 ISA.[14] Findings like this led to RISC designs. Their simple instructions could be run directly by hardware instead of by an internal interpreter, stored microcode that carries out each complex instruction as several simpler steps.[14]
Today the line is blurred inside chips. Modern x86 chips, which use a CISC ISA, translate their complex instructions into simpler RISC-like internal steps as they run.[14]
The two styles also dominate different markets. x86 remains dominant in desktops and many servers, while RISC designs such as ARM are common in mobile devices because they need less power.[13] Hennessy and Patterson reported in 2019 that 99% of 32-bit and 64-bit processors are RISC.[14]
Pipelining
Pipelining speeds up a processor by overlapping the steps of several instructions, like an assembly line.[15] While one instruction is being executed, the next can be decoded and the one after that fetched.
Consider a simple CPU with four stages: fetch, decode, execute, and write back (saving the result to a register). Without pipelining it finishes one instruction every four cycles. With pipelining, once the pipeline fills, it finishes one instruction every cycle.[15] For instructions, with no delays:
Here is the number of clock cycles. The first instruction still takes four cycles, and each later one finishes one cycle after the one before it. Each instruction's own time (its latency) does not shrink; what rises is throughput, the number of instructions finished per unit of time.[15]
Architects have used pipelining since the 1970s, and most modern microprocessors use it. The Intel Core i7 has a 14-stage pipeline.[15]
A deep pipeline needs a steady stream of instructions, which is hard at a branch, a point where the program picks one of two paths, as in an if statement. To keep the pipeline full, the processor guesses which way each branch will go and starts work ahead of time.[14] This is called speculative execution.
Wrong guesses waste work. When the branch predictor is wrong, the processor throws away the guessed instructions, and their time and energy are lost.[14] On one set of standard benchmarks, an Intel Core i7 wasted 19% of the instructions it executed this way.[14]
History
Vacuum tubes
The first electronic computers used vacuum tubes as switches. ENIAC, built at the University of Pennsylvania's Moore School of Electrical Engineering, was completed in 1945 and unveiled on February 14, 1946.[16] It filled 40 cabinets, each nine feet high, and held about 18,000 vacuum tubes.[16]
Memory was a major limit. ENIAC needed one tube per bit, while the design for EDVAC could store 1,000 bits using a delay line and 10 vacuum tubes.[17]
The transistor
At Bell Labs on December 16, 1947, John Bardeen and Walter Brattain made the first working semiconductor amplifier.[18] A semiconductor is a material whose ability to conduct electricity can be controlled. Their device was a slab of germanium, a semiconductor, with two closely spaced gold contacts.[18]
They showed it to lab officials on December 23, and Bell Labs announced the "transistor" in public on June 30, 1948.[18]
This point-contact transistor could do the amplifying work of a vacuum tube, using much less power and space.[19] Bardeen, Brattain, and William Shockley shared the 1956 Nobel Prize in Physics for it.[19] The full story is in Invention of the transistor.
The integrated circuit
Two engineers working separately are credited as co-inventors of the integrated circuit.[10] On September 12, 1958, Jack Kilby of Texas Instruments built a working circuit from a germanium slice and connected its parts with fine gold "flying wires".[20]
At Fairchild Semiconductor, Robert Noyce built on Jean Hoerni's planar process. Instead of loose wires, his design laid metal connections on top of the chip's protective oxide layer.[10] Noyce filed his patent in July 1959, and a Fairchild team made the first working single-chip (monolithic) integrated circuits in May 1960.[10]
Kilby received the Nobel Prize in Physics in 2000.[10] See Invention of the integrated circuit.
The microprocessor
The first general-purpose microprocessor came from a calculator order. In 1969 the Nippon Calculating Machine Corporation asked Intel to design 12 custom chips for its Busicom 141-PF printing calculator.[21] Intel's Ted Hoff instead proposed a general-purpose 4-bit computer on just four chips.[22]
Hoff and Stanley Mazor came up with the design.[11] In 1971 Federico Faggin, helped by Masatoshi Shima, fit the Intel 4004 processor's 2,300 transistors onto a single chip.[11] Intel introduced the chip family in 1971 as the MCS-4 Micro Computer Set.[22]
Moore's law and its limits
Moore's prediction
In 1965, Gordon Moore of Fairchild predicted that the number of components per chip would double every 12 months, reaching 65,000 by 1975.[23] In 1975, then at Intel, he slowed the forecast to "a doubling every two years, rather than every year."[23] This trend became known as Moore's law.
A steady doubling gives exponential growth, which multiplies by the same factor over equal periods of time:
Here is the number of transistors per chip at a starting year, is the number years later, and is the doubling time in years. Moore's 1965 forecast used , and his 1975 revision used .[23]
Slowing down
Moore's law began to slow around 2000. By 2018 real chips had about 15 times fewer transistors than the prediction implied.[14]
A second trend has nearly ended. Dennard scaling, a projection by Robert Dennard, held that as transistors shrank, each would use less power, so the power per square millimeter of silicon would stay about constant.[14] Dennard scaling began to slow sharply in 2007 and had faded to almost nothing by 2012.[14]
These changes reshaped processor design.[14]
- Wasted speculative work led many architects to seek a different approach. Chipmakers turned to multi-core processors, which put several processors on one chip.
- Without Dennard scaling, more cores means more power, and all of it must leave as heat. Chips are limited by their thermal design power, the average power the chip's housing and cooling system can remove.
- To stay within that limit, chips slow their clocks and switch off idle cores. This is called dark silicon.
- Amdahl's law states that the speedup from parallel processors is limited by the part of a program that must run in sequence.
John Hennessy and David Patterson argued in 2019 that these limits together hold general-purpose processor gains to only a few percent per year.[14]
Specialized processors
Accelerators
Hennessy and Patterson name processors designed for one kind of task as one of the main opportunities for faster computers.[14] They call these domain-specific architectures, often known as accelerators. Unlike fixed-function chips, they are still programmable.[14]
Examples include GPUs and neural network processors for deep learning, a kind of machine learning that uses neural networks with many layers.[14] Because they fit their task closely, such processors can reach higher speed and energy efficiency on it.[14]
The Tensor Processing Unit
Google's first Tensor Processing Unit (TPU v1) shows the approach. It was built to run trained neural networks and has been in production since 2015.[14] Its core is a matrix unit, a circuit that computes on grids of numbers, which does 256 × 256 multiply-and-add operations every clock cycle.[14]
On six common neural network tasks in Google data centers, the TPU was 29 times faster than a general-purpose CPU.[14] It also used less than half the power, which made it more than 80 times more energy efficient on that work.[14] The wider field is covered in Hardware for artificial intelligence.
References
- What is computer hardware?, IBM, 2025.
- Firmware (glossary), NIST Computer Security Resource Center.
- First Draft of a Report on the EDVAC, John von Neumann, Moore School of Electrical Engineering, University of Pennsylvania, 1945 (corrected edition by M. D. Godfrey).
- 5.2. The von Neumann Architecture, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
- Introduction to PCI Express, NI.
- 11.1. The Memory Hierarchy, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
- 11.2. Storage Devices, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
- Basic Computer Hardware Guide, University of Wisconsin-Madison DoIT Help Desk.
- 5.3. Logic Gates, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
- 1959: Practical Monolithic Integrated Circuit Concept Patented, Computer History Museum.
- 1971: Microprocessor Integrates CPU Function onto a Single Chip, Computer History Museum.
- What Is System on a Chip?, Supermicro.
- 5. What von Neumann Knew: Computer Architecture, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
- A New Golden Age for Computer Architecture, John L. Hennessy and David A. Patterson, Communications of the ACM, 2019.
- 5.7. Pipelining: Making the CPU Faster, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
- ENIAC, Encyclopedia of Greater Philadelphia.
- History of computing: ENIAC, Encyclopaedia Britannica.
- 1947: Invention of the Point-Contact Transistor, Computer History Museum.
- November 17 to December 23, 1947: Invention of the First Transistor, APS News, American Physical Society, 2000.
- 1958: All Semiconductor "Solid Circuit" is Demonstrated, Computer History Museum.
- Announcing a New Era of Integrated Electronics, Intel.
- Intel's Microprocessor, Computer History Museum, Revolution exhibit.
- 1965: "Moore's Law" Predicts the Future of Integrated Circuits, Computer History Museum.
