Understand what a machine really is, what a program is, and what the operating system is actually for.
Open this lesson in KodokonA computer, a phone, a tablet: they are all machines doing the very same thing, running extremely simple instructions, but at incredible speed. Inside, three parts matter to us. The processor is the worker: it calculates, compares and moves data around, billions of times per second. The memory, usually called RAM, is its worktop: it keeps whatever the processor is using right now within arm's reach. Storage (a hard drive or an SSD) is the cupboard: it holds on to your files even when the machine is switched off.
The difference between memory and storage is what trips up beginners the most. Picture a kitchen: the worktop is big, but it gets cleared completely at the end of service, while the cupboards keep everything from one day to the next. Memory works the same way: it is fast, but it empties completely when the machine shuts down. Storage is slower, but it remembers. That is why an unsaved document vanishes in a power cut: it only ever existed on the worktop.
A program is a list of instructions written in advance, which the machine runs in order. Exactly like a cooking recipe: each step is dumb on its own, but the sequence produces a result. Programming is simply writing that recipe in a language the machine knows how to follow. Nothing magical about it: you break a task down into steps small enough that none of them is ambiguous.
Program "make a coffee":
1. Fill the water tank
2. Put a capsule in the machine
3. Place a cup under the spout
4. Press the button
5. Wait 30 seconds
6. Take the cup awayOne question is left: who decides which program runs, who keeps your files in order, who stops two applications from trampling on each other? That is the operating system, usually shortened to OS. It is the conductor of the orchestra. On computers, the big three are Windows, macOS (Apple's Macs) and Linux. On phones, they are Android and iOS. Your programs never speak to the hardware directly: they always go through the system.
You
|
Applications (browser, game, code editor)
|
System (Windows, macOS, Linux)
|
Hardware (processor, memory, storage)