Skip to main content

Types and Differences of Language Processors or Translators in Programming

Q. Define Language processor or Translator. Explain different types of Language processors.

Language Processors / Translator

        Computer directly understands machine language only. That is why Machine language is called the native language of computer. Machine language is in binary form that is its instructions consists of strings of zeros and ones. 

       A program written in high-level or assembly language cannot be run on a computer directly. Firstly, it is converted into machine language. So there is a need to translate the source program into object code for a computer to execute it. 

Definition of Language Processor 

Language processor may be defined as a software that converts source programs into object program. Language processor is also called Language Translator.  Therefore, a language translator software will take a source program(that cannot be understood by computer) as input and then will convert it into object code(that can be understood by computer).

Different types of language processors are:

  1.     Compilers
  2.     Interpreters
  3.    Assemblers

how Compiler works, How Language translator works, Language processor explanation, difference between language translators, different types of language translators

Compiler

           A compiler is a program that converts the source program into object program(machine code) as a whole. The compiler converts source program in machine code called object program. Compiler also checks and reports syntax errors in the program. A source program containing an error cannot be compiled.
        A program written in high-level language is called source program. A program in machine language is called Object program.
For example, C language and COBOL uses compiler. The function of a compiler is shown in the figure above.


Interpreter


How Interpreter works, How Language Translator Interpreter works, interpreter translates one instruction at a time

An interpreter is a program that converts one statement of a program into machine code at one time. Then translated instruction is executed. If there is an error in the statements, the interpreter displays an errors message. In other words we can say that interpreter is a software that translates an instruction into a machine language and gets executed it before proceeding to the next instruction.
The advantage of interpreters over compilers is that an error is found immediately. The disadvantage of interpreter is that it is not very efficient. It does not create object file. So every time we execute the source program, it is translated again one instruction at a time. Whereas compiler creates an object code file. So next time when the program is executed, this object program is run( and no translation or compilation is needed unless we change the source code). Visual Basic uses interpreter normally and it can use compiler also when we wish to make .EXE file of a visual basic project.


Assembler

An assembler is a translating program that translates the instructions of a program written in assembly language into machine language.
Therefore, Assemblers are used for translating assembly language programs into machine code.


You would also like to read:

Difference between Compiler and  Interpreter

Comments

Popular posts from this blog

Bus Topology Advantages Disadvantages

Bus Topology Bus topology is the simplest network topology . In bus topology , all computers in network are connected to a common communication wire. This wire is called BUS. Terminators are used at both ends of wire. Bus Topology is Cheap, easy to handle and implement. Bus Topology require less cable. Bus Topology is best suited for small networks. Working of Bus Topology with Advantages and Disadvantages Advantages of Bus Network Topology 1. It is very simple topology . 2. It is easy to use. 3. It needs small amount of wire for connecting computers. 4. It is less expensive due to small wire needed. 5. If one computer fails, it does not disturb the other computers in network. Other computers will continue to share information and other resources with other connected computers. Disadvantages of Bus Network Topology 1. Only small number of computers can be connected in a bus network . 2. Network speed slows down as the number of computer increases in b...

Types Of Headings In HTML

HTML Hedings Headings in HTML are used to display Titles, Sub-Titles of Sub-Sub-Titles for your web page text. There are six types of headings in HTML. H1 is the largest heading and H6 is the smallest heading. <H1> is opening tag whereas </H1> is the closing tag for the largest heading. The text between <h1> and </h1> will be displayed as the main Title in your web page. Following are the six tags used for six types of headings in HTML. <H1> ... </H1> <H2> ... </H2> <H3> ... </H3> <H4> ... </H4> <H5> ... </H5> <H6> ... </H6> The H1 heading is used for main titles. Actually H1 heading will show the text in largest font size. H2 headings is used for Sub-Titles. H2 displays text in smaller font size than H1, H3 displays text of font size smaller than H1 and H2, and so on. H1 is for largest heading in a text page and H6 is for smallest heading.   Importance Of Headings in SEO H...

Explain Advantages Of Networks

Define Network with examples. Give importance of Computer Network. COMPUTER NETWORK We can define a Computer Network as a set of two or more connected computers to share information and other resources (data, files, printers, hard disk, modem, CD-Rom Drive, CD-Writer, DVD-Rom Drive, DVD-Writer etc.). The computers in a network can share: Data, Information, Files Software Hardware (printers, disk, modems)etc. Advantages of Computer Networks EXAMPLES OF COMPUTER NETWORK Computer network can be used in an office. Different people in the office can share common information and printer. Net Cafes use Computer Network for internet sharing. Net Cafe Owners can save money by sharing one DSL Routers / Modem and a single Internet Connection. Computer Network is used in Computer Laboratories of Schools, Colleges and other educational institutes. Internet, is also an example of a computer network. Internet is a network of millions of computers connected through phone lin...