OCR GCSE Computer Science (J277) · Programming languages & IDEs
Mini-Lesson
Programming languages & IDEs
This mini-lesson covers OCR J277 · 2.5: high-level vs low-level languages, machine code & assembly, translators (compiler, interpreter, assembler) and the tools of an IDE (editor, error diagnostics, run-time environment, translators).
Answer the questions as you go and collect ⭐ stars. Press Start when you're ready.
Languages · levels
High-level vs low-level languages
Programming languages sit on different levels:
High-level languages (e.g. Python, Java) — close to human language, easy to read/write and portable across machines. Must be translated before running.
Low-level languages — close to the hardware. This includes machine code (binary, 1s and 0s — the only language the CPU runs directly) and assembly language (mnemonics like ADD, LDA that map to machine code).
Trade-off: high-level = easier for humans & portable; low-level = harder to write but gives fine control and can be more efficient/faster.
Quick check
Which level?
?Which of these is the only language a CPU can execute directly, without translation?
Machine code & assembly
Machine code & assembly language
Two low-level forms:
Machine code — instructions as binary (0s and 1s). Runs directly on the CPU but is extremely hard for humans to write.
Assembly language — uses short mnemonics (e.g. ADD, SUB, LDA, STA) instead of binary. Easier than machine code but still specific to a processor. It is turned into machine code by an assembler (one-to-one).
Nail it: assembly is a low-level language translated by an assembler; it is one step above raw machine code.
Translators
Translators: compiler, interpreter & assembler
A translator converts source code into machine code. Three types:
Compiler — translates the whole program at once into machine code before it runs, creating an executable. Fast to run afterwards; errors are reported all together at the end.
Interpreter — translates and runs the program one line at a time. Great for finding errors as you go, but slower to run and needs the interpreter each time.
Assembler — translates assembly language into machine code (one-to-one).
Compiler vs interpreter: a compiler translates the whole program in one go; an interpreter translates line by line as it runs.
Quick check
Which translator?
?A translator runs a program one line at a time, stopping at the first error it meets. Which translator is this?
Sort it
Language or translator?
Tap an item, then tap what it is.
🔤 High-level
⚙️ Low-level
🔁 Translator
The IDE
The Integrated Development Environment (IDE)
An IDE is software that gives programmers all the tools they need in one place:
Editor — where you write code, with features like syntax highlighting, auto-complete and auto-indent.