Home > Software Develeopment > Programming language?

Programming language?

Programming languages

What is a programming language and why do we need it? – An important question that we will try to answer below together.

Mr. Computer

Computer’s processor and other components can only understand zeros and ones because all what they percept is through data, control and address lines that each can be either OFF or ON .

If you like to ask the computer processor to add 5 and 6 together, you would tell it something like 1111 101 110.

Where 1111 is the add operation code (opcode) and then the two numbers to be added follow. This is how the processor is designed.

What about if you want to multiply, divide, OR, XOR, SHIFT …. and do many other mathematical and logic operations the processor is able to do?

Do you have to memorize the opcode for each of these operations? or better have a long long sheet of how to write these instructions and look it up every time you talk to the computer?

Do you have to use the same language  that the computer understand (machine language) to talk to him and specify its behavior?

I do not know. I think I have to do so if there is no any other language that I can use. Is there any?

Yes, We’ve got Mrs. High level Programming language (Let’s just call it a “programming language” in this context compared to machine language).

Good. What about it?

Programming language is just another language instead of the machine language. It is a set of some familiar English words, decimal numbers, and mathematical symbols that you can use to talk to the computer instead of these weird zeros and ones.

In programming language, if you want to add 5 and 6, you would simply say 5+6 instead of 1111 101 110.

Using it, you can print a statement to the computer screen with a sinlge line while you might need hundreds of lines to do this if you are talking to the computer in his native machine language.

You need not to know these specific numerous details about the computer architecture when you use a high level programming language because it handles them all automatically for you and this is what we call abstraction.

While machine language (low level language) has no abstraction at all, programming language (high level language) provides a lot of abstraction.

Sounds great, but does not the computer still understand only these weird zeros and ones language?

Yes.

Well, how would he understand such high level programming language?

Good question. There after you write something in a high level programming language lies Mr. Compiler. Compiler’s task is to transform what you wrote in a high level programming language into the machine language so that the computer can understand what you are talking about.

Great! that compiler should be having a really hard task to do!

That is right. We will have another discussion soon more in detail about the compiler operations.

Hope you have got the idea behind the need for programming language and the benefits from it!


Ahmed Abdullah Hussein – mindhunter74

Advertisements
  1. marwayusuf
    February 18, 2009 at 11:23 PM

    Great Work Ahmed. I liked this. I think we may buy – or steal – a “Ahmed Hussein” textbook someday.

  2. Eman
    February 18, 2009 at 11:49 PM

    That’s really really great 🙂
    I totally agree with you Eng.Marwa,
    I think we may see this book someday 🙂

  3. asmaamagdi
    February 18, 2009 at 11:58 PM

    That’s a nice post Ahmed 🙂
    Seems I’ll be spending some time reading your nice posts 😉
    Keep it up.

  4. Sherif Kamal Sherif
    February 19, 2009 at 12:01 AM

    Nice topic Ahmed 🙂
    Now , waiting Mr.Compiler 🙂 …

  5. Ahmed Abdullah
    February 19, 2009 at 12:29 AM

    Thanks Marwa, Eman, Asmaa and Sherif for your nice comments.
    And I promise to give you a free copy of my first book 😉

  6. Abdullah Saad
    February 19, 2009 at 2:34 AM

    and a free copy to me to ahmed, don’t forget me………….please
    and i will give u a free copy of my book about sorting :d

  7. Ahmed Abdullah
    February 19, 2009 at 2:51 AM

    Of sort, Abdullah.
    Oh. I meant “Of course” 😉

  8. AhmedRagab
    February 19, 2009 at 7:34 AM

    wow great work Moro

    can’t be more simple 😀

  9. Mystery_ghost
    February 22, 2009 at 12:23 AM

    Thank u Ahmed

    Do u know that ur my hero now?

    I am trying to follow ur steps.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: