Search your Topic HERE....

February 26, 2012

Compilers Basics for IBPS IT Officers Exam

38 comments

sponsored links

Assume that you visited china to meet China's Prime minister. The meeting was arranged in a big auditorium. But now the problem is, you don't know Chinese and he too don't know your Language (say Hindi). Then what  to Do? Now you have 3 solutions.
  1. To learn Chinese
  2. To make him learn your Language
  3. Or you both should learn some other language (Like English) so that you can communicate in that language...
Now what if HE is not ready to learn your language or English??? and what if you too are Lazy enough to learn Chinese or English??? Isn't there any other solution for this problem???

There is......  If you have enough money, You can hire a person who knows your language as well as Chinese and he will work as a MEDIATOR for both of you people.. :)

Now come to our Subjects...... As we know, computer cant understand our Hais and hellos....
And we too cant understand Computer's 0's and 1's...  So how to talk to the computer and make it works according to your orders?

Can you teach English to computer? Its impossible, because its a machine. It cant understand anything except LOW VOLTAGE (0) and HIGH VOLTAGE (1)... On and Off in simple words...

We too are TALLENTED enough to use CTRL+C and CTRL+V so we are not ready to write big codes which looks like 00011 01001 110100 1001001 01001 11001 11111 0111010 101010 10101011 01111 1101010 11101 1010101  01010 n bla bla........

So what can we do now? we write a Software Code which acts as a TRANSLATOR and converts your instructions into 0's and 1's and gives them to computer and vice versa..  We call this SOFTWARE CODE as COMPILER.. Thats it :)

What exactly is the Compiler? is it a for Translating or for Debugging?
Lets go back to our Chinese Man, assume that you are communicating with him with the help of a Translator. And you have some problem with your TONGUE...  (assume)..... So, what will happn if you use  some adjectives like "Poker face and ######## (censored :P) " .
Now say, what if the Mediator translates that POKER FACE stuff as it is in Chinese???
Your relationship with the Chinese man, will collapsed and you will get some injuries if he is expert in those Chinese martial arts...

So, before going to translate your words in Chinese, your mediator (or Translator) warns you about the outcomes of your words (may be you will get kicked or killed, depends upon the intensity of your words :P) and confirms whether to translate them as they are or not...

Heare also same... Some programmer (like me) writes a program with so many errors. If the compiler translates as it is, the computer may collapse (as it cant hit you for your errors)... So the compiler warns you about your errors so that you can correct them and resubmit your program. So, the main task of the compiler is to TRANSLATE, in-order to translate an Error free program, it warns you about your errors :) 

The Technical Definition : So, technically you can say that "The compiler is a software program which converts the program written in High level language / Programming Language / User Language into the Machine Language / Binary Language to make an Executable Program.


sponsored links

38 comments:

  1. Nice Explanation...thanks

    ReplyDelete
  2. very intrestingly explained.....really enjoyed

    ReplyDelete
  3. good explanation....it's just listening a good teacher's class

    ReplyDelete
  4. good explanation................

    ReplyDelete
  5. thanks but i m always confuse between compiler and interpreter.

    ReplyDelete
    Replies
    1. Compiler directly converts the source code into the target code. Bt the Interpreter doesn't, it jst PREDICTS the output....

      Delete
    2. Compiler compiles the entire source code and converts it to object code at once and hence execution is faster But
      Interpreter interprets or compiles the source code line by line and converts it into object code and hence execution is slower

      Delete
  6. mam pls discuss more about difrnce btwn intrptr nd complr

    ReplyDelete
    Replies
    1. Ok Neha sah, I will try to upload a detailed post on the difference between compilers and interpreters

      Delete
    2. compiler check the whole sourse code at the same time but the interpreter check the code line via line.

      compiler used at compile time and the interpreter at run time.

      Delete
  7. mam plz upload previous papers of specilist officers

    ReplyDelete
  8. outstanding explanation mam u r good

    ReplyDelete
  9. Really very useful 4 bank aspirants students.

    ReplyDelete
  10. please send me ib acio-2 (tech) study material.

    ReplyDelete
  11. very gud....helpful

    ReplyDelete
  12. Very Nicely EXplained

    ReplyDelete
  13. Such a interesting explanation mam.. Thanks a lot..

    ReplyDelete
  14. Enjoyed better than lecture..

    ReplyDelete
  15. It was so interesting to go through.
    And ur style was an aid to understand and remember! Thanks :)

    ReplyDelete
  16. interesting explanation .......... grt wrk (y)

    ReplyDelete
  17. wat is a machine language,assembly language,high level/low level language..pls explain with its differences too.thank u

    ReplyDelete
  18. Mam pls make the referesh links to the related updates mam pls

    ReplyDelete
  19. really superb explanation... not an easy to explain these concept

    ReplyDelete
  20. Really superb explanation.... not an easy to explain these concept. really great job.:)

    ReplyDelete
  21. can you please attach a pdf file for compiler design section.!!

    ReplyDelete
  22. No one can explain like this...really very nice.Thank you.

    ReplyDelete
  23. grt expalanation with dis any one can understand what s compiler tanks...

    ReplyDelete
  24. really it is very much interesting to read.....gr8 work mam

    ReplyDelete
  25. gr8 wrk mam... lovly xplanations... enjoyed reading

    ReplyDelete
  26. wow...this is the first time i understand clearly about this topics.... bcoz of ur gr8 explanation with cool examples...Thanks a lot..:)

    ReplyDelete
  27. what a fantastic explanation

    ReplyDelete
  28. very good mam...

    ReplyDelete
  29. superb explanation. Hats-off to you & your team

    ReplyDelete
  30. all the topics are so nicely explained in lehman language with interesting examples....superb work being done by this team :)

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...