Okay, its time to learn a way to interact with the computer. Just like any other forms of communication interacting with computer involves languages.
There are basically 3 types of languages when it comes interacting with a computer.
1. Higher level language
2. Lower level language
3. Assembly language
There are basically 3 types of languages when it comes interacting with a computer.
1. Higher level language
2. Lower level language
3. Assembly language
- High level languages are the language that can be easily understood by a human being. For an instance, English is a high level language.
- Lower level language is understood by the computers. Hence it is also known as 'Machine Language'. It consists of zeroes and ones that interact directly with the hardware components of the computer.
- An assembly language is the first step to improve programming structure and make machine language more readable by humans. An assembly language consists of a set of symbols and letters. It can be called the second generation language since it no longer uses 1s and 0s to write instructions, but terms like MOVE, ADD, SUB and END.
High level languages can be written and executed in all computers but this isn't the case with machine language. Machine language varies from one computer to another.
Earlier Assembly Languages were used to write programs, but recently high level languages are used. Programmers still use the assembly language when speed is essential or when they need to perform an operation that isn't possible in a high-level language.
The high level languages cannot be understood by the computer, as it only understands lower level language which are written in zeroes and ones. Let say there are two people who cannot understand each other, that is they speak different languages. So, in that case a third person is required who understands both their languages and interprets to them. Likewise, there are certain programming bodies who convert the language between the machine and the user. There are three types of convertors,
1. Compiler
2. Interpreter
3. Assembler
Compiler and Interpreter convert high level languages to machine languages.
- Compiler scans the entire program once and then converts it into machine language which can then be executed by computer's processor. In short compiler translates the entire program in one go and then executes it. Interpreter on the other hand first converts high level language into an intermediate code and then executes it line by line.
- The execution of program is faster in compiler than interpreter as in interpreter code is executed line by line.
- Compiler generates error report after translation of entire code whereas in case of interpreter once an error is encountered it is notified and no further code is scanned. Example Python is an interpreted language whereas C,C++ are compiled languages. Java however uses both compiler and interpreter.
Assembler is used for converting the code of assembly
language into machine level language.
No comments:
Post a Comment
If u need any help,