beginner

Inside the Machine: How a Computer Works

Learn what each major part of a computer does, what happens between pressing the power button and seeing a login screen, and how to read hardware symptoms like a technician. Then fix the 'my 1 TB drive shows 931 GB' mystery in real Python.

50 min

1. Executive summary and objective

Every support problem starts with a machine that is not doing what a person expects. To help, you need a mental map of what is inside that machine and what each part does. Then a symptom such as “it turns on but the screen stays black” becomes a short list of suspects instead of a mystery.

Objective: by the end of this lesson you can name the main components of a computer, describe what happens from power button to login screen, and use that knowledge to narrow down a hardware fault.

2. The core idea: input, processing, storage, output

Every computer, from a phone to a server, does the same four jobs:

  1. Input: takes in data (keyboard, mouse, microphone, network).
  2. Processing: does something with it (the CPU, helped by the GPU).
  3. Storage: keeps it, briefly or permanently (RAM and drives).
  4. Output: shows or sends the result (display, speakers, network).

Think of a kitchen. The CPU is the cook, the RAM is the counter space the cook is working on right now, the storage drive is the pantry and fridge, and the motherboard is the whole kitchen layout that lets everything reach everything else. A tiny counter (little RAM) means the cook keeps walking back to the pantry, and the whole meal slows down.

The parts you will meet most often

Part What it does Key facts for a technician
CPU (processor) Executes instructions Described by cores, clock speed and cache. It must match the motherboard’s socket. It produces heat, so it needs a heatsink or cooler.
RAM (memory) Fast, temporary workspace for running programs Volatile: contents vanish when power is lost. Comes in modules that must match the board’s type (for example DDR4 or DDR5).
Storage (SSD or HDD) Keeps your operating system and files Persistent: survives power-off. SSDs have no moving parts and are much faster than spinning HDDs. NVMe SSDs plug into the board directly and are faster than SATA SSDs.
Motherboard Connects every component Holds the CPU socket, RAM slots, expansion slots, storage connectors and the firmware chip.
Power supply (PSU) Converts wall power into the lower voltages components use Rated in watts. An underpowered or failing PSU causes crashes and random restarts.
GPU (graphics) Draws the picture and speeds up graphics and parallel work May be built into the CPU (integrated) or a separate card (dedicated).
Cooling Removes heat Fans, heatsinks, thermal paste. Overheating makes a CPU slow itself down (thermal throttling) or shut the machine off.

3. Firmware and the boot process

Before any operating system exists, something has to wake the hardware up. That is firmware: small software stored on a chip on the motherboard. Modern computers use UEFI. Older ones used BIOS, and you will still hear people say “BIOS” to mean either.

POST (Power-On Self-Test) checks that the essentials work: CPU, RAM, and graphics output. If something fails, many boards signal it with beep codes or a light, but the patterns are different for each manufacturer, so the real answer is always in that board’s manual rather than a universal chart.

Two settings you will touch in UEFI setup:

  • Boot order: which device the firmware tries first. A wrong boot order is a classic reason a freshly cloned drive “won’t boot”.
  • Secure Boot: only lets the firmware start software signed by a trusted authority. It protects against some boot-level malware. Some older operating systems and tools will not start with it on.

4. Hands-on: the “missing” 69 GB

New technicians get this question constantly: “I bought a 1 TB drive but Windows only shows 931 GB. Did I get cheated?”

No. It is a units difference. Drive makers define 1 TB as 1,000,000,000,000 bytes (decimal, powers of 1000). Windows measures in binary units (powers of 1024) and, confusingly, labels them GB. The correct name for the binary unit is GiB.

So the displayed size is the byte count divided by 2 to the power of 30, which is 1,073,741,824.

Drive size: marketing versus operating system — Python 3
WHAT TO DO
A drive is advertised in decimal terabytes (1 TB = 1,000,000,000,000 bytes). Windows shows binary units: bytes divided by 1,073,741,824 (that is 2**30). Write usable_gib(tb) so it returns the size Windows will show, rounded to 1 decimal place. Example: usable_gib(1) should give 931.3
YOUR CODE (edit here, then press Run)
Ctrl/⌘ + Enter
OUTPUT

The skill behind this is not the arithmetic. It is knowing that a surprising number is often a units problem, not a fault. Check that before you replace anything.

5. Verification and troubleshooting by symptom

Use the parts map to turn symptoms into a short list of suspects, cheapest and easiest first.

Symptom Likely suspects (check in this order)
Nothing happens at all when you press power Wall outlet and power cable, the PSU switch, front-panel power connector, then the PSU itself
Fans spin, no picture Monitor input and cable, RAM reseated, graphics cable plugged into the right output (card, not motherboard)
Beeps or error lights at start Look the pattern up in that board’s manual: it usually points at RAM, graphics or CPU
“No boot device” or boot loops Boot order, drive connection, whether the drive is detected in UEFI, then the OS
Slow, then freezing RAM use, drive health, dust and heat (thermal throttling), background software
Random restarts or shutdowns Overheating, failing PSU, faulty RAM

Two habits that save hours: change one thing at a time, and write down what you tried so you do not repeat yourself. The next lesson series builds this into a full method.

A desktop's fans spin and the lights come on, but the monitor says 'No signal'. The monitor works fine on another computer. Name two checks you would make before suspecting the motherboard.

Reseat the RAM modules and confirm the display cable is plugged into the correct output (the dedicated graphics card if there is one, not the motherboard port). Also try another cable or port, and check for a loose power connector to the graphics card. These are quick, free checks that fix a large share of “no picture” cases.

Can You Explain It?

Close the lesson and answer these without looking back. The goal isn't the wording — it's whether you've formed a usable mental model.

  • In your own words, what is the difference between RAM and a storage drive, and what happens to each when you switch the computer off?
  • Walk through what happens between pressing the power button and seeing the login screen.
  • A customer says a new 2 TB drive 'is missing space'. How do you explain it, and what number should they expect to see?

6. Key takeaways

  • Every computer takes input, processes it, stores data and produces output; each part has one clear job.
  • RAM is temporary and fast; storage is permanent and slower. Too little RAM makes a machine feel slow.
  • Firmware (UEFI) starts the hardware and POST before the bootloader and operating system take over.
  • Many “faults” are units or settings issues (GB versus GiB, boot order). Rule those out first.
  • Work cheapest check first, one change at a time, and always handle components with ESD precautions.

🧪 Want to practise this on your own computer? See how to set up your lab →

🤖

Need clarification? Ask GT

Hi, I'm GT — your AI tutor for Inside the Machine: How a Computer Works. What would you like to know?
📝

Knowledge Check

1 of 4

A PC powers on (fans spin) but nothing appears on the screen and there is no operating system activity. Which component is the LEAST likely first suspect?

Official References

Report a problem

About: /lessons/it-support-how-a-computer-works