Machine, Assembly, and High Level Languages.

cogs-453036_640

Computers are a part of our life’s and we do thousands of tasks with the help of it. As we give the instructions to a computer or a device which computes like mobile, cellphone etc., the device immediately responses to our questions within milliseconds with perfect output. This quick response is the magic of all the languages which collaborates, interacts, translates inside a system and produces the result. So, this post going to give some brief explanation of the languages which a computer executes in its environment for performing tasks. There are three languages for a computer to work. Following the languages are,

  • Machine Level Language.
  • Assembly Level Language.
  • High Level Language.

 

Though I have given the first name of machine level language, but for making you guys understand in simple terms, I would be starting from bottom which is High level Language.

High Level Language: Human beings requires languages to communicate with each other. Without languages it is impossible to communicate, understand, and interact with people. Thus, for a user to interact with the computer, the computer should also able to accept the instruction in the language which the user is writing and process it. The reason for creating the high level languages is that the user could be able to write the software in such a way that is human readable. Any user can understand that language and write the code. Example of High Level Languages are Java, C, C++,Python, and many more which are design in the human readable format. Let us analyse a simple java code.

public void add()

{

int a,b,c;

a=1,b=2;

c=a+b;

System.out.println(c);

}

The above code is so simple, that any user can read and understand it without any additional efforts. Whereas the computer does not understand the code but it accepts as the input and process it further before getting the final output.

Assembly Level Language: Before explaining the assembly level language, I would like to give a sample code of it.

Example Code:

MVI A 2H, COPY VALUE 2H IN REGISTER A;

MVI B 4H, COPY VALUE 4H IN REGISTER B;

ADD B; A=A+B …….etc.

The above code is for adding two values. But it is quite difficult for a normal user to understand the logic, structure, and its flow. Thus the job of the computer after taking the input in the high level language from the user is to translate it in the assembly level language from which the input gets decoded in the form of instructions which runs through hardware. So, the assembly level language is designed to control hardware of the computer like chips, processors, circuit boards, memory etc.

Machine Level Language: After the instruction is decoded in the assembly level, the hardware accepts it and breaks the instructions in the form of lengthy 1’s and 0’s which are called as bits. Bits are the sets of 1’s and 0’s which could be said as the language which a machine understands and does its job. I would like to give the example of machine level language which is only in 1’ss and 0’s and impossible to write instructions with it.

Ex: 00000101010000101010 – this instruction could be simple math digit or an alphabet representation in the machine form.

1001010100000010 – this could be an instruction for some added values. Just for example.

Hence the hardware of the computer carries only these sets of instructions right from the computer is turned on to shutting it down.

That’s the mechanism of working of a computer with all these three languages working simultaneously within fraction of seconds.

I hope you guys found it easy to differentiate the languages and got a clear picture of it. This post is for beginners. Thanks and if you have any queries please comment it below. Keep sharing 🙂

 

Advertisements

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