Interpreters and compilers (Edexcel GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
13 cards from this deck
ShowHide
Practise the cards
13 cards from this deck
Examples of high-level languages
Examples of high-level languages
Python, Java, C++
What do computers understand?
What do computers understand?
Machine code (binary: 0s and 1s)
Why do we need translators?
Why do we need translators?
Convert high-level code to machine code
How does a compiler translate code?
How does a compiler translate code?
Translates entire program at once, before running
What is source code?
What is source code?
Original high-level code written by programmer
What is object code?
What is object code?
Machine code created by compiler; executable file
Compiler advantage: execution speed
Compiler advantage: execution speed
Fast execution (already in machine code)
Compiler disadvantage: platform
Compiler disadvantage: platform
Platform-specific (not cross-platform)
How does an interpreter translate code?
How does an interpreter translate code?
Translates line by line while program runs
Interpreter advantage: errors
Interpreter advantage: errors
Immediate error reporting; stops at error location
Interpreter disadvantage: speed
Interpreter disadvantage: speed
Slower execution (translates each time program runs)
What does an assembler do?
What does an assembler do?
Translates assembly language to machine code
What does assembly language use?
What does assembly language use?
Mnemonics (e.g., ADD) instead of binary
