Hello everyone, hope you all are doing great? However, welcome back to my blog.
There are programs that convert codes written in a high level language (English- like) into machine understandable language ( binary numbers 0, 1), this programs are termed as translators.
A translator can be defined as a program language processor that converts codes written in high-level laugage into a lower language that the Computer understands. Any high-level language is known as the source code and the low-level language is known as the object code, this high-level language gets to the target machine language by the translators. Without the translators, programs written in English-like language as input cannot be converted into a program in target language as output.
Translators not only do the work of covertion but also detects and reports the error during translation, errors are not ignorable since translation deals with how to bring the same source code from one language and to make these codes have same meaning in object codes.
Having known what translator is, there is need to know the different translators with the way they work.
Interpreters are program translators that performs a line by line code conversion of the high-level code into machine code. The translator interpreter is different from compiler, the compiler executes all source code once and give the output but the interpreter executes each source code as it is being typed by the user and gives the output.
The programming language are mainly scripted language they makes use of interpreters and such language include Python, PHP, Ruby, Perl and Javascript, this languages makes use of interpreter because their source codes translation and execution are carried out side by side, this side by side execution of the program provides better debugging environment. Languages using interpreters their codes are not required to be built and linked like codes of other languages using compiler.
Assemblers are program translator that converts codes written in assembly language into machine understandable codes. Assembly language makes use of mnemonics (short form of words closely related), the assembler generates instructions by evaluating the mnemonics (symbols) in operation field and find the value of symbol and exactly produce its equivalent in machine code.
The C programming language can be said to called "portable assembly" because C compilers exist for nearly every modern system architecture that involves assemblers, C programming language makes use of mnemonics that is in human-readable code, this is almost similar to machine language.
Compilers are program translators, it takes a program written in a high-level programming language as input and translates into an equivalent program in low-level language such as machine language. Compilers translates the whole source programs by scanning into the targeted program in one step, the target program is then executed separately by generating the output according to the given inputs. In knowing how the compiler works check the link source written by me.
Programming language using compiler are Java, C++. This languages are called compiled languages because their compilation is made twice in order to be executed: like Java programs are first compiled to bytecode, when the bytecode is run it will then be converted to machine code.
Most compiled programming language are platform independent that is it can run in Windows, Linux , Mac/OS etc environment. It also means that any program compiled on windows can run on linux and vice-versa.
CONCLUSION
Human write in English-like language which is easier to comprehend but without the translators the machine(Computer) doesn't understand what is written by humans. The above listed translators are the what the computer uses to understand what human writes.
You seem to know alot about computers. As expected of a final year computer student in the university. This post of yours really caught my attention and reminds me of an advanced level of secondary school computer. I was never really good with computers but I know a thing or two. I have also learnt alot from your post. Steem on. I look forward to reading more from you
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit