Monday, 20 May 2013

Lesson 06 - Introducing Algorithms

An Algorithm is a step by step procedure to accomplish task. This use for calculation, Date Processing and automated reasoning. The word "Algorithm" is derived from Arab mathematician "Al-Khwārizmī"(825 AD).

In our daily and professional life we have to perform sequence steps to complete task. For an example : If you need to prepare a cake you have to follow few steps to make that. which mean you have to add and mix ingredients on fan and you have to bake it and you have to test with fork before taste it or serve it to somebody else.

Therefore you may have understood algorithms follows certain steps to finish task. It can be categorised in to three phases.

Input Phase -Add Ingredient to fan

Process Phase - Mix and Bake the Cake

Output Phase - As a result of above process you can have a Cake.

Saturday, 4 May 2013

Lesson 05 - High Level Language (Third generation Programming Language)

As we learnt in previous lessons Machine language and Assembly languages known as low level programming languages. The reason it known as low level programming language is it always depend on hardware. Therefore programmer had to find out the way to overcome with this problem. As a result, They found High level programming language.  A High level programming language is user friendly because its similar to English language.

Some examples of high level programming languages 
(Basic, COBOL, C and Pascal) 

Advantage of High Level Programming language,

Its really easy to learn High level program language than machine language and assembly language because instruction are more like English.

A Programmer easy to  read, write and maintain program written in High level program language.(High level language vocabulary similar to English language)

It's  not hardware depend its hardware independent programs written by high level language are easy to use another computer.

Compiler

Program written in high level language need to translate for execute. A computer need translation software called a compiler.

Each high level language has its own compiler which translate the source code to object code.

Ex : Compiler for COBOL is COBOL Compiler. Its only translate program written in COBOL programming language.

Function of Compiler
Click on Picture to Large 















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