Search topics and sections

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]

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]

Main parts of a desktop computer Inside the case Power supply unit Wall outlet Power Motherboard Storage (SSD or HDD) GPU (graphics card) CPU RAM Network card Ports (USB, HDMI, Ethernet, audio) Input devices keyboard, mouse Output devices monitor, speakers, printer Cooling (heat sink, fan) External devices
Inside the case, the CPU, RAM, storage, GPU, network card and ports all communicate through the motherboard, and the power supply unit feeds the board, GPU and storage. Input devices connect to the ports from outside the case, and output devices are driven through them.

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]

  1. A central arithmetic part (CA), which does arithmetic.
  2. A central control part (CC), which directs the order of operations.
  3. A memory (M).
  4. Input (I), which brings information in from outside.
  5. 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.

Von Neumann model of a computerCPU (modern term)Centralarithmetic (CA)Centralcontrol (CC)Memory (M)instructionsand dataInput (I)Output (O)Outsideworld
The five parts named in von Neumann's 1945 EDVAC report. Central arithmetic and central control together make up what is now called the CPU, and they exchange instructions and data with memory. Input and output connect to memory, not to the CPU.

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]

  1. 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.
  2. Decode. The control unit sends the bits that name the operation to the arithmetic logic unit (ALU) and reads the input values from registers.
  3. Execute. The ALU performs the operation, such as adding two numbers.
  4. 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]

Instruction cycleFetchDecodeExecuteStore
The instruction cycle. The processor fetches an instruction, decodes it, executes it, stores the result, and then fetches the next instruction.

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]

PCI shared bus compared with PCI Express point-to-point links PCI: shared parallel bus Host 32 parallel lines, shared Device A Device B Device C PCI Express: point-to-point links Host Switch x16 x4 x1 Device A Device B Device C transmit pair receive pair one lane
Classic PCI connects the host (the main computer that the devices serve) and every device to one shared 32-line parallel bus. PCI Express gives each device its own point-to-point link to a switch, made of one or more lanes (×16\times 16, ×4\times 4, ×1\times 1), and each lane is a transmit pair plus a receive pair.

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.
Computer memory hierarchyPrimary storageSecondary storageRegistersCPU cache (SRAM)Main memory (DRAM)Flash SSDHard diskRemote network server4 to 8 bytes, under 1 ns1 to 32 MB, about 5 ns4 to 64 GB, about 100 ns0.5 to 2 TB, 0.1 to 1 ms0.5 to 10 TB, 5 to 10 ms20 to 200 msfaster, more costly per bytelarger capacity
The memory hierarchy of a typical 2020 workstation, from registers at the top to remote network servers at the bottom, with typical capacity and latency for each layer. A dashed line divides primary storage from secondary storage.

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]

Hard disk drive, top viewPlatterTrackHeadArmSeekSpindleRotation
Top view of a hard disk drive. The platter spins around a central shaft called the spindle, and the arm swings about a pivot to move the head from one track to another.

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 NN instructions, with no delays:

Tplain=4NTpipelined=N+3T_{\text{plain}} = 4N \qquad T_{\text{pipelined}} = N + 3

Here TT 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]

Four-stage instruction pipeline latency: 4 cycles 1234567 FDEW FDEW FDEW FDEW Clock cycle Instruction 1 Instruction 2 Instruction 3 Instruction 4 pipeline full: one instruction finishes per cycle F = fetch D = decode E = execute W = write back 4 instructions: 7 cycles pipelined, 16 cycles without
In a four-stage pipeline, each instruction passes through fetch, decode, execute, and write back, one stage per clock cycle, and a new instruction starts every cycle. Four instructions finish in 7 cycles (N+3N + 3 with N=4N = 4) instead of the 16 cycles needed without pipelining.

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

Timeline of computer hardware, 1940 to 2020 1940 1950 1960 1970 1980 1990 2000 2010 2020 1945: ENIAC completed(unveiled 1946) 1947: point-contact transistorBell Labs 1959: Noyce files monolithicIC patent, Fairchild 1971: Intel 40042,300 transistors 2007 to 2012:Dennard scaling fades 1945: von Neumann'sEDVAC report 1958: Kilby's solid circuitTexas Instruments 1965: Moore predictsdoubling every year 1975: Moore revises todoubling every two years 2015: Google TPU v1in production
Milestones in computer hardware from 1940 to 2020, from ENIAC and the transistor through the integrated circuit and Moore's predictions to Google's Tensor Processing Unit (TPU), a chip built for neural network calculations. The shaded span marks 2007 to 2012, when Dennard scaling faded.

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:

