Language Levels
Questions:
- Give definitions of machine specific language and assembly language.
- Machine specific and assembly languages are called lower level languages, whilst languages like Visual Basic and C are called higher level languages. What does this mean? What is the difference?
- Find out what a compiler is. Have you ever used a compiler before? Where?
Answers:
1)
Machine specific language is the lowest level of language that a computer can understand. The computer processes high-level languages (e.g. BASIC) into machine language before executing a command. Machine language is written in binary form so that a computer can perform it straight away. It is simply the language use by computers made up of 1’s and 0’s.
Assembly language (like Machine Language) is also a language that is proccesed by computers. It is a low-level language used in writing computer programs. However unlike Machine Language which uses binary it uses mnemonics which is easier as mnemonics are codes which uses letters. These are usually easier to remember as they are less confusing which helps the programmer to use this type of code.
2)
Programming language is the artificial language humans use to instruct machines what to do. High-level and low-level languages are both programming languages.
High-level programming language:
High-level programming language is more complex, easier to use, adaptable to different programs and can be developed much faster compared to low-level programming language. The reason it’s called high-level is because it is more different from machine language than low-level language
Low-level programming language:
Low-level programming language’s main advantage is that the finished product is much more efficient than a high-level programming languages. Low-level programming language is very similar to machine language so it is “low-level” because “high level” means it is very different to machine language.
3) A Compiler is a computer program used to translate high-level computer language into a low-level computer language (assembly or machine language form). Compilers preform many operations including:
-
lexical analysis – converting characters into tokens
-
parsing – analyses the tokens and make it suitable for later processing
-
preprocessing – processing an input data for one program to an input data for another program
-
semantic analysis – checks for errors in the code and modifies it if their are any
-
code generation - transforms some internal code so that it can be excecuted by a machine
-
code optimization - modifys the code to make it more efficient and use less resources
I don’t remember ever using a compiler before.
Note: A decompiler does the opposite it translates low-level language into high-level language.
December 11, 2007 at 1:23 am