Programming languages and Integrated Development Environments Flashcards
What’s an example of a high and low level language?
High - python
Low - Assembly
What is the purpose of low level languages?
When a program needs to be executed quickly or when programmers need a code that directly interacts with the hardware
What is low level languages instructions to machine code?
Don’t resemble natural human language
One instruction translates to one machine code
What is the purpose of high level language?
Leads to less mistakes and more powerful and complex commands
What is high level languages instructions to machine code?
Commands like english
One instruction translates to many instructions
What type of processor can high level languages run on?
Can be run on different types of processors
What type of processor can low level languages run on?
Only one specific type of processor
What is the data structure for a high level language?
Doesn’t directly work with memory
What is the data structure for a low level language?
Works with memory directly
What is the ease for coding in high level language?
Easy to write and understand
What is the ease for coding in low level language?
Difficult to write and understand
What is the memory efficiency of high level languages?
Less memory efficient
What is the memory efficiency of low level languages?
More memory efficient
What is the speed of execution for a high level language?
Slower as it can’t be directly accessed by the CPU
What is the speed of execution for a low level language?
Faster
Why are language translators needed?
It’s a program that translates source code into machine code
What is source code?
Code written by the programmer
What is machine code?
Code that’s executed by the computer
What is the execution method of an interpreter?
Translates one line of code at a time into machine code and then executes it
What is the execution method of an compiler?
Translates all the source code into machine code in one go
Produces an executable file that will be run on other machines
Compare the execution speed of a compiler and a interpreter:
Compiler takes a long time to analyse source code but overall execution is faster
Interpreter has to translate each line of code so the overall execution time is slower
Compare the complexity of a compiler and a interpreter:
Compilers are large complex programs
Interpreters are smaller, simpler programs
Compare the error reporting of a compiler and a interpreter:
Compiler generates an error report after scanning the whole program
Interpreter develops an error report as soon as one is detected which stops the program
Compare the memory efficiency of a compiler and a interpreter:
Interpreters are more memory efficient as no object code is generated
When is a compiler and interpreter used?
A compiler is used once the program has been written and tested
A interpreter is used during the development of a program
What is an IDE?
An Integrated Development Environment - provide programmers with tools to help create programs
What is an editor?
Is software that allows programmer to enter and edit source code
Features of editor:
Automatic formatting
Automatic line numbers
Automatic line colouring
Statement completion
What is an error diagnostic?
Displays information about an error. Like what line it’s on, what type of error
What are some of the facilities of IDE’s
Editor
Error diagnostics
Run-time environment
Translators
What is a run-time environment?
Allows the program to be run and allows user to test program
What are examples of translators?
Compiler and interpreter
How do translators help the programmer?
Interpreters allows the programmer during the development of code
Compilers allow the program to run without being compiled again