Lesson 2 of 5 · Introduction to Computers

Hardware

The physical parts of a computer, with a closer look at the core components that decide how it performs: the motherboard, CPU, and memory.

Beginner 11 sections 13 min read

What's hardware

Computer hardware is the physical components that make up a computer system and let it perform its essential functions: input, output, processing, and storage.

  • Input: keyboards, mice, and microphones.
  • Processing: the central processing unit (CPU).
  • Output: monitors, printers, and speakers.
  • Storage: thumb drives, solid state drives (SSDs), and similar devices.
Monitor Keyboard Mouse CPU RAM USB drive Printer Headphones
Hardware is anything physical: what you type on, look at, and plug in, plus the parts inside the case.

Core and peripheral hardware

Hardware is separated into two categories.

Core hardware
Foundational physical devices that allow a computer to operate.
Peripheral hardware
Auxiliary devices that connect to a computer to expand what it can do.

Core hardware

Core hardware devices are the foundational components inside the computer case. A computer can't work without them.

Computer case Motherboard CPU Memory (RAM) Storage drive Power supply CPU cooler
Core hardware sits inside the case.
Motherboard
The main communication hub for all hardware devices.
Central processing unit (CPU)
Processes instructions and performs calculations.
Memory
Holds active data for fast access by the CPU.
Internal storage
Long-term storage that keeps your programs and files saved even when the computer is powered down.

Peripheral hardware

Peripherals are auxiliary devices connected to the computer externally or through expansion slots to add extra functions, such as webcams, game controllers, scanners, printers, speakers, and extra monitors.

INPUT OUTPUT Computer Keyboard Mouse Microphone Monitor Printer Speakers
Input devices send data in; output devices show or send results out.
Input devices
Send data to the computer (keyboards, mice, microphones).
Output devices
Display or transmit processed data (monitors, printers, speakers).
External storage
Provide extra or backup space (USB drives, external hard drives).

Why focus on core hardware

As an aspiring IT professional, you don't need to memorize every type of hardware. You need to understand the components that determine how a computer processes, stores, and communicates information. Focusing on core hardware lets you:

  • Understand how computers actually work.
  • Diagnose hardware and performance problems.
  • Build a foundation for networking, cloud, system administration, and databases.

Motherboard

The motherboard (often shortened to "mobo") is a computer's main circuit board. It acts as the central communication hub, connecting the CPU, memory, and every other hardware device.

The CPU (microprocessor) and memory cards (RAM) plug directly into the motherboard. Hard drives and CD/DVD drives connect to it by cable, and expansion cards such as a video card plug into its PCI slots.

CPU socket Expansion (PCI) slots Memory (RAM) slots Power connector Storage (SATA) ports
Everything connects through the motherboard.

The CPU

The central processing unit (CPU) is an electronic chip that acts as the computer's "brain" by processing data, running programs, and executing instructions.

The instruction cycle

Fetch, decode, execute

  1. FetchThe CPU grabs an instruction from the computer's memory.
  2. DecodeIt figures out what the instruction means.
  3. ExecuteIt performs the required action.

Then it fetches the next instruction, over and over.

Evaluating a CPU

A CPU is made up of many tiny components working together, but for this introductory module we'll focus on three factors:

Cores
Physical processing units inside the CPU.
Threads
Virtual (logical) cores that let one physical core handle multiple tasks at once.
Speed
How fast a single core executes instructions.

Cores (physical)

What it is
The independent processing units inside a single CPU chip. Think of each core as an independent worker.
Why it matters
More cores let a computer run many heavy programs at once without lagging.
How it's measured
By counting the physical cores in the chip (for example 4, 6, 8, or up to 128). This is called the core count.

Common examples are single-core, dual-core, and quad-core CPUs, though many CPUs have far more.

Threads (virtual)

What it is
A virtual processor that the computer sees as a separate, independent worker.
Why it matters
It lets one physical core run multiple threads of execution at the same time, for quicker response times and more efficient use of resources.
How it's measured
Threads are counted as logical processors: how many independent task streams the CPU can juggle at once.

Threads are like extra hands that boost a worker's efficiency. A single-core CPU with 2 threads, a dual-core CPU with 4, and a quad-core CPU with 8 are common examples.

