4.2 Software TYPES OF PROGRAMMING LANGUAGE, TRANSLATORS AND INTEGRATED DEVELOPMENT ENVIRONMENTS (IDES) Flashcards
Define machine code
The list of instructions that a CPU can process, written in binary.
Name the two types of programming languages (2)
High level lanugages
low level languages
Advantages of high level languages (5)
easier to read, write and understand programs
No knowledge of underlying hardware required
quicker to write programs
programs are easier and quicker to debug
easier to maintain programs in use
disadvantages of high level languages (3)
programs can be larger
programs can take longer to execute
programs may not be able to make use of special hardware
Advantages of low level languages (4)
can make use of special hardware
includes special machine dependent instructions
can write code that doesn’t take up much space in the primary memory
can write code that performs tasks very quickly
Disadvantages of low level languages (2)
programs more difficult to understand
takes longer time to write and debug programs
Name one type of low level language (1)
assembly language
Feature of assembly language
uses short abbreviations known as mnemonics
Which type of translator translates assembly language into machine code
assembler
Define assembler
A type of translator that translates assembly language into machine code.
What are the 3 types of translators
interpreters
compilers
assemblers
Define translator
Software that translates code into machine code to be executed by the CPU.
Features of interpreters (3)
translates and executes the code
line-by-line
stops execution when an error is
found
Since an interpreter translates code each time a program is run, the interpreter software is required every time you run the program.
Features of compilers ()
translates the whole code at once before executing it, producing an executable file
A compiler provides an error report for the whole
code if errors are detected (unable to run program until error is fixed)
Once a program has been compiled the compiler software is no longer required to run the program, as an executable file has been produced.
Which programming languages does the compiler and intrepreter translate
high level lanugages
Advantages of compilers (2)
The executable file produced by the compiler will execute quicker than interpreted code.
An executable file (object code) is produced which can be executed without the compiler or other additional software.
Disadvantages of compilers (3)
The compilation process can take time, which slows down testing.
The executable file created by the compiler (object code) is not cross-platform.
Code must be free of syntax errors before compilation can succeed.
Advantages of intrepreters (2)
Code can be tested even if it contains errors, up to the point of the error. This aids debugging.
The edit–test process is faster as there is no need to wait for the compilation process. This can speed up debugging.
Disadvantages of interpreters (2)
Interpretation slows down the execution of code.
Interpreter software is required every time the code is executed.
Define IDE
software application specifically designed to help programmers create software
Features of IDE (7)
Code editor- allowing code to be entered.
Code formatting(prettyprint) - indentation and syntax highlighting, to make code easier to read
Auto-complete - offers a list of options when programmers start to type key words.
Auto-correction - corrects minor typing mistakes, similar to auto-correct in a word processor.
A translator (a compiler and/or an interpreter) built in for convenience.
A run time environment- allow programs to be run and tested within the IDE.
Error diagnostics- highlights potential errors in code and provides hints and suggestions about possible solutions.
Define low level language
languages that sit close to a computer’s instruction set. These are basic instructions that the CPU will understand
Define high - level language
languages which use English-like statements which allow users to program with easy code