Tuesday, February 26, 2013

Ques-4: What is Assembly language? What is the problem of Assembly language?

The ques-4 solution is given below.

Answer:

Assembly language: Assembly language is a low-level programming language using the human readable instructions in the CPU.In PCs , the Assembly language looks like this,

  mov ebx,eax
  mov esi,66
  mov [edx+ebx*4+4],ecx
  mov [ebx],ah

To compile this code into machine code ,a compiler is needed.Assembler is the compiler for the Assembly language.


Problem of Assembly language: The problem with Assembly language is that it requires a high level of technical knowledge and it's slow to write.In the same time that you take to write ten lines of Assembly language- that's ten instructions,you could write ten lines of C++, perhaps the equivalent of 500 instructions.

Ques-3:What is machine language? How does machine language differ from high level language?

The ques-3 solution is given below.

Answer: 

Machine language:  Machine language is the name of the instructions that a CPU can execute.It is the translation of source code.Compilers generate machine language from source code.This language depends on 1 and 0.


The difference between machine language & high level language is given below.

Machine language:

1. Machine language is first generation language(1GL) .
2. It's bassed on 1 and 0.
3. There is no need of translation.
4. Not compatible with human language and human throught process.
5. Machine language is called the object program.


High-level language: 

1. High-level language is third generation language(3GL).
2. It's bassed on similar to english language( C, C++, BASIC, JAVA  etc ).
3. Must be translated into machine language before it can be executed.
4. More compatible with human language and human throught process.
5. High-level language is called the source program.