Lession 6


Published on

1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Lession 6

  1. 1. Information Technology for Managers Session 6 By Prof. Arun Mishra
  2. 2. Learning Objectives <ul><li>In this session you will learn: </li></ul><ul><li>Machine Language </li></ul><ul><li>Assembly Language </li></ul><ul><li>High-level Language </li></ul><ul><li>Object-oriented Language </li></ul><ul><li>Compilers </li></ul><ul><li>Interpreters </li></ul><ul><li>Subroutines </li></ul>
  3. 3. Computer Language <ul><li>A language that is acceptable to a computer system is called computer language or programming language. </li></ul><ul><li>A computer Language is used by a programmer to instruct a computer what he wants to do </li></ul>
  4. 4. Types of Computer Language <ul><li>Machine Level Language </li></ul><ul><li>Assembly Language </li></ul><ul><li>High Level Language </li></ul><ul><li>Fourth level Language </li></ul><ul><li>Object oriented Language. </li></ul>
  5. 5. Machine Level Language <ul><li>Machine language of a computer is written as string of binary ‘1’ & ‘o’. Example- 10001,101010 </li></ul><ul><li>A computer can be programmed to understand many different computer languages, but there is only one language understood by computer without using a translation program. </li></ul><ul><li>This Language is called Machine Level Language or language of computer. </li></ul>
  6. 6. Machine language instruction format <ul><li>It has two parts: </li></ul><ul><li>OPCODE (operation code)- tells the computer what function to perform. </li></ul><ul><li>OPERAND- tells computer where to find or store the data or instruction which are to be manipulated. </li></ul>
  7. 7. Operations included in instruction format of machine language <ul><li>Arithmetic operations </li></ul><ul><li>Logical operations </li></ul><ul><li>Branch operations for transfer of control to the address given in operand field. </li></ul><ul><li>Data movement operations for moving data between memory location & resistors. </li></ul><ul><li>Data movement operations for moving data from 1 computer to another. Or 1 input device to another output device. </li></ul>
  8. 8. Limitation of Machine level language <ul><li>Machine dependent. </li></ul><ul><li>Difficult to program. </li></ul><ul><li>Error prone- tough to remember opcodes. </li></ul><ul><li>Difficult to modify. </li></ul>
  9. 9. Assembly Language <ul><li>A Language which allows instruction and storage location to be represented by letters and symbols, instead of numbers is called Assembly Language. </li></ul><ul><li>A program written in An assembly language is called an assembly language program. </li></ul>
  10. 10. Merits of assembly language over machine language <ul><li>It uses alpha numeric mnemonic codes instead of numeric codes for instructions. e.g.-We use ADD instead of ‘1110’ for the instruction to Add. </li></ul><ul><li>It allows Storage Location to be represented in the form of Alphanumeric address instead of numeric address. e.g.- memory location 1000,1001,1002 may be represented as FIRST, SCND, ANSR. </li></ul>
  11. 11. Merits of assembly language over machine language <ul><li>It provides additional instructions, called pseudo instructions in instruction set. </li></ul><ul><li>e.g.- pseudo instruction tell things like:- </li></ul><ul><li>START program AT 0000 </li></ul><ul><li>START data AT 1000 </li></ul><ul><li>SET ASIDE an address for FRST </li></ul><ul><li>SET ASIDE an address for SCND </li></ul>
  12. 12. Assembler <ul><li>An assembler is a system software which translates an assembly language into its equivalent machine language. </li></ul><ul><li>A computer can directly execute only machine language program, which use numbers for representing instructions and storage locations. </li></ul><ul><li>So assembly language program must be converted into its equivalent machine language program. </li></ul><ul><li>This translation is done with the help of Translator program known as ASSEMBLER. </li></ul>
  13. 13. Advantages of Assembly Language <ul><li>Easier to understand and use. </li></ul><ul><li>Easier to modify. </li></ul><ul><li>Easy to locate and correct errors. </li></ul>
  14. 14. Disadvantages of assembly language <ul><li>Machine Dependent </li></ul><ul><li>Knowledge of hardware is required. </li></ul><ul><li>Machine level coding- all instruction are still written at machine code level. </li></ul><ul><li>Writing machine code is still time consuming. </li></ul>
  15. 15. Example of Assembly language <ul><li>Microprocessor language. </li></ul>
  16. 16. High Level Language <ul><li>High level language were designed to overcome the limitations of low level languages (Machine language & Assembly language). </li></ul><ul><li>High level enabled the use of computers to solve problems even by non experts. </li></ul>
  17. 17. Characteristic of High Level language <ul><li>It is machine independent. </li></ul><ul><li>It do not require the programmers to know anything about the internal structure of computer on which program will be executed. </li></ul><ul><li>It do not deal with the machine Level coding. </li></ul><ul><li>They deal with the high level coding enabling the programmer to write instruction using ENGLISH words and familiar symbol & expression. </li></ul>
  18. 18. Compiler <ul><li>High level language must be converted into its equivalent machine language program, before it is executed. </li></ul><ul><li>This translation is Done by translator program known as COMPILER. </li></ul><ul><li>Compiler is program which translates High level language into its equivalent machine language program. </li></ul>
  19. 19. Compiler <ul><li>A compiler can translate only those source programs which have been written in the language for which the compiler is meant. E.g.- FORTRAN compiler is only capable of translating source program written in FORTRAN. </li></ul><ul><li>So each computer requires separate compiler for each high level language it supports. </li></ul>
  20. 20. Interpreter <ul><li>It is also used to translate High Level language to Machine Level Language. </li></ul><ul><li>But it takes one statement at a timed, translates its and immediately executes the resulting machine language instruction. </li></ul><ul><li>It translate 1 instruction at a time. </li></ul>
  21. 21. Interpreter
  22. 22. Advantage of HIGH level Language <ul><li>Machine Independent </li></ul><ul><li>Easier to learn & Use. </li></ul><ul><li>Very less errors. </li></ul><ul><li>Low program preparation cost. </li></ul><ul><li>Saves time. </li></ul><ul><li>Better documentation. </li></ul><ul><li>Easy to maintain. </li></ul>
  23. 23. Disadvantages of High level Language <ul><li>Low efficiency- as it first convert into machine language then executed. </li></ul>
  24. 24. Example of High level Language <ul><li>Fortran </li></ul><ul><li>Cobol </li></ul><ul><li>Pascal </li></ul><ul><li>C </li></ul>
  25. 25. Fourth generation language <ul><li>It is also known as non-procedural language. </li></ul><ul><li>These languages consists of a variety of programming languages that enable users to specify the result they want, while the computer determines the sequence of instruction that will accomplish those result. </li></ul><ul><li>Fourth generation language simplify and accelerates software development as well as reduce programming errors. </li></ul>
  26. 26. Example of fourth generation language <ul><li>Dbase, FoxPro, Oracle, Ms-Access </li></ul>
  27. 27. Object oriented Language <ul><li>An object in object oriented programming language consist of data and the actions that can be performed on the data. </li></ul><ul><li>OOP language are distinguished from other language as they combine data and procedures into objects, whereas the other programming language separates data from the procedures or actions that are to be performed on them. </li></ul><ul><li>Examples: JAVA, C++. </li></ul>
  28. 28. Characteristic of good programming language <ul><li>Simplicity - Must be simple & easy to learn. </li></ul><ul><li>Naturalness -should be natural for the application area for which it is designed. </li></ul><ul><li>Abstraction -Means ability to define & then use complicated structure or operations in ways that allow many of the details to be ignored. </li></ul>
  29. 29. Characteristic of good programming language <ul><li>Efficiency -Good programming language are efficiently translated into machine codes, are efficiently executed and consumes less space in memory. </li></ul><ul><li>Compactness - Programmer should be able to express intended operations concisely. </li></ul><ul><li>Extensibility - should allow extension in future. </li></ul>
  30. 30. Any Questions?