We know that there are two main types of programming languages. We know that a computer can only execute a program that is in the machine language. Therefore every language program must be translated by some special program before it is actually executed on a computer.
Decoding or Translating is the process of converting a program written in a high level or a low level language into machine code, so that a computer can understand it easily. There are a number of translators used for different programming languages. Some language software come with built-in language translator while others are translated separately.
For example,
In order to translate Machine or Assembly language into a machine code, we use an Assembler. For high-level language programs we use a compiler or an interpreter.
1. Assembler:
These language translators translate low-level language programs into machine code. Assemblers are dependent on the configuration of a Microprocessor.
2. Compiler:
Compiler complies all the programs (High level language programs) into machine language before the program is executed. Then Assembler further translates this machine language for execution. Number of programming languages use compiler to compile their programs. For example: COBOL, FORTRAN, PASCAL and C/C++.
3. Interpreter:
As compiler translates programs into a machine language a machine language all at once, so before the programs the run, Interpreter translates the programs one line at a time as they are being run. For example, if in a program, one instruction is to be executed hundred times, it must be translated into machine language at all those hundred times.
Decoding or Translating is the process of converting a program written in a high level or a low level language into machine code, so that a computer can understand it easily. There are a number of translators used for different programming languages. Some language software come with built-in language translator while others are translated separately.
For example,
In order to translate Machine or Assembly language into a machine code, we use an Assembler. For high-level language programs we use a compiler or an interpreter.
1. Assembler:
These language translators translate low-level language programs into machine code. Assemblers are dependent on the configuration of a Microprocessor.
Compiler complies all the programs (High level language programs) into machine language before the program is executed. Then Assembler further translates this machine language for execution. Number of programming languages use compiler to compile their programs. For example: COBOL, FORTRAN, PASCAL and C/C++.
3. Interpreter:
As compiler translates programs into a machine language a machine language all at once, so before the programs the run, Interpreter translates the programs one line at a time as they are being run. For example, if in a program, one instruction is to be executed hundred times, it must be translated into machine language at all those hundred times.
No comments:
Post a Comment