2.5.1 Languages & Translators

Cards (24)

  • What are the two types of programming languages used within computer systems?
    High-Level Languages and Low-Level Languages
  • Why do programmers use high-level languages?
    They are easier to understand and use, resembling natural human language.
  • What is a key advantage of using high-level languages over low-level languages?
    High-level languages lead to fewer errors and allow for more complex commands.
  • What must happen to high-level languages before they can be run?
    They must be translated into machine code (binary).
  • Name three popular high-level programming languages.
    Python, C++, and Java
  • What do low-level languages not closely resemble?
    A natural human language
  • When are low-level languages typically used?
    When a program must be executed quickly or interacts directly with hardware.
  • What are the two types of low-level languages?
    Machine Code and Assembly Language
  • What is machine code?
    Pure binary code that computers can directly process and execute.
  • Why is machine code difficult for humans to understand?
    It is extremely tedious and complex.
  • What is an advantage of using machine code?
    It executes faster than high-level programs.
  • What does assembly language use to perform actions?
    Specialised command mnemonics
  • Why do many programmers prefer assembly language over machine code?
    It is easier to understand and spot errors.
  • What is the function of a translator in programming?
    It changes a program written in one language into another language.
  • What are the two main types of translator?
    Interpreter and Compiler
  • How does an interpreter work?
    It converts high-level language one line at a time into machine code and executes it.
  • What is a key difference in execution speed between an interpreter and a compiler?
    An interpreter is slower because it reinterprets code each time the program runs.
  • What is one advantage of using a compiler?
    It produces an executable file that can run on other machines without needing the compiler.
  • How does error reporting differ between interpreters and compilers?
    An interpreter reports errors immediately and stops the program from running.
  • What must happen to compiled programs after changes are made?
    They must be re-compiled.
  • How do high-level languages compare to low-level languages in terms of ease of understanding?
    High-level languages are easier to understand than low-level languages.
  • Which type of language requires translation: high-level or low-level?
    High-level languages require translation.
  • Which type of language is quicker to execute: high-level or low-level?
    Low-level languages are quicker to execute.
  • What are the key features to compare between interpreters and compilers?
    • Execution Method
    • Execution Speed
    • Complexity
    • Error Reporting
    • Repetition