Monday, 29 April 2013

Lesson 04 – Introducing Assembly Language (Second Generation Language)



As we mentioned on previous lesson Machine language had so many limitations to overcome from that assembly language introduced in 1952. This language uses alphanumeric code and symbols instead binary digits to represent instruction and memory address.
 
Alphanumeric code uses set of letters and numbers represent an instruction.
Sample Program Snippet:
       1)      LD, AX, 9
       2)      LD,BX,10
       3)      ADD,AX,BX
       4)      LD(100),AX
       5)      JMP,BX
       6)      HTL

Code Line 1 - (Loads register AX with value 9)
Code Line 2 - (Load register BX with value 10)
Code Line 3 - (Adds value of register BX to the value of AX)
Code Line 4 – (Store the value of register AX in the main memory location, 100
Code Line 5 - (JUM to Jump to register BX to transfer the control to register BX)
Code Line 6- (Stop the program execute)
 
As we mentioned Lesson No 3 Computer only understand machine language (Binary Numbers).  As a result, Assembly language code must translate into Machine Language to execute the program this translation doing by an Assembler.

Introducing An Assembler


Function of an Assembler

The Assembler takes each statement in the source code (A code written in any program languages call as source code) and generate a corresponding bit stream or pattern (A series of 0s and 1s of given length) Its known as an Object code. Object code can execute whenever required.

Saturday, 27 April 2013

Lesson 03 - Introducing Machine Language ( First Generation Language )

All computers use binary number system (1, 0) for perform internal operations.  Machine language is the only language using binary digits to represents an instruction. Therefore the computer can directly process the instruction written in machine language.






A number of languages (Binary Number System) can be used to write programs. The Computer only can understand machine language. The programs written in other program language must be translated to machine language for execution.



For an example 1010 in the binary number system equal to 10 in the decimal system.

1010 = (1*23) + (0*22) + (1*21) + (1*20) = (1*8) + (0*4) + (1*2) + (0*1) = 8 + 0 + 2 + 0 = 10



Advantage of the machine language.

The advantage of machine language program execute very fast because no translate required.
 
Disadvantage of the machine language.

It’s very difficult to program with machine language because the programmer need to remember details of hardware to write program.


Machine languages are error – prone because programmer has to remember lot of codes to write.

It’s difficult to modify because of complexity.




 ------------------------------------------------------ end ---------------------------------------------------------
 If you like this post dont forget to LIKE US on FaceBook :  Career on Software Engineering ( VB.net )

Best Regards

We will welcome your comments, New Ideas and etc.. for improve this site.
Sumiya. DNIIT, SCJP, Bsc ( Hons )
e-mail : sumiyalearns2you@gmail.com