2.5 - Languages & IDEs Flashcards
What is a high level programming language?
A computer programming language used to write programs
—> Similar to natural human language
What are the advantages of a high level language?
- Easier to understand
- Leads to fewer errors
- Written faster
- Allows more powerful, complex commands than low level languages
What are the advantages of a low level language?
- Program written in this language is executed very fast
- Occupies less memory
- Used to control & manipulate specific hardware components
How are programs written in low level languages executed very fast?
High level languages must be translated into machine code before it’s understood by the computer
Low level languages don’t need to be translated
What are the types of low level languages?
- Machine code
- Assembly language
What is machine code?
The instructions that a processor understands and can act upon
—> Pure binary code
What is an assembler?
A program which translates assembly code into machine code
What is a translator?
Translates a program written in one language into another language (usually machine code)
What are the types of translator?
- Interpreter
- Compiler
What is an interpreter?
Converts high-level language one line at a time into machine code and executes it
What is an compiler?
Converts high-level language into machine code for execution at a later time
—> Entire program is converted at once
What is the comparison of Interpreters & compilers on execution method?
Interpreter - translates source code into machine code one line at a time
Compiler - translates all the source code into machine code at once
What is the comparison of Interpreters & compilers on execution speed?
Interpreter - slower
Compiler - faster
Why are interpreters slower than compilers?
Code must be reinterpreted each time as the program is run
Compiler is interpreted at once
What is the comparison of Interpreters & compilers on complexity?
Interpreter - smaller, simpler programs
Compiler - larger, complex programs