Hardware and software

Hardware is the physical part of a computer: the parts you can touch, such as the processor, memory modules, drives, cables and the case. Software is the set of instructions that runs on that hardware: the firmware on the motherboard, the operating system, drivers and applications. Neither is useful without the other. A processor without a program does nothing, and a program needs a processor to run on.

The line between the two matters in practice. A support ticket that says "the laptop is slow" can have a hardware cause (a failing drive, too little memory, an overheating processor) or a software cause (a runaway process, malware, a bad update). Part of a technician's job is finding out which side of that line a problem is on, and the rest of this topic gives you the hardware side.

Firmware sits in between: software stored on a chip on the hardware itself, which starts the machine before any operating system is loaded. It gets its own page: BIOS, UEFI and the Boot Process.

Input, processing, output and storage

A simple model describes what every computer does, from a smartwatch to a data center server: the input–processing–output (IPO) model, often extended with storage.

  • Input: data comes in. An input device is hardware that sends data or commands into the computer: a keyboard, mouse, touchpad, microphone, scanner, webcam or barcode reader.
  • Processing: the central processing unit (CPU) carries out instructions on that data, helped by memory that holds the data being worked on.
  • Output: results go out. An output device presents data from the computer to a person or another machine: a monitor, printer, speakers or headphones.
  • Storage: data is kept for later, on a drive that keeps it when the power is off.

Some devices do both input and output. A touchscreen shows an image (output) and senses your finger (input); a multifunction printer prints (output) and scans (input); a headset has speakers and a microphone. A network card sends and receives. When a question asks whether a device is input or output, ask which way the data flows.

The main components

A component is one replaceable part of a computer with its own job, such as the processor, a memory module or a drive. Components are made by different manufacturers and connect through standard slots, sockets and connectors, which is why a desktop can be built and repaired from parts. Here is a tour of a typical desktop; each component has its own page.

Component What it does
Motherboard The main circuit board that every other component plugs into, with the wiring and chips that let them communicate.
CPU (central processing unit) Executes the instructions of programs, billions of times per second.
RAM (random-access memory) Fast working memory for the programs and data in use right now; it is emptied when the power goes off.
Storage A solid-state drive (SSD) or hard disk drive (HDD) that keeps the operating system, programs and files when the power is off.
GPU (graphics processing unit) Draws the image on the screen; either built into the CPU or on a separate graphics card.
PSU (power supply unit) Converts alternating current (AC) from the wall outlet into the low direct current (DC) voltages the components need.
Case and cooling The case holds and protects the parts; fans and heat sinks move the heat they produce out of it.
NIC (network interface card) Connects the computer to a network by cable or Wi-Fi; today usually built into the motherboard.

Around these sit the peripherals: keyboard, mouse, monitor and printer, connected through ports and cables.

The von Neumann architecture

In 1945 the mathematician John von Neumann described a design for a stored-program computer, and nearly every computer since has followed it. The von Neumann architecture has four parts: a processing unit, a memory that holds both the program's instructions and its data, input and output, and connections between them. The key idea is that a program is just data in memory. To run a different program you load different bytes, instead of rewiring the machine as the earliest computers required.

The connections are buses. A bus is a shared set of electrical lines that carries information between components. Classically there are three:

  • The address bus carries the memory address the CPU wants to read or write. Its width limits how much memory can be addressed.
  • The data bus carries the data itself, in both directions.
  • The control bus carries signals that say what should happen: read or write, and when.
The von Neumann architecture: a CPU with control unit, ALU and registers, a memory holding programs and data, and input/output, all connected by one system bus made of address, data and control lines. CPU Control unit ALU Registers Memory (RAM) programs + data Input/output keyboard, disk, display, network System bus: address bus · data bus · control bus
Instructions and data travel over the same bus between the same memory and the CPU. The control unit directs the work, the arithmetic logic unit (ALU) calculates, and registers hold the handful of values the CPU is working on this instant.

Because instructions and data share one path, the CPU can only go as fast as memory can feed it. This limit is called the von Neumann bottleneck, and much of modern hardware design is about working around it: CPU caches keep copies of recently used data close to the processor, memory runs on several channels at once, and separate caches for instructions and data give the CPU two paths at its closest level. See CPU cache and memory channels.

From power button to login

What happens in the seconds after you press the power button shows how the components depend on each other. In short:

  1. The power button signals the motherboard, which tells the power supply to turn on its main outputs. When the voltages are stable, the power supply reports "power good" and the CPU is released from reset.
  2. The CPU starts running the firmware stored in a flash chip on the motherboard: the Unified Extensible Firmware Interface (UEFI) on current machines, the Basic Input/Output System (BIOS) on older ones.
  3. The firmware runs the power-on self-test (POST): it checks and initializes the CPU, memory and graphics, and finds the attached devices. A fault here gives beep codes, blinking lights or a black screen instead of a picture.
  4. The firmware looks through the boot devices in the configured order and starts the boot loader it finds on a drive.
  5. The boot loader loads the operating system kernel into RAM. The operating system starts its drivers and services and shows the login screen.

Each step points to different components when something goes wrong: no fans at all points to power, no picture after the fans spin points to POST (memory, CPU, graphics), and "no boot device" points to storage or the boot order. The full story is in BIOS, UEFI and the Boot Process, and the diagnosis in Hardware Troubleshooting.

Desktops, laptops, servers and mobile

The same building blocks appear in every kind of computer. What changes is how they are packaged, and that decides what a technician can repair or upgrade.

