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 Flip

High-Level Language

Designed for humans. Uses English keywords like print and if.

Exam Tip: Portable (runs anywhere) and easy to debug.

Assembly

LDA, STA, ADD

Tap to Flip

Assembly Language

Low-Level. Uses short text codes called Mnemonics instead of binary.

Exam Tip: 1-to-1 mapping with machine code. fast & efficient.

Machine Code

10110010 11001000

Tap to Flip

Machine Code

Pure Binary (1s and 0s). The only language the CPU understands.

Exam Tip: Specific to one type of processor. No translation needed.
Exam Tip Remember: Low-level languages are efficient and allow direct hardware manipulation, but difficult to write. High-level languages are slower to execute but much faster to develop software in.

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 Lab

Practice Questions

1. Why does high-level code need to be translated?

Show Answer
Because the CPU/Processor can only understand and execute Machine Code (Binary).

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.