Computer Knowledge - Exam Oriented
1. Translators
A translator is a software program which converts statements written in one language into another e.g. converting assembly language. to machine code, etc. The assembly language program are called �Source-program� and the machine code program are called �object program�.
There are three types of translators.
a) Assembler - An Assembler is a program which translates assembly language into machine code. The main functions of Assembler are translation of the nemonic operation codes into machine code together with the symbolic addresses into machine addresses, allocation of areas of storage in the memory, detection and indication of initial source language, instructions, production of the object program on card, tape or disc as required and production of a printed listing of the source and object program with comments.
b) Compiler - A Compiler is a program which after machine code translates a high level language into a machine oriented language. The resulting program can only be executed when compilation is executed. The main functions of a compiler are translation of the source program into machine code, generator of the object program on cards, tape or disc as required, production of a printed listing of the source and object programs when required and tabulation of list of errors found during compilation, e.g. the use of �word� or statements not included in the language vocabulary or violating the rules of systems.
c) Interpreter - An Interpreter is a program which translates and executes each source statements in logical sequence as the program is executed. The main functions of Interpreters are debugging (i.e. removing program faults) and handling of software produced for or by a different computer. An interpreter may be essential if two dissimilar computers are to be connected together for operation, or when software produced on an old model has not been used and has to be run on a new one.