0% found this document useful (0 votes)
31 views5 pages

Chapter 1

Uploaded by

goutamich3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views5 pages

Chapter 1

Uploaded by

goutamich3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

CHAPTER-1

INTRODUCTION TO OBJECT ORIENTED


PROGRAMMING LANGUAGE
TYPES OF COMPUTER LANGUAGE
The computer languages are basically categorized into two levels:
1) Low level language: In this type of language the computer recognizes the instructions, without
conversion into any other form.
The low level languages are further categorized into two types:
• Machine Language: It is the form of computer language in which instructions are coded in terms
of binary digits (bits), i.e., in the form of zeroes and ones (0's and 1's). This form of binary
instructions is also called the machine code or the object code.
The only advantage of this language is that the program executes faster because the
machine code is directly operated by the CPU.
Limitations of Machine language :
• The user needs to remember all the instruction codes.
• The error detection and correction is difficult.
• It is a machine dependent language.
• Assembly Language: The language, in which the instructions are coded in terms of mnemonics
op-codes (or operation codes), is known as an assembly language.
The instructions given in assembly language are not directly understood by the computer. Hence, a
translator is required to convert the instruction in the assembly language to its equivalent machine
code which is known as Assembler.
TYPES OF COMPUTER LANGUAGE
High Level Language:
These languages allow the user to write the instructions in simple English phrases or sentences. It
also uses common English words and mathematical symbols.
It allows a user to write the instructions, even if he is not aware of the hardware-architecture of the
computer.
BASIC, C/C++, Java and Python are some popular examples of high level languages.
Advantages of High Level language:
• It is a machine independent language.
• The instructions can be written using English words or phrases.
• It is easier to understand and develop the program logic.
• The error detection and correction is easier.
Disadvantages of High Level language:
• It requires a translator to convert the source code (program) into machine code.
• The machine code of high level instructions might be less efficient than the machine code
generated from assembly language
COMPILER AND INTERPRETER
The conversion of high level language (source code) to machine language (binary code) can be done
in two ways; either by using a Compiler or an Interpreter.
Compiler: A software that accepts the whole program written in high level language and converts it
into its equivalent program in machine language, is known as the compiler.
The program, which the compiler uses for conversion, is known as the source program or source
code. The program converted into the machine language is known as the object program or object
code.
A compiler is designed exclusively to convert a program written in a specific high level language.
This means that each HLL would require a separate compiler for conversion.
For example, a FORTRAN compiler is capable of translating only a FORTRAN program. A
computer system may have more than one compiler for more than one high level language.
Interpreter: The software instructions written languages into in high level their equivalent
instructions in machine language, line by line or statement by statement, is known as the Interpreter.
If an error is found on any line, the execution stops there till it is corrected. This process of
correcting errors takes more time to execute.
The compilers and interpreters are basically system softwares, which are also known as the language
processors.
COMPILER AND INTERPRETER
Difference between Compiler and Interpreter

Compiler Interpreter
It converts the whole source program It converts the source program into the
into the object program at once. object program one line at a time
It displays the errors for the whole It displays the errors, one line at a time
program together, after the compilation. and only after debugging that error the
control goes to the

You might also like