converter - computer science & engg. by prof.(dr.) anand k. tripathi

9
Chapter-5 Converter Prof.(Dr.) Anand K. Tripathi

Upload: prof-dr-anand-k-tripathi

Post on 06-May-2015

357 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi

Prof.(Dr.) Anand K. TripathiProf.(Dr.) Anand K. Tripathi

Chapter-5

Converter

Chapter-5

Converter

Page 2: Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi

Prof.(Dr.) Anand K. TripathiProf.(Dr.) Anand K. Tripathi

Computer Science & Engg.Computer Science & Engg.

Page 3: Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi

Prof.(Dr.) Anand K. TripathiProf.(Dr.) Anand K. Tripathi

• Since a computer is capable of only understanding the machine level language or instructions hence it becomes necessary to convert the instructions written in high level languages to machine level instructions before the execution of the program.

There are the programs available to convert the source program into machine level program known as converters. These convectors converts the source program into machine level language understandable to computer.

• Types of Converters: • Assembler• Interpreter• Complier

• Since a computer is capable of only understanding the machine level language or instructions hence it becomes necessary to convert the instructions written in high level languages to machine level instructions before the execution of the program.

There are the programs available to convert the source program into machine level program known as converters. These convectors converts the source program into machine level language understandable to computer.

• Types of Converters: • Assembler• Interpreter• Complier

Page 4: Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi

Prof.(Dr.) Anand K. TripathiProf.(Dr.) Anand K. Tripathi

A program written by user in any language is known as source program and its equivalent conversion by any converter is known as object program or machine level instructions or program.

An assembler is a program used to convert the source programs written in assembly language in to machine level language. 

Assembly lang.prog. (input) Machine Lang.prog.(Output)

A program written by user in any language is known as source program and its equivalent conversion by any converter is known as object program or machine level instructions or program.

An assembler is a program used to convert the source programs written in assembly language in to machine level language. 

Assembly lang.prog. (input) Machine Lang.prog.(Output)Assembler

Page 5: Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi

Prof.(Dr.) Anand K. TripathiProf.(Dr.) Anand K. Tripathi

• An interpreter is a type of translator used for translating high level language into machine level language. Interpreter translates the source program into machine level language line by line. Interpreter takes up one line from source code and then converts it first and then again takes up second line from the source code and then converts it and so on till the whole program is not converted.Example-Gwbasic,Fortran etc.While converting line by line if interpreter found any error in any line it stops the conversion and ask user to remove the error first and only will convert the line.

• High level lang.(Input) Machine level lang.(Output)

» (Line by line)

• An interpreter is a type of translator used for translating high level language into machine level language. Interpreter translates the source program into machine level language line by line. Interpreter takes up one line from source code and then converts it first and then again takes up second line from the source code and then converts it and so on till the whole program is not converted.Example-Gwbasic,Fortran etc.While converting line by line if interpreter found any error in any line it stops the conversion and ask user to remove the error first and only will convert the line.

• High level lang.(Input) Machine level lang.(Output)

» (Line by line)

Interpreter

Page 6: Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi

Prof.(Dr.) Anand K. TripathiProf.(Dr.) Anand K. Tripathi

• A compiler is program used to translate the whole program written in high level language into machine level language at a time. A compiler at last asks the user to remove errors if any found and then after this user has to recompile it for correct equivalent conversion of machine code.

• High level lang.(Input) Machine level lang.(Output)

• A compiler is program used to translate the whole program written in high level language into machine level language at a time. A compiler at last asks the user to remove errors if any found and then after this user has to recompile it for correct equivalent conversion of machine code.

• High level lang.(Input) Machine level lang.(Output)

Complier

Page 7: Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi

Prof.(Dr.) Anand K. TripathiProf.(Dr.) Anand K. Tripathi

Q. What do you understand by loader and linker?

Ans. A loader is a system program or operating system utility program that loads or copies programs from secondary storage device to main memory, from where they can be executed.

-A Loader allocate space in memory for the program

-It is the power of loader program of operating system which loads the machine code to main memory means loader accepts the object code programs only.

Q. What do you understand by loader and linker?

Ans. A loader is a system program or operating system utility program that loads or copies programs from secondary storage device to main memory, from where they can be executed.

-A Loader allocate space in memory for the program

-It is the power of loader program of operating system which loads the machine code to main memory means loader accepts the object code programs only.

Page 8: Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi

Prof.(Dr.) Anand K. TripathiProf.(Dr.) Anand K. Tripathi

• Linker: Also called as link editor and binder. A linker is a program that combines the object modules to form an executable program.

• Main memory description

• Linker: Also called as link editor and binder. A linker is a program that combines the object modules to form an executable program.

• Main memory description

Page 9: Converter - Computer Science & Engg. By Prof.(Dr.) Anand K. Tripathi

Prof.(Dr.) Anand K. TripathiProf.(Dr.) Anand K. Tripathi

• Many times the whole program is divided in to many modules and program object codes are also in many parts .This is the liner which really links them out in proper way before going for execution.

• Many times the whole program is divided in to many modules and program object codes are also in many parts .This is the liner which really links them out in proper way before going for execution.