Machine Language (Binary):
Computers and smartphones, unlike other electronic devices, operate very fast and do hundred and millions of calculations in a few minutes. However, There is a similarity in computers and all other electronic devices, And that is binary. A common Light Bulb can understand only two things, that are “On and OFF”. Like Light Blubs, Computers can also understand only two things, That are On and OFF. ON means 1, and off Means 0. These “0s” and ”1s” are called binary number system.And all the calculations and computations it does are based on just those 0&1s.
Like Cats can only understand Meow, Dogs can only understand Bhow, Computers only understand Binary.
Then? How It converts binary to aur daily ABC and Other words? Well, that doesn’t matters… But if you want to know,then you can watch the video below.
Programming Languages… What are they?
Humans can’t understand binary. And it will take a lot of time to convert our normal words to Binary. So, To make our work easier, We created Programming languages. Programming Languages are human readable and writeable languages for computers.
C++, Java, Fortran, Python etc are examples of programming languages.
Suppose you are going to a foreign country, for example china, and now, after travelling a lot, you are hungry. You visited a nearby restaurant. And now you want to order something. You told waiter to bring a bowl of corn soup, and the waiter doesn’t know English and he responded “你在說什麼”.
Well, What the CENSORED is that?
He doesn’t know English and you doesn’t know Chinese. How will you communicate? Simply, You need a Translator…
Now, In our story… A third person comes who know both Chinese and English and he translate your words into Chinese and his words into English. Wow!! That was Amazing. That person was working as a translator in the story.
Now, Come back to our problem… You know programming language, and computer knows Machine Language, How will you communicate? Think a bit about it.
Simply… You need a translator. And that translator is known as compiler.
A compiler is a program that converts programming language into machine language.
Algorithms are a set of instructions that you’ll give to program. Any procedure or any line of code that performs something is called Algorithm. “Procedure” can be used as synonym of algorithm. The TED-ED video given below can give you better explanation of ALGORITHMS and PSEUDOCODE.
Source Code and Executable:
The code (or instructions) that we write in program is known as source code. Source code of C++ is saved with an extension of .cpp
The final version, or the compiled version of code is called an executable file.
Main Image VIA PixShark