Languages And Translators Flashcards
What are the 2 low level languages you are expected to know?
Machine code and Assembley language
What is low level language
A low level language is close to the processor
What is a high level language
Written using English like words and are platform dependant
What are a few examples of a high level language
C, C++, Java, Visual Basic, JavaScript, Perl, Python, Ruby, SQL, MatLab, HTML, Mercury, OPS5, and Prolog
What is first generation language and an example of one
Languages interpreted directly by the processor e.g. machine code
What is second generation language and an example of one
Used in Kernels and hardware drives e.g. Assembly language
What is second generation language and an example of one
Used in Kernels and hardware drives e.g. Assembly language
What is third generation languages and an example of one
These are imperative(step by step instructions) languages e.g. C, C++, Java, Visual Basic and Javascript
What is fourth generation language and an example of one
These consist of statements that are more like statements in the human language e.g. Perl, Python, Ruby, SQL, MatLab and HTML
What is fifth generation language and an example of one
These have visual tools to develop a program e.g. Mercury, OPS5 and Prolog
What is machine code
A language consisting of binary or hexadecimal instructions which a computer can respond to directly
What is assembly language
A symbolic code, using mnemonics that is platform specific
Name a pro and a con of using Machine code
Pros
Programs run quick
Programmer interfacing directly with the processor and has more control
Cons
Long winded
Error prone
Not portable between processors
Hard to debug
Detailed knowledge required
Name a pro and a con of using assembly language
Pro
Easier than machine code and take less mem than high level languages
Programmer directly interacting with registers, more control
Cons
Code is difficult to read than high level
Detailed knowledge required
Machine dependant, not portable without modification
Name a pro and a con of using high level language (HLLs)
Pros
Uses English language like keywords, therefore easy to understand
Platform independent
No knowledge of hardware required
Cons
Programmer must rely on the compiler to optimise the code