2.5.1 Languages

Cards (23)

  • What are high-level languages aimed at?
    Humans and programmers
  • How do high-level languages differ in structure compared to low-level languages?
    They have an English-like structure and syntax
  • What is a key feature of high-level languages regarding hardware?
    They are hardware independent
  • What must high-level languages do before they can be run?
    They must be translated, compiled, or interpreted
  • How many machine code instructions does one high-level command equate to?
    Many machine code instructions
  • What is low-level code also known as?
    Assembly code
  • What do mnemonics in assembly code represent?
    Abbreviations of code
  • How does the relationship between assembly language instructions and machine code instructions differ from high-level languages?
    One assembly language instruction translates to one machine code instruction
  • What is machine code?
    Code for the CPU to execute
  • What type of instructions does machine code consist of?
    Binary instructions
  • Why is machine code not portable to different systems?
    It is specific to a particular type of computer
  • What is the purpose of translators in programming?
    To convert source code to binary or machine code
  • What type of code can the processor run?
    Binary or machine code
  • How does a compiler translate code?
    All at once
  • What does a compiler produce after translation?
    An executable file
  • When does a compiler report errors?
    At the end of the compilation process
  • How does an interpreter translate code?
    Line by line
  • What happens when an interpreter encounters an error?
    It stops translating
  • What is the role of an assembler?
    To translate assembly code into machine code
  • What are the main differences between a compiler and an interpreter?
    • Compiler translates all code at once and produces an executable file.
    • Interpreter translates code line by line and stops at errors.
  • What are the characteristics of high-level languages?
    • Aimed at humans and programmers
    • English-like structure and syntax
    • Machine independent and portable
    • Requires translation to run
    • One command equates to many machine code instructions
  • What are the characteristics of low-level code?
    • Known as assembly code
    • Uses mnemonics for instructions
    • One instruction translates to one machine code instruction
    • Needs translation to machine code for execution
  • What is machine code and its characteristics?
    • Code for CPU execution
    • Composed of binary instructions
    • Specific to a particular type of computer
    • Not portable and does not need translation