Type Built for Upgradeability Typical traits
Desktop A fixed workplace; performance per cost High: standard parts, slots and connectors Separate monitor and peripherals; room for cooling and expansion cards
Laptop Mobility; battery life Limited: often storage and sometimes memory; many parts are soldered Compact, low-power parts; built-in screen, keyboard and battery
Server Running services around the clock for many users High, often without tools; hot-swappable parts Rack-mounted; error-correcting memory, redundant power supplies, remote management
Phone and tablet Mobility; touch; long standby Practically none: parts are replaced, not upgraded Most components integrated in one system on a chip (SoC)

A system on a chip (SoC) combines the CPU, graphics, memory controller and often the modem on one piece of silicon. It saves space and power, which is why phones, tablets and more and more laptops use one. The price is that nothing on it can be replaced separately. See Laptops and Mobile Devices.

Reading a spec sheet

A specification (spec) sheet lists the components of a computer. Being able to read one quickly is a daily skill: to check whether a laptop meets the requirements of a program, to order the right upgrade, or to compare quotes. Here is the spec sheet of a realistic but fictitious business laptop.

Model          X14 Gen 3
Processor      10-core x86-64 CPU (2 performance + 8 efficiency cores),
               12 threads, up to 4.4 GHz, 12 MB cache
Graphics       Integrated
Memory         16 GB DDR4-3200 (2 × 8 GB SO-DIMM), maximum 64 GB
Storage        512 GB SSD, M.2 2280, PCIe 4.0 NVMe
Display        14" 1920 × 1200 IPS, 60 Hz, 300 nits, anti-glare
Wireless       Wi-Fi 6E, Bluetooth 5.3
Ports          2 × USB-C (40 Gbit/s, charging, DisplayPort),
               2 × USB-A 5 Gbit/s, HDMI, RJ45, 3.5 mm audio
Battery        3-cell 54 Wh lithium-ion
Power adapter  65 W USB-C
Security       TPM 2.0, fingerprint reader

Line by line:

  • Processor: ten cores, of which two are fast performance cores that can each run two threads, hence twelve threads. "Up to 4.4 GHz" is the boost clock, reached only briefly and on a few cores. See CPUs.
  • Graphics: integrated means the graphics are part of the CPU and borrow some of the system memory. Fine for office work and video; not for demanding 3D work.
  • Memory: DDR4-3200 is the memory generation (fourth-generation double data rate) and its speed. Two modules of 8 GB means both memory channels are used. SO-DIMM means small outline dual inline memory module: replaceable laptop modules. To reach the 64 GB maximum you would replace both, since there are no free slots. See Memory.
  • Storage: an SSD on an M.2 card 22 mm wide and 80 mm long, using the fast Non-Volatile Memory Express (NVMe) protocol over PCI Express (PCIe) 4.0. A replacement must match the size and the interface. See Storage.
  • Display: resolution, panel type (in-plane switching, IPS), refresh rate and brightness in nits. See Displays.
  • Ports: the Universal Serial Bus (USB) Type-C ports carry data, video and power, so this laptop can charge and drive a monitor through one cable to a dock. See Ports, Connectors and Cables.
  • Battery and power adapter: capacity in watt-hours (Wh) and the charger's maximum output. A weaker replacement charger may charge slowly or not at all under load.
  • Security: a Trusted Platform Module (TPM) 2.0 chip, required by Windows 11 and used for drive encryption.

Two numbers on the sheet cause regular tickets. The operating system shows the 512 GB drive as smaller, and users ask how long the battery lasts. Both are simple arithmetic:

storage_gb = 512           # "512 GB SSD": decimal gigabytes, 10**9 bytes each
battery_wh = 54            # "54 Wh battery": watt-hours of stored energy

storage_bytes = storage_gb * 10**9
print(f"Storage: {storage_bytes:,} bytes")
print(f"Windows shows: {storage_bytes / 2**30:.1f} GB (binary units, 2**30 bytes)")

for task, watts in [("Office work", 6), ("Video call", 12), ("Full load", 45)]:
    hours = battery_wh / watts
    print(f"{task:<12} at {watts:>2} W: about {hours:.1f} hours")
Storage: 512,000,000,000 bytes
Windows shows: 476.8 GB (binary units, 2**30 bytes)
Office work  at  6 W: about 9.0 hours
Video call   at 12 W: about 4.5 hours
Full load    at 45 W: about 1.2 hours

Drive makers count a gigabyte as 109 bytes; Windows divides by 230 and still writes "GB". No space is missing. The power figures are assumptions for illustration: real draw depends on screen brightness, workload and battery age. On Windows, msinfo32 (System Information) lists most of these components for a machine you have in front of you.

How components talk to each other

The textbook picture of one shared system bus is a simplification. A modern PC uses several dedicated, point-to-point links, each sized for its job:

  • CPU to memory: the memory controller is inside the CPU, with its own channels directly to the memory slots.
  • CPU to fast devices: PCI Express lanes run directly from the CPU to the graphics card slot and usually to one or more M.2 slots for SSDs.
  • CPU to chipset: one link connects the CPU to the chipset, a support chip on the motherboard that provides the slower connections: most USB ports, Serial ATA (SATA) ports, networking, audio and extra PCIe lanes.

Everything behind the chipset shares that one link to the CPU. That is why a motherboard manual specifies which slot connects where, and why the slot you choose for a fast SSD or a second graphics card can make a difference. PCI Express, lanes and generations are covered in Expansion Cards and Graphics.