N(t)=N0⋅2t/TN(t) = N_0 \cdot 2^{t/T}

Here N0N_0 is the number of transistors per chip at a starting year, N(t)N(t) is the number tt years later, and TT is the doubling time in years. Moore's 1965 forecast used T=1T = 1, and his 1975 revision used T=2T = 2.[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]

Moore's law and the gap with actual chips 103 105 107 109 1011 1970 1980 1990 2000 2010 2020 Year Transistors per chip (log scale) Intel 4004, 1971: 2,300 Moore's law: doubling every 2 years Actual chips (schematic) slowing begins around 2000 about 15x gapby 2018
Diagram of Moore's law, not plotted data. The dashed line doubles every 2 years from the Intel 4004 in 1971, and actual transistor counts per chip began falling short of it around 2000, leaving a gap of about 15×15\times by 2018.

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

  1. What is computer hardware?, IBM, 2025.
  2. Firmware (glossary), NIST Computer Security Resource Center.
  3. 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).
  4. 5.2. The von Neumann Architecture, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
  5. Introduction to PCI Express, NI.
  6. 11.1. The Memory Hierarchy, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
  7. 11.2. Storage Devices, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
  8. Basic Computer Hardware Guide, University of Wisconsin-Madison DoIT Help Desk.
  9. 5.3. Logic Gates, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
  10. 1959: Practical Monolithic Integrated Circuit Concept Patented, Computer History Museum.
  11. 1971: Microprocessor Integrates CPU Function onto a Single Chip, Computer History Museum.
  12. What Is System on a Chip?, Supermicro.
  13. 5. What von Neumann Knew: Computer Architecture, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
  14. A New Golden Age for Computer Architecture, John L. Hennessy and David A. Patterson, Communications of the ACM, 2019.
  15. 5.7. Pipelining: Making the CPU Faster, Dive Into Systems (Matthews, Newhall, and Webb), 2022.
  16. ENIAC, Encyclopedia of Greater Philadelphia.
  17. History of computing: ENIAC, Encyclopaedia Britannica.
  18. 1947: Invention of the Point-Contact Transistor, Computer History Museum.
  19. November 17 to December 23, 1947: Invention of the First Transistor, APS News, American Physical Society, 2000.
  20. 1958: All Semiconductor "Solid Circuit" is Demonstrated, Computer History Museum.
  21. Announcing a New Era of Integrated Electronics, Intel.
  22. Intel's Microprocessor, Computer History Museum, Revolution exhibit.
  23. 1965: "Moore's Law" Predicts the Future of Integrated Circuits, Computer History Museum.

Figure

Subtopics

19-inch rackAI PCAllen CoombsAn WangAndes TechnologyAndy BechtolsheimAnton (computer)Apollo ComputerArista NetworksArthur BurksBaikal CPUBay NetworksBill DallyBill English (computer engineer)Bus (computing)Cambricon TechnologiesCentral processing unitCommand Data BufferComputerComputer caseComputer coolingComputer data storageComputer hardware companyComputer hardware companyComputer memoryComputer port (hardware)Convex ComputerCooler MasterCXL Consortiumd-MatrixDavid Patterson (computer scientist)Digital video recorderDisk arrayDisplay interfaceFederico FagginForm factor (design)FuriosaAIGB200 NVL72GB200 NVL72Gen-Z (consortium)Graphics hardwareGraphics processing unitHailo (company)Hardware for artificial intelligenceHardware keyloggerHardware random number generatorHarry HuskeyHeinz BillingHeinz ZemanekHistory of computing hardwareHot swappingIEEE Computer SocietyInput/outputIntel 430HXJerrier A. HaddadJim Keller (engineer)John L. HennessyJohn Pinkerton (computer designer)KeypunchLogitechMagneto-optical driveMainframe computerMarcian HoffMicro Channel architectureMicroarchitectureMicrocontrollerNetworking hardwareNeural processing unitNeuromorphic computingNexGenNonStop (server computers)Open Compute ProjectOpen-source hardwareOpenCoresOptical disc driveOverclockingPCI ExpressPCI-SIGPeripheralPower cyclingPower management unitPower supply unit (computer)Power-on self-testPrinted circuit boardProcessor (computing)Processor interconnectRack unitRAIDRebootRod CanionS.M.A.R.T.S3 GraphicsSmart cardSophie WilsonStanley MazorSXM (socket)SymbolicsSystem on a chipSystem on moduleTandem ComputersTape driveTape libraryTera Computer CompanyThomas J. Watson Jr.USBUSB Implementers ForumVertivWilliam Norris (CEO)Zip drive