Translators And Languages (yr 11) Flashcards
What is the difference between high-level and low-level languages?
High-level languages (e.g. Python) are easier for humans to read and write, using syntax similar to English.
Low-level languages (e.g. assembly) are closer to machine code and allow direct hardware manipulation.
What is the purpose of a compiler?
A compiler translates high-level source code into machine code in one go before the program is run. It produces an executable file and checks for all syntax errors at once.
What is the purpose of an interpreter?
An interpreter translates and runs code line-by-line. It stops when it encounters an error, making it easier to debug during development.
What is an assembler?
An assembler converts assembly language into machine code. It is used to program hardware at a low level.
State two advantages of using high-level languages.
- Easier and faster to write, understand, and maintain.
- Portable across different hardware systems.
State two advantages of using low-level languages.
- Greater control over hardware.
- More efficient in terms of speed and memory usage.