Single core 1 core, 2 threads Dual core 2 cores, 4 threads Quad core 4 cores, 8 threads
Each teal block is a physical core; the smaller boxes inside it are its threads.

Cores vs threads: the math

A CPU with 4 cores and 8 threads

  1. 4 cores
  2. × 2 threads per core
  3. = 8 threads

Each core can handle 2 threads at the same time.

Speed (frequency)

What it is
CPU speed (clock speed) is the number of cycles a processor can execute each second.
Why it matters
It's an indication of how fast the processor can perform a task.
How it's measured
In gigahertz (GHz).

A speed of 2.74 GHz means the CPU performs 2.74 billion cycles every second. On Windows, open Task Manager → Performance → CPU to see your CPU's current speed, cores, and logical processors.

CPU speed isn't the same as performance

CPU speed is an important spec, but it doesn't directly dictate how fast a computer completes tasks and runs applications. Other factors matter too:

  • Core count: more cores let the CPU do multiple tasks at the same time.
  • Architecture: newer chip designs can do more work per cycle than older ones.
  • Heat: running at high speeds makes the chip hot, and a hot CPU slows itself down to cool off.

Memory

Memory stores data and program instructions for the processor to use. There are three main types:

RAM (random access memory)
Temporary, fast workspace memory. It holds the data for programs and apps that are open right now, and it's wiped clean when you turn the computer off.
ROM (read-only memory)
Permanent memory that holds the basic instructions your computer needs to start up. You can't easily change or erase it.
Cache memory
An extremely fast, tiny bit of memory built into the processor. It keeps data the computer uses over and over so things run faster.

Memory usually means RAM

When people talk about memory, they usually mean RAM: the computer's short-term memory. Think of it as an open desk where your active tasks sit while you work. The moment you turn the computer off, the desk is wiped clean.

Important things to know about RAM

  • Short-term and volatile: RAM keeps programs open and ready for the CPU to access, and it clears out completely the moment the computer is turned off.
  • Generation (DDR type): the version of the memory technology, such as DDR4 or DDR5. Newer generations are faster and more efficient, but they aren't physically compatible with older motherboards.
  • Multitasking: more RAM means a computer can run more programs without lagging.
  • Speed: reading data from RAM is faster than reading it from disk storage.
  • Instant access: the CPU can read or write data in RAM almost instantly.

Evaluating RAM

To evaluate RAM specs, look at three key factors:

Capacity
How much data the RAM can hold (for example 16 GB).
Speed
How fast the RAM can move data (for example 3200 MHz).
Latency
How long the RAM takes to respond to a request for data (for example CL10).
16 GB Capacity How much it holds 3200 MHz Speed Higher is faster CL10 Latency Lower is faster

Capacity (size)

What it is
The amount of short-term workspace a computer has to run active programs and open files.
Why it matters
More capacity lets a computer run heavier apps or multitask without slowing down. Running out of RAM forces the computer to use slower storage drives instead.
How it's measured
In bytes (B), usually gigabytes (GB) for RAM.
UnitSizeWhat it holds
Byte (B)8 bitsA single character of text, like the letter "A"
Kilobyte (KB)1,024 bytesA short plain-text document
Megabyte (MB)1,024 kilobytesA high-resolution photo or a short MP3 song
Gigabyte (GB)1,024 megabytesA high-definition movie or a modern video game
Terabyte (TB)1,024 gigabytesMassive media libraries

Speed (frequency)

What it is
How many millions (or billions) of data transfer cycles the memory can complete every second.
Why it matters
Higher RAM speed increases bandwidth, so the computer can move data faster.
How it's measured
In megahertz (MHz). Higher numbers mean faster reads and writes. DDR5 RAM, for example, often runs at around 6,000 MHz.

RAM rated at 3200 MHz performs 3,200 million data transfers every second. On Windows, Task Manager → Performance → Memory shows your RAM's speed and how many slots are in use.

Latency (CAS latency or CL)

What it is
The number of clock cycles it takes the RAM to start delivering data after the processor asks for it.
Why it matters
It's moderately important, but in most cases it matters less than RAM speed.
How it's measured
Written as "CL" followed by a number, like CL16 or CL30. Lower is better: RAM rated CL16 waits 16 clock ticks before responding to a read.

