You are on page 1of 3

5.

Programming concepts
5.1
5.1.1

Introduction to programming
What is a computer program? Computer program is a set of instructions or commands, which tell the computer what to do. Computer language is a set of symbols and rules governing their employed in constructing program. Computer languages are used to develop application program How to work Machine can understand only the machine language. Assembly and other high level languages are not in machine language. Due to this, those languages should be transformed to machine language and then execute. The translators do this transformation process.

5.1.2

Programming languages Generation of programming language 1st Generation language ( 1GL ) Machine level programming language Machine code is the binary digit language It consists of 1 and 0s. The machine can directly execute Execution is very fast, because no translated are needed. Very difficult to write and modify program. It is machine dependant because machine-language instructions vary according to computer architecture. It is a low level language 2nd Generation languages( 2GL ) Assembly language is used Assembler is used to convert assembly language to machine language Mnemonics and variables are used for writing codes It is a machine dependant language Difficult to write and modify program. It is a low level language Execution is fast 3rd Generation languages ( 3GL ) It is easy to understand because it is similar to the human language Translators are used to convert high level language to machine language Compilers or interpreters are used as translator. Some of 3rd generation languages are unstructured high-level language It is easy write and modify than the other many of the third generation language are procedural language because the program instruction comprise list of steps or procedures It is not machine dependence language One instruction of third generation language can replace many assembly language instruction

4th

programmer has to describe how it should be done. Ex : Basic, Fortran, Cobol, Pascal Generation languages ( 4GL ) Introduce in late 1980s There are designed to reduce programming effort It consume less time to write program They are non procedural language Very easy to write and modify One instruction of 4GL can replace many of 3GL instruction Programmer has to describe what is to be done. 4GL languages reduce software development cost. There are describe as application development without programmers Ex : FOCUS, IDEAL, dbase III plus

5th Generation languages ( 5GL ) Introduce in early 1990s User-friendly graphical user interfaces are facilitated. Very easy to write and modify program Execution speed is low Event driven program were introduced Ex: Visual basic, Visual C++, Small Talk Classification of programming language 1. Low Level Languages a. First and second generation languages are consider as low level languages that means machine language and assembly languages are low level languages b. They are machine dependant language c. These languages are close to the hardware d. Programmer should have hardware knowledge to write program e. Productivity is low 2. High Level Languages a. 3GL,4GL and 5GL are consider as high level languages b. They are machine independent language c. They are easy to write and modify program d. Programmer need not hardware knowledge e. Productivity is high f. Consume less time to write programming g. 5GL are allowed user-friendly facilities
1st Generation Low Level Language Computer Language High Level Language 2nd Generation 3rd Generation 4th Generation 5th Generation

Translators Source Code

Translator

Object Code

Translator is used to convert source code into object code. this are two types 1. Assembler 2. Interpreter 3. Compilers Assembler It is translator of low-level language. It is a software program that converts assembly language into machine language. Assembler converts mnemonics into machine code Interpreter Interpreter is a translator that goes through process of translation every time the program is run. Interpreter such as those found running some version of BASIC, translate one line of the program at a time. Compilers It is translator of high level language It convert whole program in to machine language at once Compiler translate source code in to Object Code. This Object code is used to execution when ever it is run If any changes of source code need recompiling

You might also like