Languages & Translators
Understanding the difference between high and low level code, and how we translate it for the processor.
Lesson Objectives
1. Levels of Programming Language
High-Level
Python, Java, C#
Tap to FlipHigh-Level Language
Designed for humans. Uses English keywords like
print and if.
Assembly
LDA, STA, ADD
Tap to FlipAssembly Language
Low-Level. Uses short text codes called Mnemonics instead of binary.
Machine Code
10110010 11001000
Tap to FlipMachine Code
Pure Binary (1s and 0s). The only language the CPU understands.
2. Translators
Processors only understand Machine Code (Binary). Therefore, high-level code and assembly language must be translated before they can be run.
| Feature | Compiler | Interpreter |
|---|---|---|
| Translation Method | ? | ? |
| Executable File | ? | ? |
| Error Reporting | ? | ? |
| Distribution | ? | ? |
Click the '?' boxes to reveal the answers
What about Assemblers?
An Assembler is a third type of translator. It is very simple: it translates Assembly Language mnemonics directly into Machine Code.
Interactive Lab: See it in action
Run code through a virtual Compiler and Interpreter to see the difference.
Open Translator LabPractice Questions
1. Why does high-level code need to be translated?
Show Answer
2. Give two benefits of using a Compiler instead of an Interpreter.
Show Answer
- Produces an executable file so source code is not needed to run.
- Protect intellectual property (users cannot see source code).
- The program generally runs faster as strictly optimized machine code.