Thursday, September 8, 2016

Advantages and Disadvantages of Assembly Language | Virtual Machines and Machine Levels

Advantages and Disadvantages of Assembly Language

Let’s discuss few advantages and disadvantages of a level 3 i.e. assembly language.

Advantages of Assembly Language

  1. Programs written in machine language are replaceable by mnemonics which are easier to remember.
  2. Memory Efficient.
  3. It is not required to keep track of memory locations.
  4. Faster in speed.
  5. Easy to make insertions and deletions.
  6. Hardware Oriented.
  7. Requires fewer instructions to accomplish the same result.

Disadvantages of Assembly Language

  1. Long programs written in such languages cannot be executed on small sized computers.
  2. It takes lot of time to code or write the program, as it is more complex in nature.
  3. Difficult to remember the syntax.
  4. Lack of portability of program between computers of different makes.
  5. No SDKs (System Development Kit).

Concept of Virtual Machines

Virtual machines involves two concepts:
  • Virtual Machines
  • Machine Levels

Virtual Machines

We know that each computer has its own native machine language that effects the hardware of the computer directly, generally known as language L0. It is difficult to write programs in machine language, therefore, a new language could have been constructed, which was easy and more human friendly, called language L1. Following are the two ways to achieve this:
  • Interpretation
  • Translation
Let’s, discuss both ideas one by one:

Interpretation

The program written in L1 is converted into machine language (L0). The relation between L1 and L0 is one-to-one i.e. every instruction of L1 is being interpreted by the L0 and then executed.

Translation

The program of language L1 is completely translated into language L0 and then executed.

Translation of high level language to assembly language

Machine Levels

There are four machine levels as shown in the following figure 2.2:

machine levels of assembly language

High Level Language - Level 4

The programs written in high level (application oriented) languages like: C, C++, Java, etc. are compiled into assembly language.

Assembly Language - Level 3

The relation between assembly language and machine language is one-to-one i.e. every instruction mnemonic of assembly language is being interpreted by the machine language.

Machine Language - Level 2

The level 2 is also known as ISA (Instruction set Architecture) and it is executed by the level 1 i.e. Digital Logic.

Digital Logic - Level 1

The CPU (central processing unit) is being constructed from the digital logic gates, which is part of the computer hardware.

6 comments :

Note: Only a member of this blog may post a comment.

Copyright 2017. All Rights Reserved. Privacy Policy / Terms And Conditions / Sitemap / Contact