Translators Flashcards
Advantages of High level
language
- Easier for programmers to read, write and understand programs
- Less likely to make mistakes
- Easier to debug
- Machine independent, the code is portable
Disadvantages of high level language
- The program may be less memory effecient
- Needs to be translated to machine code before running
- The user is not able to directly manipulate the hardware
- May not be able to make use of special hardware
Whats a low-level language
programming languages that are similiar to a computer’s instruction set. These are basic instructions that the CPU will understand
A list of machine code commands that a CPU can process:
Instruction Set
Low-level language examples and what they’re written in.
- Assembly language, written in mnemonics
- Machine code, written in binary
Disadvantages of low-level language
- Take a longer time to write and debug programs
- Programs are more difficult to understand/read/learn
- Programs are not portable (machine dependent)
- More prone to errors
What translates assembly language into machine code
Assembler
How compiler translates a program
- It translates high level language to machine code.
- It translates ALL the code BEFORE it is executed
- Creates an executable file.
- Compiled programs are run without the compiler.
- Provides error report for whole code if error is detected
How interpreter translates a program
- It translates high level language to machine code.
- translates one line of code and then executes it before moving on to the next line.
- Stops execution of program when an error is found
- Allows error correction in real time.
- No executable file is produced.
- Interpreted programs cannot be run without the interpreter.
When to use compiler, interpreter, and assembly language.
- Compiler: compiled program usually distributed for general use.
- Interpreter: when a program is being developed.
- Assembler: assembled program usually distributed for general use.
Compiler advantages
- Original source code is hidden, preventing program from being copied
- Compiled programs can be run without the compiler
- Compiled programs take up less space in memory when executed
- Compiled program is executed in a shorter time
Compiler disadvantages
- Takes a longer time to write, test and debug program during development
Interpreter disadvantages
- Programs cannot be run without the interpreter
- Programs can take longer to execute
Integrated development environment (IDE) meaning
Software that consolidates basic tools required to write and test programs to make a programmer’s journey effective and useful.
IDE Features
- Auto-completion
- Auto-correction
- Error diagnostics
- Translators (compiler/interpreter)