</>
Programming Languages & Translators
Start with a question

What language does a computer understand?

Click an answer and use it to begin the discussion.

A computer directly understands...
Ask students why electronic circuits use two states. Then create a binary pattern, let students calculate Decimal, Octal, and Hexadecimal in their notebooks, and reveal each answer only after they finish.
Click any bit: OFF = 0   |   ON = 1
128
64
32
16
8
4
2
1
Binary · Base 2 00000000
Decimal · Base 10
Octal · Base 8
Hexadecimal · Base 16
Core idea

A programming language helps us give instructions to a computer.

Humans write understandable instructions. Translators convert them for the CPU.

🧑‍💻
Programmer
Writes instructions
📝
Program
Sequence of instructions
🔄
Translator
Converts the program
🖥️
Computer
Executes instructions
Keep definitions short: Program = instructions, Programmer = person who writes them, Programming language = language used to write them.
Same task, different language levels

Add 7 + 5 and show the answer.

Click each level to see how the same instruction looks.

Machine Language
1011 0000
0000 0111
0000 0101
...
Direct for the CPU, difficult for humans.
Emphasize the direction: Machine language is closest to hardware. High-level language is closest to humans. Assembly sits between them.
Language translators

Who converts which language?

Use the buttons to animate each translation path.

⚙️

Assembler

Converts assembly language into machine code.

Assembly → Assembler → Machine Code
📦

Compiler

Translates the complete source program before execution.

C Program → Compiler → Executable
▶️

Interpreter

Processes and runs code while the program is executing.

Source → Interpreter → Output
Source Program
Translator
Machine Code / Output
Repeat the memory line three times: Assembly → Assembler. C/high-level → Compiler. Python-style execution → Interpreter.
Compiler vs interpreter

Two different ways to run high-level code

Compiler

Build first
1 Read complete program
2 Translate and report errors
3 Create executable/build output
4 Run the program

Interpreter

Run directly
1 Read part of the program
2 Translate during runtime
3 Execute immediately
4 Stop at an encountered error
Use this sentence: “A compiler prepares the program first; an interpreter stays involved while the program runs.” Mention that real implementations can combine both methods.
Where C fits

From C source code to output

🧑‍💻
C Source Code
result = 7 + 5;
⚙️
Compiler
Translates the program
📦
Executable
Machine instructions
🧠
CPU
Fetch–Decode–Execute
Output
12
This is the bridge to the next lecture. Explain that C is a high-level language with some low-level capabilities, and it commonly uses a compiler.
Quick check

Can you match the language and translator?

Question 1 of 5
Let students answer aloud before clicking. Use the final score as a quick formative check.
One-minute recap

Remember this chain

0️⃣1️⃣
Binary
🧾
Programming Language
🔄
Translator
🖥️
Execution

Humans write easy instructions. Translators convert them into instructions the computer can execute.

End by asking: “Which translator will we use for C?” Expected answer: Compiler.