Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming Languages

Similar presentations


Presentation on theme: "Programming Languages"— Presentation transcript:

1 Programming Languages

2 Language A system of communication.

3 Computer Language Means of communication used to communicate between people and the computer.

4 Difference between natural language and computer language
Natural language has a very large vocabulary whereas computer languages mostly have a very limited vocabulary.

5 Classification of Computer Languages

6 Machine Language Fundamental language understood by computer.
Also known as Machine Code. Written as strings of binary 0’s and 1’s. No translation program is required. Not really easy to learn.

7 Instruction Format Opcode Operand (Operation Code) (Address) Instruction prepared in machine language has 2 parts Operation Code: Specifies operation to be performed. Operand: specifies address of operand.

8 Advantages of Machine Language
Programs written in machine language are very fast to execute as instructions written in Machine language are directly understood by CPU and no translation program is required.

9 Limitations of Machine Language
Machine dependent. Difficult to program Error prone.

10 Assembly Language To simplify the program writing process used in machine language, the numeric operation codes of Machine language were substituted by letter symbols(Mnemonics).

11 Mnemonics It is any kind of mental trick we use to help us remember.
For example: machine code of 111 can be interpreted as subtract but it is still easier for us to remember it as SUB.

12 Addition of two numbers
Machine Language ………… ………….. Assembly Language CLA A ADD B STA C TYP C HLT

13 Assembly Language The language which substitutes letters and symbols for the numbers in the machine language program is called an ASSEMBLY LANGUAGE or SYMBOLIC LANGUAGE.

14 Assembler The translator program that translates an assembly code into machine code is called an Assembler. Assembly Language Program (Source Program) Assembler Machine Language Program (Object Program)

15 Advantages of Assembly Language over Machine Language
Easier to understand and use. Easy to locate and correct errors. Easier to modify. No worry about addresses.

16 Limitations of Assembly Language
Machine dependent. Knowledge of hardware required. Machine and Assembly Languages being machine dependent are called as Low Level Languages.

17 High Level Language(HLL)
High level languages instead of being machine based are oriented more towards the problem to be solved. HLL are basically symbolic languages that use English words and/or mathematical symbols rather than Mnemonic codes. HLL are known as Problem Oriented Languages. Every instruction written in HLL is translated into many machine language instructions. This is one to many translation whereas in Assembly Language there is one to one translation.

18 Compiler The translator program that translates the instructions of HLL into Machine Language is called Compiler. High Level Language Program (Source Program) Compiler Machine Language Program (Object Program)

19 Interpreter An Interpreter is a type of translator used for translating HLL into Machine Code. It takes one statement of HLL and translates it into a Machine instruction which is immediately executed. High Level Language Program (Source Program) Interpreter Machine Language Program (Object Program)

20 Difference between Interpreter and a Compiler
In case of Compiler, whole source program is translated into equivalent machine language program. The object code thus obtained is permanently saved for future use. So, repeated compilation is not necessary whereas in Interpreter no object code is saved because translation and execution process alternate. Advantage of an Interpreter over Compiler is that it responses fast to changes in source program. Interpreters are easy to write and do not require large memory space. Disadvantage of interpreter over compiler is that interpreter is a time consuming translation method because each statement must be translated every time it is executed from source program.

21 Assemblers, Interpreters and Compilers are System Software that translate a source program into object program and are known as Language Processors.

22 Advantages of High Level Languages
Machine independent. Easy to learn and use. Fewer errors. Easier to maintain.

23 Thank you


Download ppt "Programming Languages"

Similar presentations


Ads by Google