Every device is a computer
A phone, a tablet, a Chromebook, a laptop, a desktop PC and a game console look very different. Inside, they are all the same kind of machine: a computer. They have the same parts, packed into different shapes.
Every computer does three jobs, over and over: input (it gets something from you, like a tap, a key press or a mouse click), process (it works out what to do) and output (it shows you the result on a screen or plays a sound). A game is just this loop, repeated 60 times a second.
Phone
Small, battery powered, and the screen is also the keyboard.
Tablet
Like a big phone. Great for reading, drawing and games.
Chromebook
A light laptop that runs mostly web apps, which is why many schools use them.
Laptop
A computer with a screen, keyboard and battery in one folding piece.
Desktop PC
Lots of room inside, so parts can be bigger, cooler and upgraded.
Game console
A computer built for games, with a strong graphics chip and a controller.
The CPU: the brain
The CPU (central processing unit) is the chef of the computer. It follows a recipe of very small instructions, one tiny step at a time: "get this number", "add these two", "put the answer there". A whole game is millions of steps like these.
How fast it works is its clock speed, measured in GHz. One GHz is a billion steps every second. A phone or laptop CPU runs at about 3 GHz, so it does around three billion steps per second.
Most CPUs have several cores. A core is like an extra chef in the kitchen. Four cores can work on four different things at the same time, so the computer can play music, run a game and download a file all at once.
Be the CPU
Here is a tiny program that adds 10 points to a score. Press Step to run one line at a time. Watch the two registers (tiny boxes inside the CPU) and the cell in RAM.
Press Step to run line 1.
A 3 GHz CPU does about 3,000,000,000 steps like this every second.
RAM: the desk
RAM (random access memory) is the computer's desk or kitchen counter. It's where everything you are using right now is kept, so the CPU can grab it instantly. RAM is very fast but short-term: when the power goes off, the desk is cleared.
More RAM means a bigger desk, so more things can be open at once. When the desk is full, the operating system has to move some things to the storage drive, which is much slower. That's why a device with too little RAM starts to feel slow and laggy.
Fill up the RAM
Pick how much RAM your device has, then open and close apps. The operating system always uses 2 GB for itself. What happens when the desk is full?
Storage: the backpack
Storage is where files live for the long term: apps, games, photos, music and saved progress. Unlike RAM, it keeps everything when the power is off. Think of it as your backpack or the pantry, while RAM is the desk.
There are three common kinds:
- Hard disk (HDD). Spinning metal disks with a tiny arm that reads them, like a record player. Cheap and big, but slower, and it can break if dropped. Older computers use them.
- Solid-state drive (SSD). No moving parts, so it is much faster and tougher. Most new laptops and consoles use SSDs.
- Flash storage. The same idea as an SSD, built into phones, tablets and Chromebooks.
How big is a byte, a megabyte, a terabyte?
Computers count in bits (one 0 or 1). Eight bits make a byte. Every step up the ladder is about 1,000 times bigger.
| Unit | Size | What fits |
|---|---|---|
| bit | one 0 or 1 | one tiny switch |
| byte | 8 bits | one letter, like "A" |
| KB kilobyte | 1,000 bytes | a short text message (about 1–2 KB) |
| MB megabyte | 1,000 KB | a photo (about 3 MB), a song (about 4 MB), a small web game (a few MB) |
| GB gigabyte | 1,000 MB | a movie (about 2 GB), a big console game (50–150 GB) |
| TB terabyte | 1,000 GB | hundreds of movies, or a big gaming PC drive |
The GPU: the painter
The GPU (graphics processing unit) draws the picture you see. A CPU has a few very clever cores. A GPU has thousands of small ones that all color pixels at the same time. That's perfect for graphics, where there are millions of dots to paint.
A pixel is one tiny dot on the screen. A common 1920 × 1080 screen has about 2 million pixels. A game redraws every one of them 60 times a second, which is about 124 million pixels every second.
Each pixel is made of three tiny lights: red, green and blue. Each light can be set from 0 (off) to 255 (full). Mixing them makes every color on the screen.
Mix a color
Move the three sliders and watch the color change. The numbers below are exactly what a game sends to the GPU.
How the parts work together
Let's follow what happens inside your device when you tap Leon Games. Click through the steps.
The operating system
The operating system (OS) is the boss software that runs everything else. When you turn a device on, the OS starts first. Its jobs:
- Shares the CPU and RAM between all the apps, so they don't fight.
- Manages files on the storage drive.
- Talks to the hardware using small programs called drivers, one for each part (screen, speaker, camera, controller).
- Asks permission before an app can use your camera, microphone or location.
- Draws the home screen and windows you click on.
The main operating systems
Windows
Apps come from the Microsoft Store or from the web.
macOS
Apps come from the App Store or from the web.
ChromeOS
Runs mostly web apps, plus apps from the Play Store.
Android
Apps come from Google Play.
iOS / iPadOS
Apps come from the App Store.
Linux
Runs most of the servers on the internet, including many of Cloudflare's.
Console systems
PlayStation, Xbox and Switch each run their own system.
An app built for one OS usually can't run on another, because each OS has its own rules for talking to the hardware. A game for Windows needs to be rebuilt for Android, then again for iOS.
The browser is the universal translator. It's an app that exists on every OS, and it understands the same web language everywhere. So Leon Games runs on all of them with just one version.
Which OS is it?
Keep your device healthy
A few easy habits keep a device fast and safe:
- Install updates. They fix security holes that bad people could use, and they fix bugs. An update you keep postponing is a door left unlocked.
- Restart now and then. Restarting clears the RAM and stops apps that got stuck.
- Keep some storage free. A drive that is completely full makes a device slow and can stop updates.
- Only install apps from the official store, with an adult's OK. Apps from random websites can hide viruses.
- Check app permissions. A flashlight app doesn't need your contacts or microphone. Say no.
- Don't let it overheat. Don't leave it in the sun, under a pillow or on a blanket while charging. Heat slows it down and wears out the battery.
Check what you learned
6 questions about this track. Pick an answer to see if you got it right. Your answers are saved only on this device.