Translators (OCR A-Level Computer Science): Flashcards

📚Flashcards
Translators
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

15 cards from this deck

Show

Why are translators needed?

Convert code to machine code for computer execution

Three main types of translators

Compilers, interpreters, assemblers

What does a compiler do?

Translates entire program to machine code in one go

When does a compiler report errors?

After translating entire program (batch reporting)

Compiler speed advantage

Pre-compiled code runs faster (no runtime translation)

Main compiler drawback

Long initial translation; must fix all errors before running

What does an interpreter do?

Translates & executes code line-by-line at runtime

When does an interpreter report errors?

Immediately as they occur (real-time debugging)

Interpreter development benefit

Easier debugging; immediate error feedback & flexibility

Interpreter speed drawback

Slower execution (translates line-by-line during runtime)

What does an assembler do?

Translates assembly language to machine code

Assembly language translation type

One-to-one correspondence with machine instructions

Assembler main benefit

High efficiency & direct hardware control

Assembler portability issue

Hardware-specific; code rewritten for different processors

Compiled vs interpreted code speed

Compiled code runs faster than interpreted code

Join 100,000+ A-Level students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.