0% found this document useful (0 votes)
6 views

Evoluation of Programming Languages

Programming language
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views

Evoluation of Programming Languages

Programming language
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
Chapter - 1 The Evolution of Programming Languages Programming Languages Evolution A Programming language is the language through which user can communicate with the computer by writing program instructions. Every computer programming language contains a set of predefined words and a set of rules (syntax) that are used to create instructions of a program. ‘The Computer programming languages are cla 1) Low Level Language 2) Middle Level Language 3) High Level Language 1) Low Level Language Low level language is also known as Machine Language. Machine language is also known as Machine code. Binary language is an example of low level language. The binary language contains only two symbols | and 0. All the instructions of binary language are written in the form of binary numbers 1’s and 0's. A computer can directly understand the binary language. Low Level language is as the First generation language, Advantages ‘+ A computer can easily understand the low level language. ‘+ Low level language instructions are executed directly without any tran: ‘* Low level language jons require very less time for their execution Disadvantages ‘+ Low level language instructions are very difficult to use and understand. ‘+ Low level language instructions are machine dependent, that means a program written for a particular machine does not executes on other machine. ‘+ In low level language, there is very difficult to find errors, debug and modify, dle Level Language Middle level language is also known as Assembly language or Symbolic language. Assembly language is an example of Middle level language. In Assembly language, the instructions are created using symbols such as letters, digits and special characters. In assembly language, we use predefined words called mnemonics. A program written is an assembly language using ‘mnemonics called assembly language program or symbolic program, The process of translating an assembly language program into its equivalent machine language program with the use of an assembler. Assembler is used to translate middle level language to low level language. ied as — tion. stra Figure -[: Translate assembly language program into machine language Advantages ‘* In middle level language, writing instructions is easier. ‘* Middle level language is more reliable. ‘* Middle level language is easy to understand, find error and modity. Disadvantages ‘+ Middle level language is machine dependent. ‘* Middle level language needs to be translated into low level language. ‘+ Middle level language executes slower compared to low level language. 3) High Level Language High level can be easily understood by the users. It is very similar to the human language and has a set of grammar rules that are used to make instructions more easily. Every high level language has a set of predefined words known as keywords and a set of rules known as syntax. High level language is a programming language. Languages like COBOL, BASIC, FORTRAN, C.C++, JAVA ete. All these programming languages are to write program instructions. These instructions are converted to low level language by the complier or interpreter. Advantages ‘* Writing instructions in high level language is easier. ‘* High level language is readable and understandable. ‘© High level language program can runs on different machines without any modification, ‘* It is easy to understand, create programs, find errors and modify. sadvantages ‘+ High level language instructions need to be translated to low level language by using compiler or terpreter. ‘* Slower in execution as compared to low level and middle level language. * Lack of flexibility ‘+ Lower efficiency. Generation Languages Development Date Example First Machine Language 1940s TOIT Second ‘Assembly Language 1950s MOV Third High Level Language 1960s Read Sales Fourth ‘Query and Database Languages | 1970s Select * from emp Table -1: Evolution of Programming Languages Programming Language Translator A programming language translator is a software that translate computer program (instructions) written in some specific programming language into another programming language. A program written in high level language is called source code. To convert the source code into machine code, translators are needed There are three 1) Compliers 2) Interpreters 'ypes of programming language translator — 3) Assemblers 4) Linker and Loader 1) Compliers Compiler is a translator which is used to convert programs in high level langue to low level language. It translates the entire program that is group of statements at a time and also reports the errors in source program encountered during the translation. Seuce Progam Compiler ‘Tage Progam aor esses Figure - 2: Compiler translator 2) Interpreters Interpreter is a translator which is used to convert programs in high level language to low level language. Interpreter translates line by line statements and reports the error once it encountered during the translation process. It gives better error diagnostics than a compiler. Souce Progam ——— Inexee |} > Outpt Input ‘igure ~ 3: Interpreter translator 3) Assemblers Assembler is a translator which is used to translate the assembly language code into machine language code. Asety Lage ole af Avetlc | Mie Lagu Code Figure — 4: Assembly translator 4) Linker and Loader Linker is a computer program that links and merges various object files together in order to make an executable file, All these files might have been compiled by separate assembler. The major task of a linker is to search and locate referenced module/routines in a program and to determine the memory location where these codes will be loaded making the program instruction to have absolute reference. Loader is a part of operating system and is responsible for loading executable files into ‘memory and executes them, 1 culates the size of a program (instructions and data) and cerates memory space for it. It initializes various registers to initiate execution. Caeser ] ease edeie sare ieee Capac ate com or rs ieaoere eens [Lo = hee comer Ly z Sere (ees, Hiecore Figure -4 : Process of Linker and Loader Differentiate between Compiler and Interpreter ‘Compiler Interpreter 1) Compiler executes set of instructions at | 1) ites only one instru atime. 2) Execution is faster. 2)_ Execution is slower. 3) It requires more memory for the | 3) It requires efficient memory as no generated intermediate object code. Intermediate object code is generated. 4)_Itis difficult to debug. 4)_Ttis easy to debug. 5) Locating an error is not instant. 3)_Locating an error is instant. 6) C, CF etcis an example of compiler | 6) Python, BASIC, Ruby ete is an example of interpreter. Compilation Process ‘The compilation process is a sequence of various phases such as Lexical analyzer, Syntax analyzer, ‘Semantic analyzer, Intermediate code generator, Machine independent code optimizer, Code generator, Machine dependent code optimizer. Each phase takes input from its previous stage, has its ‘own representation of source program, and feeds its output to the next phase of the compiler. The different phases of compilation process are as 1) Lexical analysis 2) Syntax analysis 3) Semantic analysis 4) Intermediate code generation

You might also like