2.5 - Programming Languages & IDE's Flashcards
What is a High Level Language?
- Source code
- Translated by a compiler/interpreter into machine code
- Quicker & easier to write/understand
- Will run on different types of processors
- Less memory efficient
What is a Low Level Language?
- Assembly language
- Translated by an assembler into machine code
- Harder to write/understand
- Only works on one type of processor
- Works directly with memory
What is the difference between HLLs & LLLs?
HLL: Translated by compiler/interpreter to machine code
LLL: Uses mnemonics, translated by assembler to machine code, harder to write/understand
What are the three main translators?
- Compilers
- Interpreters
- Assemblers
What is the purpose of translators?
To convert source code into object code so the computer can understand it
What is a compiler?
- Translates source code from HLL to object code then machine code
- Whole program is translated into machine code before it’s run
What is an interpreter?
- Translates source code from HLL to machine code
- Translated line by line as it’s running
What’s the difference between compilers and interpreters?
Compiler: Translates code all at once
Interpreter: Translates code line by line
What are some advantages of a compiler?
- No need for translation software at runtime
- Speed of execution is faster
- Code usually optimised
- Original source code hidden
What are some disadvantages of a compiler?
- Program won’t run with syntax errors in code - more difficult to write
- Code needs to be recompiled when changed
- Designed for a specific type of processor
What are some advantages of an interpreter?
- Easy to write - program always runs & stops when it finds syntax error
- Doesn’t need to be recompiled when changed
- Easy to try out commands
- Very easy for beginners
What are some disadvantages of an interpreter?
- Translation software needed at runtime
- Execution speed is slower
- Code not optimised
- Source code is needed
What does IDE stand for?
Integrated Development Environments
What functions does an IDE provide?
- Editors
- Error diagnostics
- Run Time Environment
- Translators
What is an editor?
Software that allows us to write/edit code in a window
Provides:
- Navigation - showing/hiding sections of code
- Formatting source code - colour coding/indentation
- Find and replace
- Comment regions
- Auto completion