Programming Languages and IDEs Flashcards
What is a high level programming language?
- Language similar to spoken English
- Written as source code
What is a low level programming language?
- Language similar to the computer’s instruction set
- Written in machine code or assembly
What are the advantages of using a high level programming language?
- Easier to write in, understand and debug
What are the advantages of using a low level programming language?
- Quicker to execute
- Can program anything with it (source code is limited to the commands available)
What are the disadvantages of using a high level language?
- Slower to execute
- Not everything can be programmed as source code due to the limited commands available
What are the disadvantages of using a low level language?
- Difficult to write in, understand and debug
What is assembly?
- Low level language
- Uses mnemonics
- Each mnemonic corresponds with a machine code instruction
What are the 3 types of translator?
- Compiler
- Interpreter
- Assembler
What is a translator?
A program that either:
- Converts source code into machine code
- Converts assembly code into machine code
What is a compiler?
A translator that converts into machine code in one go
What is an interpreter?
A translator that translates lines one by one as the program is running
What is an assembler?
A translator that converts assembly into machine code
What are the advantages of compilers?
- The program runs quickly because it has already been translated
- They optimise code
- Compiled programs can be supplied as executable files
What are the advantages of interpreters?
- Instructions are executed as soon as they are translated
- This means when errors occur they can be easily spotted since the program stops running
- This also means less memory is required
What are the disadvantages of compilers?
- Takes up lots of memory because program is translated at once
- The program needs to be recompiled whenever an edit is made to the code
- Program will not run if it contains syntax errors