Storage: where data lives

Memory is fast, but it forgets everything when the power goes off. Storage keeps data permanently, and it's where every database keeps its data files, logs, and backups. For a DBA, storage is often the first suspect when a database is slow.

Hard drives and solid-state drives

Hard disk drive (HDD)Solid-state drive (SSD)NVMe SSD
How it worksSpinning magnetic platters and a moving armFlash memory chips, no moving partsFlash memory connected directly to the motherboard's fast PCIe lanes
SpeedSlowestMuch fasterFastest
Cost per gigabyteLowestHigherHighest
Typical useLarge archives and backupsEveryday servers and laptopsBusy databases

The difference in speed between memory and storage is enormous, which is why databases work so hard to keep data in memory:

ROUGHLY HOW LONG ONE READ TAKES CPU cacheMemory (RAM)NVMe SSDHard drive about 1 nanosecond about 100 nanoseconds about 100 microseconds about 10 milliseconds
Each bar is ten to a thousand times longer than the one above (not to scale). If reading from memory took one second, reading from an NVMe SSD would take about 17 minutes, and from a hard drive, more than a day.

Measuring storage

Capacity
How much data it holds, in gigabytes (GB) or terabytes (TB).
IOPS (input/output operations per second)
How many separate reads and writes it can handle each second. Databases doing many small, random reads and writes, such as OLTP systems, need high IOPS.
Throughput
How much data it can move per second, in megabytes per second (MB/s). Large scans, backups, and data loads need high throughput.
Latency
How long a single read or write takes. Low latency is what makes a database feel fast.

RAID: combining disks

RAID (redundant array of independent disks) combines several disks so they act as one, for more speed, more protection against a disk failing, or both:

LevelHow it worksSurvives a disk failure?
RAID 0 (striping)Spreads data across disks for speedNo: lose one disk, lose everything
RAID 1 (mirroring)Writes identical copies to two disksYes
RAID 5 (parity)Spreads data plus recovery information across three or more disksYes, one disk, but writes are slower
RAID 10 (mirroring + striping)Mirrored pairs, striped for speedYes; the usual choice for busy databases

Where storage lives

DASNASSAN disks inside or pluggedinto one server a file server shares filesover the regular network shared disks over a fast,dedicated storage network
Direct-attached storage (DAS)
Disks inside a server or plugged straight into it. Simple and fast, but only that one server can use them.
Network-attached storage (NAS)
A storage device that shares files with many computers over the normal network. Common for shared folders and backups.
Storage area network (SAN)
A dedicated, high-speed network connecting servers to shared storage arrays. Each server sees its share as its own disk, called block storage. SANs are common for large databases.
Cloud storage
In the cloud, databases use block storage volumes, such as Amazon EBS or Azure Managed Disks, which you can resize and choose by speed and IOPS.

In practice: reading a database server's specs

Kofi's team is buying a new server for the sales database. The vendor's quote lists:

SpecWhat a DBA reads into it
2 CPUs × 16 cores, 64 threads32 cores for running queries in parallel. Commercial databases such as Oracle and SQL Server are licensed per core, so the core count can decide the license bill, which is often far bigger than the price of the server.
512 GB of RAMMost of it can go to the database's memory caches, so frequently used data is read from memory instead of disk.
8 × 3.84 TB NVMe SSDs in RAID 10Fast, low-latency storage for data files and logs, with mirroring so one failed disk doesn't stop the database.
Dual 25 Gb network portsFast connections to the applications and to the backup system, with a spare if one fails.

When the database later runs slowly, these same numbers are where a DBA starts: is the CPU busy, is memory full, or is storage the bottleneck?

Key takeaways

  • Core hardware (motherboard, CPU, memory, internal storage) is required; peripherals add functions.
  • The CPU runs a continuous fetch-decode-execute cycle. Judge it by cores, threads, and speed together.
  • RAM is fast, temporary workspace. Judge it by capacity, speed, and latency.
  • Data is measured in bytes: each unit is 1,024 times the one before it.
  • Storage keeps data permanently. SSDs are far faster than hard drives, and IOPS, throughput, and latency measure storage performance; RAID adds speed or protection, but isn't a backup.