⚙️ How Does Code Become a Program?

Compilation Stages Visualiser

When you write code, the computer can't understand it directly. A compiler translates your code into machine language — but it does it in stages. Watch each stage happen.

CS GCSE §1.6 CS A-Level Unit 3

🤔 What is a compiler?

A compiler is a program that translates your entire source code (like Python or C) into machine code (binary — 1s and 0s) that the CPU can execute. It does this before the program runs.

This is different from an interpreter, which translates and runs code one line at a time (like Python normally does).

🍕 Analogy: A compiler is like translating an entire recipe book from Welsh to English before you start cooking. An interpreter is like having a translator read each step aloud as you cook — slower, but you can start immediately.
📝

Source Code

Type or select some code to compile. Watch what the compiler does at each stage.