What a computer actually does
You'll learn the four jobs every computer does, and why a program must be a list of exact steps.
Watch & read
Start with the required ones. The others are there when you need them.
Explanation
You use a computer every day. But what is it actually doing when you tap, type or click?
Every computer, from your phone to a laptop, does four jobs:
- Input: it takes something in. A key press, a tap, a photo from the camera.
- Processing: it works on it. The part that does this is the CPU (the processor).
- Memory and storage: it keeps things, for now or for later.
- Output: it gives something back. Text on the screen, a sound, a message sent.
Think of sending money with bKash. You type the amount (input). The app checks your balance and takes the money away (processing). Your new balance is kept (storage). The screen shows "Send money successful" (output).
A computer keeps things in two places.
- RAM is like your study desk. Things you are using right now are on it. It is fast, but small, and everything on it is cleared when the power goes off.
- Storage (the SSD or hard disk) is like your cupboard. It is slower, but much bigger, and things stay there after you switch off.
When you open a file, the computer copies it from the cupboard to the desk. When you press save, it puts it back in the cupboard. That is why unsaved work is lost in a power cut: it was only on the desk.
A program is a list of instructions the computer follows, one by one, in order. The computer is very fast, but it does exactly what the steps say, nothing more. It does not guess what you meant.
const price = 120;const quantity = 3;const total = price * quantity;console.log(total);
This tiny program keeps two numbers in memory, multiplies them (processing) and shows 360 (output).
You do not need to write code like this yet. Just notice: each line is one small, exact step.
People often think the computer "understands" what they want. It does not. If you tell a friend "bring the notes", they know which notes. A computer needs every detail: which file, which folder, which line. Most early errors come from a step that was almost right.
When you meet any app or any program, ask four questions: What goes in? What work is done? What is kept? What comes out? If you can answer them, you understand what the program is for.
Code tour
Click a line number with a ring to read the note for that line.
Quick check
3 questions. Each one explains itself after you answer.
- 1 / 3You are typing an assignment and the power goes off before you save. Why is the new text lost?
- 2 / 3On a phone calculator you type
12 + 30and see42. Which part is the output? - 3 / 3Why must a program spell out every step?