You are on page 1of 3

MACHINE LANGUAGE AND ASSEMBLY LANGUAGE

The programming language is a set of instructions, in order to make a computer


understand to perform a specific task or create an algorithm. There is huge variety
of programming languages available nowadays like C, C++, COBOL, Java,
Python, Fortran, Ada, and Pascal.

All programming language has some primitive building blocks which are known as
syntax. These syntaxes of languages are textual. Primitives are combined by
programmers to compose new programs.

Programming language broadly categorized into 3 categories:

1. High-level programming language


2. Assembly language
3. Machine Language

A high-level language is easy for programmers to write as well as to understand.


Programmers here use simple and easy syntax to address a specific task. Examples:
Python, C, C++, etc. These syntaxes can’t be understood by CPU; hence it gets
converted internally to binary which CPU can understand by the medium of
compiler and interpreter.

Assembly language falls between a high-level programming language and Machine


language. it has syntaxes similar to English, but more difficult than high-level
programming languages. To program in assembly language, one should have
understood at hardware level like computer architecture, registers, etc. This kind of
programming is mostly seen in the embedded systems.

An example is given below,

ADD R1, R2
Machine language is the binary language that is easily understood by computers.
Hence it can be directly executed by CPU with absolutely no need of compilers
and interpreters.

Machine language is the low level programming language. Machine language can
only be represented by 0s and 1s. In earlier when we have to create a picture or
show data on the screen of the computer then it is very difficult to draw using only
binary digits (0s and 1s). For example: To write 120 in the computer system its
representation is 1111000. So it is very difficult to learn. To overcome this
problem the assembly language is invented.

Assembly language is the more than low level and less than high-level language so
it is intermediary language. Assembly languages use numbers, symbols, and
abbreviations instead of 0s and 1s.For example: For addition, subtraction and
multiplications it uses symbols likes Add, sub and Mul, etc.

Below is a table of differences between Machine Language and Assembly


Language:

Machine Language Assembly Language


Machine language is only understand by Assembly language is only understand
Machine Language Assembly Language
the computers. by human beings not by the computers.
In machine language data only
In assembly language data can be
represented with the help of binary
represented with the help of mnemonics
format(0s and 1s), hexadecimal and
such as Mov, Add, Sub, End etc.
octadecimal.
Assembly language is easy to
Machine language is very difficult to
understand by the human being as
understand by the human beings.
compare to machine language.
Modifications and error fixing cannot be Modifications and error fixing can be
done in machine language. done in assembly language.
Machine language is very difficult to Easy to memorize the assembly
memorize so it is not possible to learn the language because some alphabets and
machine language. mnemonics are used.
Execution is fast in machine language
Execution is slow as compared to
because all data is already present in
machine language.
binary format.
There is no need of translator.The Assembler is used as translator to
machine understandable form is the convert mnemonics into machine
machine language. understandable form.
Assembly language is the machine
Machine language is hardware dependent.
dependent and it is not portable.

You might also like