Skip to content

How Code Becomes a Running Program

Beginning of the lesson

How Code Becomes a Running Program

From the words you type to a game that really runs

Big Idea: You write code in words that people can read. But a computer only understands its own secret language of 1s and 0s. A special helper called a translator turns your words into that secret language, and then your program can run!
By the end you will be able to:
  • explain the path from source code to a running program,
  • say what a translator does and why it is needed,
  • tell the difference between compiled languages (like C++) and interpreted languages (like Python and JavaScript).

1. Source code: the words you write

When a programmer makes a program, they type instructions in a programming language such as Python, C++, or JavaScript. This text that a person writes and can read is called source code.

Source code looks a bit like short, tidy English. For example, one line might say print("Hello!"). That is easy for a person to read — but a computer cannot follow it directly yet.

2. Machine code: the computer's own language

Deep inside, a computer only understands machine code — long strings of 1s and 0s like 01001000 01101001. That is the only language it can run directly.

People find it very hard to read 1s and 0s, and computers cannot read our words. So we have a problem: how do the words you type become something the computer can actually do?

Continue this lesson on YourAIZone

The full lesson has the complete explanation, worked examples, common mistakes, tests with instant checking and an AI tutor. Start right away as a guest, or create an account to keep your progress.

In the full lesson

  • The complete explanation
  • Worked examples
  • Common mistakes and how to avoid them
  • Test questions: 15
  • AI tutor that answers questions about the topic
  • Progress tracking for students, parents and teachers