Sunday, 16 August 2015

Intro to Computing(1)

In previous blog we discussed about the description of computers and how the computer works. We came to know that the computers can only understand the machine level language. With the help of translators the user defined language is converted into machine level language. The computer processes the inputs after converting this language in to machine level language and then it gives the output. This output is again converted from machine level language in to human understandable language. In this way we send and receive our instructions to the computer. 

Actually we can raise a question in our mind. Is this translators necessary?

Yes, to convert the machine level language to human understandable language we require a translator. This is similar to a book in many languages. With a same author we can see the books in many languages. This is because a person in USA can only read English and similarly a person in France can only read a french book. The person in France cannot read English book. In order to read the book it should be in french language. So the author converts the books in to different languages. So with the help of translation the whole world can read his book.

There are two types of translators in programming world
1. Compilers
2. Interpreters

Both translates the high level language in to machine level language and vice versa. But they vary in procedure. Please go through to this video for detail description of compilers and interpreters

This video is an extract from Bits and Bytes (You tube)

                               

Compilers analyze the whole code and it executes the code directly in to the machine level language. if it finds any errors in the code it rollbacks to the code. With out any syntactic and semantic error it executes the code.

Interpreters executes the code in step by step procedure. If it finds any error in the code then after solving the issue it completes the execution. Interpreters convert the high level language in to intermediate form. This intermediate form can also be called as a byte code.  

No comments:

Post a Comment