際際滷

際際滷Share a Scribd company logo
Programming Languages and
Their Comparative Study
Computer programming
 Computer Programming is defined as the process of creating computer
software using a programming Language. Computer programs are written by
Human individuals(Programmers)
 A computer program is a step by step set of instructions that a computer has
to work through in a logical sequence in order to carry out a particular task.
The computer executes these instructions (obeys the instructions) when told
to do so by the user.
Programming Languages
 Programming languages are the vocabulary and set of grammatical rules for
instructing a computer to perform specific tasks. There are many different types
of programming languages each having a unique set of keywords (words that it
understands) and a special syntax (grammar)for organising program instructions.
 There are many computer programming languages and so the programmer will
have to decide which one to use for solving a particular problem. These
languages must be learnt just as Swahili, English or French etc.
Syntax
 Syntax refers to the spelling and grammar of a programming language. Each
program defines its own syntactical rules that control which words the computer
understands, which combinations of words are meaningful, and what
punctuation is necessary. Text-based programming languages are based on
sequences of characters, while visual programming languages are based on the
spatial layout and connections between symbols (which may be textual or
graphical).
Syntax Example
 #include <studio>
 int main( void ) {
 printf( "Welcome to C!n" );
 return 0;
 }
Levels of programming languages
 Programming languages are classified into five major categories:
 Machine languages (first generation languages)
 Assembly languages (second generation languages)
 Third generation languages
 Fourth generation languages
 Natural languages.
 Machine and assembly languages are referred to as low level
languages; third generation, fourth generation and natural
languages are categorised as high level languages.
Low level vs high level language
 A low level language is machine dependent; that is, it is written to run on one
particular computer. A high level language is machine independent, which
means the high level language code can run on many different types of
computer.
 There are two types of low-level programming languages: Machine Language
and Assembly Language.
Lec21&22.pptx programing language and there study
Machine language  First Generation
Language (1GL)
 The machine language writes programs using the machine code of 1s and 0s,
which is directly understood by the computer. This makes the language suitable
for the understanding of the machine but very much more difficult to interpret
and learn by the human programmer.
 The main problems with using machine code directly are that it is very easy to
make a mistake, and very hard to find it once you realise the mistake has been
made.
 There was originally no compiler or assembler to process the instructions in 1GL.
Characteristics of 1GL
Advantages
 No translator is required
 The programs written in these languages utilize the memory in an efficient manner because it is possible
to keep track of each bit of data.
 Fastest to execute because it is already in the language that the computer can understand
Disadvantages
 Difficult to interpret (requires the aid of a reference manual to interpret the meaning of each code)
 Easy to make mistakes in the sequence of 1s and 0s; replacing a 1 for a 0 can result in the wrong
command/instruction being executed
 It is difficult to identify mistakes made
 Time-consuming and tedious to write
 Machine dependent
 Programming becomes more difficult as the complexity of the program increases
Assembly language  Second Generation
Language (2GL)
 Assembly language is written using mnemonic codes (abbreviated English
words) or short codes that suggest their meaning and are therefore easier to
remember.
 Assembly language contains human-readable notations that can be further
converted to machine language using an assembler(converts assembly level
instructions to machine level instructions.)
 These codes represent operations, addresses that relate to main memory,
and storage registers of the computer. Typical codes might be: LDA, STO, ADD,
NOP, etc.
 Assembly language are a necessary bridge between the underlying hardware
of a computer and the higher-level programming languagessuch as Python or
JavaScriptin which modern software programs are written.
Example
An example of a program code to add and store two
numbers would be:
 LDA A, 20 : load accumulator A with the value 20
 ADD A, 10 : add the value 10 to accumulator A
 STO B, A : store contents of accumulator A into
storage register B
 NOP: no operation (stop here)
 An accumulator is a type of register included in a CPU
Characteristics of 2GL
 As with machine language, assembly language is machine dependent.
 Assembly language, being machine dependent, is faster and more
efficient in the use of hardware than high-level programming
languages.
 Assembly languages have to be translated into machine language by
language translators known as assemblers for the processor to
understand.
 Easier to write than machine language
 The code is not very easy to understand, hence the introduction of
high level programming languages.
Assemblers and Compilers
 Assemblers and Compilers are programs that convert high level
languages into machine code.
 The assembly-language program must be translated into
machine code by a separate program called an assembler. The
assembler program recognises the character strings that make
up the symbolic names of the various machine operations, and
substitutes the required machine code for each instruction.
 A Compiler is a program that converts the entire source
code(compiles it) into machine language at one time before the
computer can run the program at a later time. While compiling
the source code into machine code, it checks that the syntax is
properly written by the programmer for the programmer to
debug the program.
How a Compiler works
Interpreters
 The interpreters are programs that translates the high level
program code one statement at a time, that is, it reads a code
statement, converts it to one or more machine language
instructions, and then executes the instruction before moving
translating the next code statement in the program. If there is
any error in the statement, the programmer can correct the
error before the interpreter evaluates the next statement.
 Interpreters are slower than Compilers because interpreters
convert a statement at a time and runs it before moving to the
next line.
How an Interpreter works
High-level programming languages
High level programming language is defined as one that is
machine independent and uses variables and objects, Boolean
expressions, functions, loops, arrays, threads, locks which are
similar to their meaning (abstraction).
 High-level languages have evolved over the years and can be
grouped into categories: Third Generation Languages (3GL),
Fourth Generation Languages (4GL), Object Oriented
Programming Languages (OOP), Fifth Generation Languages
(5GL) and Scripting Languages
High-level programming languages
 These languages are problem oriented, so they are machine
independent.
 Since high-level languages reflect the logic and procedures
used in a human algorithm, the programmer is able to
concentrate on developing task algorithms rather than on
how the computer will carry out the instructions.
 the programmer must still specify a complete set of detailed
instructions. The words and grammar of high-level
languages are English-like and this makes the programs
more readable and easy to write.
Characteristics
 A high-level language is governed by a strict syntax (set of grammatical
rules).
 they are easier to read, write, and maintain.
 They also permit faster development of large programs.
 programs written in a high-level language must be translated into
machine language by a compiler or interpreter.
 They are machine independent hence portable
 They are user friendly and easy to learn
 They are more flexible hence they enhance the creativity of the
programmer, increasing productivity
 They are executed much slower than low-level programming languages
Third generation languages
 The third generation is also called procedural language /3 GL. It consists of the use of a
series of English-like words that humans can understand easily, to write instructions. Its
also called High-Level Programming Language. For execution, a program in this
language needs to be translated into machine language using Compiler/ Interpreter.
Examples of this type of language are C, PASCAL, FORTRAN, COBOL, etc.
 Advantages of third generation programming language
 It is easy to develop, learn and understand the program.
 As the program written in these languages are less prone to errors they
are easy to maintain.
 The program written in these languages can be developed in very less
time as compared to the first and second generation language
 Same code can be copied to another machine & executed on that
machine by using compiler-specific to that machine
Third generation languages
Disadvantages :
1. Compiler/ interpreter is needed.
2. Different compilers are needed for different machines.
Fourth Generation languages
The fourth-generation language is also called a non  procedural language/ 4GL. It enables
users to access the database. Examples: SQL, FoxPro, Focus, etc. The fourth generation
programming languages were designed and developed to reduce the time, cost and effort
needed to develop different types of software applications. These languages are also
human-friendly to understand.
Advantages :
1. Easy to understand & learn.
2. Less time required for application creation.
3. It is less prone to errors.
Disadvantages :
1. Memory consumption is high.
2. Has poor control over Hardware.
3. Less flexible.
Fifth generation languages
 The fifth-generation languages are also called 5GL. It is based on the concept of artificial
intelligence. It uses the concept that that rather than solving a problem algorithmically, an
application can be built to solve it based on some constraints, i.e., we make computers
learn to solve any problem. Parallel Processing & superconductors are used for this type
of language to make real artificial intelligence.
 Example: PROLOG, LISP, etc.
Advantages :
1. Machines can make decisions.
2. Programmer effort reduces to solve a problem.
3. Easier than 3GL or 4GL to learn and use.
Disadvantages :
1. Complex and long code.
2. More resources are required & they are expensive too.
Major high level programming languages used
 FORTRAN (FORmula TRAnslator)developed in the late 1950s
developed to design scientific applications
 COBOL (Common Business Oriented Language) developed in
early 1960s to develop business applications.
 RPG (Report Program generator) was developed in early
1960s to assist in generating reports and complex
calculations.
Major high level programming languages used
 BASIC (Beginners All-purpose symbolic instruction code)
developed in mid 1960 Basic versions include MS-BASIC,
QBASIC, SmallBASIC and visual basic.
 Pascal was developed in the late 1960s for the purpose of
teaching structured programming concepts
 C developed in the early 1970s to write system software
 Ada was developed in the late 1970s originally developed to
meet the needs of embedded computer systems
Major high level programming languages used
 C++ developed in the 1980s is an object-oriented language
mainly to develop application software
 Note that in addition to the major languages discussed above,
there are many other programming languages that have been
developed such as JavaScript, and Python

More Related Content

Similar to Lec21&22.pptx programing language and there study (20)

COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptxCOM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
IorlahaSamuel1
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptxCOM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
IorlahaSamuel1
INTRODUCTION TO COMPUTER PROGRAMMING.pptx
INTRODUCTION TO COMPUTER PROGRAMMING.pptxINTRODUCTION TO COMPUTER PROGRAMMING.pptx
INTRODUCTION TO COMPUTER PROGRAMMING.pptx
IorlahaSamuel1
Computer languages
Computer languagesComputer languages
Computer languages
AqdasNoor
Languages in computer
Languages in computerLanguages in computer
Languages in computer
The University of Lahore
Language processors
Language processorsLanguage processors
Language processors
Dr. B T Sampath Kumar
Computer languages
Computer languagesComputer languages
Computer languages
Buxoo Abdullah
Programming languages.pptx
Programming languages.pptxProgramming languages.pptx
Programming languages.pptx
Christ Association
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
Computer language.ppsx
Computer language.ppsxComputer language.ppsx
Computer language.ppsx
Sneha Suman
Intro to programming languages by 4.pptx
Intro to programming languages by 4.pptxIntro to programming languages by 4.pptx
Intro to programming languages by 4.pptx
trailersmovie
Computer languages and generation
Computer languages and generationComputer languages and generation
Computer languages and generation
Munawar Bukhari
Fundamentals of Programming language.docx
Fundamentals of Programming language.docxFundamentals of Programming language.docx
Fundamentals of Programming language.docx
bijayakumarsahoo22
Computer Language
Computer LanguageComputer Language
Computer Language
Deepak Yadav
Lecture 8
Lecture 8Lecture 8
Lecture 8
Anshumali Singh
computer language with full detail
computer language with full detail computer language with full detail
computer language with full detail
sonykhan3
Computer programming
Computer programmingComputer programming
Computer programming
Suneel Dogra
Computer languages
Computer languagesComputer languages
Computer languages
BESOR ACADEMY
Lesson 2.pptx
Lesson 2.pptxLesson 2.pptx
Lesson 2.pptx
AlinaMishra7
Program Logic and Design
Program Logic and DesignProgram Logic and Design
Program Logic and Design
Froilan Cantillo
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptxCOM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
IorlahaSamuel1
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptxCOM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
COM 113 INTRO TO COMPUTER PROGRAMMING-PRT2.pptx
IorlahaSamuel1
INTRODUCTION TO COMPUTER PROGRAMMING.pptx
INTRODUCTION TO COMPUTER PROGRAMMING.pptxINTRODUCTION TO COMPUTER PROGRAMMING.pptx
INTRODUCTION TO COMPUTER PROGRAMMING.pptx
IorlahaSamuel1
Computer languages
Computer languagesComputer languages
Computer languages
AqdasNoor
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
Computer language.ppsx
Computer language.ppsxComputer language.ppsx
Computer language.ppsx
Sneha Suman
Intro to programming languages by 4.pptx
Intro to programming languages by 4.pptxIntro to programming languages by 4.pptx
Intro to programming languages by 4.pptx
trailersmovie
Computer languages and generation
Computer languages and generationComputer languages and generation
Computer languages and generation
Munawar Bukhari
Fundamentals of Programming language.docx
Fundamentals of Programming language.docxFundamentals of Programming language.docx
Fundamentals of Programming language.docx
bijayakumarsahoo22
Computer Language
Computer LanguageComputer Language
Computer Language
Deepak Yadav
computer language with full detail
computer language with full detail computer language with full detail
computer language with full detail
sonykhan3
Computer programming
Computer programmingComputer programming
Computer programming
Suneel Dogra
Computer languages
Computer languagesComputer languages
Computer languages
BESOR ACADEMY
Program Logic and Design
Program Logic and DesignProgram Logic and Design
Program Logic and Design
Froilan Cantillo

Recently uploaded (20)

How to configure the retail shop in Odoo 17 Point of Sale
How to configure the retail shop in Odoo 17 Point of SaleHow to configure the retail shop in Odoo 17 Point of Sale
How to configure the retail shop in Odoo 17 Point of Sale
Celine George
APM London Network: Essentials of a Good PMO, 2 April 2025
APM London Network: Essentials of a Good PMO, 2 April 2025APM London Network: Essentials of a Good PMO, 2 April 2025
APM London Network: Essentials of a Good PMO, 2 April 2025
Association for Project Management
Synthesis for VIth SEM 21-2-25.pptx by Mrs. Manjushri P. Dabhade
Synthesis for VIth SEM 21-2-25.pptx by Mrs. Manjushri P. DabhadeSynthesis for VIth SEM 21-2-25.pptx by Mrs. Manjushri P. Dabhade
Synthesis for VIth SEM 21-2-25.pptx by Mrs. Manjushri P. Dabhade
Dabhade madam Dabhade
Pushyabhuti Dynesty Vardhan Vamsha Early Rulers.pptx
Pushyabhuti Dynesty Vardhan Vamsha Early Rulers.pptxPushyabhuti Dynesty Vardhan Vamsha Early Rulers.pptx
Pushyabhuti Dynesty Vardhan Vamsha Early Rulers.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
The Effectiveness of Manual Therapies on the Thoracic.pptx
The Effectiveness of Manual Therapies on the Thoracic.pptxThe Effectiveness of Manual Therapies on the Thoracic.pptx
The Effectiveness of Manual Therapies on the Thoracic.pptx
SamarHosni3
Introduction to Drug Design.pptx by Mrs. Manjushri P. Dabhade
Introduction to Drug Design.pptx by Mrs. Manjushri P. DabhadeIntroduction to Drug Design.pptx by Mrs. Manjushri P. Dabhade
Introduction to Drug Design.pptx by Mrs. Manjushri P. Dabhade
Dabhade madam Dabhade
10.socialorganisationandsocialsystem .pptx
10.socialorganisationandsocialsystem .pptx10.socialorganisationandsocialsystem .pptx
10.socialorganisationandsocialsystem .pptx
Vivek Bhattji
Action of Muscles ppt by Priscilla Jasper Vedam Vemavarapu @ASRHMC
Action of  Muscles ppt by Priscilla Jasper Vedam Vemavarapu @ASRHMCAction of  Muscles ppt by Priscilla Jasper Vedam Vemavarapu @ASRHMC
Action of Muscles ppt by Priscilla Jasper Vedam Vemavarapu @ASRHMC
jaspervedamvemavarap
PSD-I Exam Dumps: Your Key to Passing on the First Try
PSD-I Exam Dumps: Your Key to Passing on the First TryPSD-I Exam Dumps: Your Key to Passing on the First Try
PSD-I Exam Dumps: Your Key to Passing on the First Try
lethamcmullen
How to process Interwarehouse and Intrawarehouse transfers in Odoo
How to process Interwarehouse and Intrawarehouse transfers in OdooHow to process Interwarehouse and Intrawarehouse transfers in Odoo
How to process Interwarehouse and Intrawarehouse transfers in Odoo
Celine George
Test Bank Pharmacology 3rd Edition Brenner Stevens
Test Bank Pharmacology 3rd Edition Brenner  StevensTest Bank Pharmacology 3rd Edition Brenner  Stevens
Test Bank Pharmacology 3rd Edition Brenner Stevens
evakimworwa38
Using GenAI for Universal Design for Learning
Using GenAI for Universal Design for LearningUsing GenAI for Universal Design for Learning
Using GenAI for Universal Design for Learning
Damian T. Gordon
Analysis of Conf File Parameters in Odoo 17
Analysis of Conf File Parameters in Odoo 17Analysis of Conf File Parameters in Odoo 17
Analysis of Conf File Parameters in Odoo 17
Celine George
Purchase Analysis in Odoo 17 - Odoo 際際滷s
Purchase Analysis in Odoo 17 - Odoo 際際滷sPurchase Analysis in Odoo 17 - Odoo 際際滷s
Purchase Analysis in Odoo 17 - Odoo 際際滷s
Celine George
TI LI畛U CHUYN SU L畛P 12 THEO CH働NG TRNH M畛I DNG CHO C畉 3 B畛 SCH N THI...
TI LI畛U CHUYN SU L畛P 12 THEO CH働NG TRNH M畛I DNG CHO C畉 3 B畛 SCH N THI...TI LI畛U CHUYN SU L畛P 12 THEO CH働NG TRNH M畛I DNG CHO C畉 3 B畛 SCH N THI...
TI LI畛U CHUYN SU L畛P 12 THEO CH働NG TRNH M畛I DNG CHO C畉 3 B畛 SCH N THI...
Nguyen Thanh Tu Collection
NC Advisory Council on Student Safety and Well-Being
NC Advisory Council on Student Safety and Well-BeingNC Advisory Council on Student Safety and Well-Being
NC Advisory Council on Student Safety and Well-Being
Mebane Rash
McElaney "What is inclusive publishing and why do we care about accessibility...
McElaney "What is inclusive publishing and why do we care about accessibility...McElaney "What is inclusive publishing and why do we care about accessibility...
McElaney "What is inclusive publishing and why do we care about accessibility...
National Information Standards Organization (NISO)
Bioinformatics: History of Bioinformatics, Components of Bioinformatics, Geno...
Bioinformatics: History of Bioinformatics, Components of Bioinformatics, Geno...Bioinformatics: History of Bioinformatics, Components of Bioinformatics, Geno...
Bioinformatics: History of Bioinformatics, Components of Bioinformatics, Geno...
A Biodiction : A Unit of Dr. Divya Sharma
Anthelmintic Agent.pptx by Mrs. Manjushri P. Dabhade
Anthelmintic Agent.pptx by Mrs. Manjushri P. DabhadeAnthelmintic Agent.pptx by Mrs. Manjushri P. Dabhade
Anthelmintic Agent.pptx by Mrs. Manjushri P. Dabhade
Dabhade madam Dabhade
Code a Strategy on Pine Script With the Help of ChatGPT by Akshay Choudhary
Code a Strategy on Pine Script With the Help of ChatGPT by Akshay ChoudharyCode a Strategy on Pine Script With the Help of ChatGPT by Akshay Choudhary
Code a Strategy on Pine Script With the Help of ChatGPT by Akshay Choudhary
QuantInsti
How to configure the retail shop in Odoo 17 Point of Sale
How to configure the retail shop in Odoo 17 Point of SaleHow to configure the retail shop in Odoo 17 Point of Sale
How to configure the retail shop in Odoo 17 Point of Sale
Celine George
Synthesis for VIth SEM 21-2-25.pptx by Mrs. Manjushri P. Dabhade
Synthesis for VIth SEM 21-2-25.pptx by Mrs. Manjushri P. DabhadeSynthesis for VIth SEM 21-2-25.pptx by Mrs. Manjushri P. Dabhade
Synthesis for VIth SEM 21-2-25.pptx by Mrs. Manjushri P. Dabhade
Dabhade madam Dabhade
The Effectiveness of Manual Therapies on the Thoracic.pptx
The Effectiveness of Manual Therapies on the Thoracic.pptxThe Effectiveness of Manual Therapies on the Thoracic.pptx
The Effectiveness of Manual Therapies on the Thoracic.pptx
SamarHosni3
Introduction to Drug Design.pptx by Mrs. Manjushri P. Dabhade
Introduction to Drug Design.pptx by Mrs. Manjushri P. DabhadeIntroduction to Drug Design.pptx by Mrs. Manjushri P. Dabhade
Introduction to Drug Design.pptx by Mrs. Manjushri P. Dabhade
Dabhade madam Dabhade
10.socialorganisationandsocialsystem .pptx
10.socialorganisationandsocialsystem .pptx10.socialorganisationandsocialsystem .pptx
10.socialorganisationandsocialsystem .pptx
Vivek Bhattji
Action of Muscles ppt by Priscilla Jasper Vedam Vemavarapu @ASRHMC
Action of  Muscles ppt by Priscilla Jasper Vedam Vemavarapu @ASRHMCAction of  Muscles ppt by Priscilla Jasper Vedam Vemavarapu @ASRHMC
Action of Muscles ppt by Priscilla Jasper Vedam Vemavarapu @ASRHMC
jaspervedamvemavarap
PSD-I Exam Dumps: Your Key to Passing on the First Try
PSD-I Exam Dumps: Your Key to Passing on the First TryPSD-I Exam Dumps: Your Key to Passing on the First Try
PSD-I Exam Dumps: Your Key to Passing on the First Try
lethamcmullen
How to process Interwarehouse and Intrawarehouse transfers in Odoo
How to process Interwarehouse and Intrawarehouse transfers in OdooHow to process Interwarehouse and Intrawarehouse transfers in Odoo
How to process Interwarehouse and Intrawarehouse transfers in Odoo
Celine George
Test Bank Pharmacology 3rd Edition Brenner Stevens
Test Bank Pharmacology 3rd Edition Brenner  StevensTest Bank Pharmacology 3rd Edition Brenner  Stevens
Test Bank Pharmacology 3rd Edition Brenner Stevens
evakimworwa38
Using GenAI for Universal Design for Learning
Using GenAI for Universal Design for LearningUsing GenAI for Universal Design for Learning
Using GenAI for Universal Design for Learning
Damian T. Gordon
Analysis of Conf File Parameters in Odoo 17
Analysis of Conf File Parameters in Odoo 17Analysis of Conf File Parameters in Odoo 17
Analysis of Conf File Parameters in Odoo 17
Celine George
Purchase Analysis in Odoo 17 - Odoo 際際滷s
Purchase Analysis in Odoo 17 - Odoo 際際滷sPurchase Analysis in Odoo 17 - Odoo 際際滷s
Purchase Analysis in Odoo 17 - Odoo 際際滷s
Celine George
TI LI畛U CHUYN SU L畛P 12 THEO CH働NG TRNH M畛I DNG CHO C畉 3 B畛 SCH N THI...
TI LI畛U CHUYN SU L畛P 12 THEO CH働NG TRNH M畛I DNG CHO C畉 3 B畛 SCH N THI...TI LI畛U CHUYN SU L畛P 12 THEO CH働NG TRNH M畛I DNG CHO C畉 3 B畛 SCH N THI...
TI LI畛U CHUYN SU L畛P 12 THEO CH働NG TRNH M畛I DNG CHO C畉 3 B畛 SCH N THI...
Nguyen Thanh Tu Collection
NC Advisory Council on Student Safety and Well-Being
NC Advisory Council on Student Safety and Well-BeingNC Advisory Council on Student Safety and Well-Being
NC Advisory Council on Student Safety and Well-Being
Mebane Rash
Bioinformatics: History of Bioinformatics, Components of Bioinformatics, Geno...
Bioinformatics: History of Bioinformatics, Components of Bioinformatics, Geno...Bioinformatics: History of Bioinformatics, Components of Bioinformatics, Geno...
Bioinformatics: History of Bioinformatics, Components of Bioinformatics, Geno...
A Biodiction : A Unit of Dr. Divya Sharma
Anthelmintic Agent.pptx by Mrs. Manjushri P. Dabhade
Anthelmintic Agent.pptx by Mrs. Manjushri P. DabhadeAnthelmintic Agent.pptx by Mrs. Manjushri P. Dabhade
Anthelmintic Agent.pptx by Mrs. Manjushri P. Dabhade
Dabhade madam Dabhade
Code a Strategy on Pine Script With the Help of ChatGPT by Akshay Choudhary
Code a Strategy on Pine Script With the Help of ChatGPT by Akshay ChoudharyCode a Strategy on Pine Script With the Help of ChatGPT by Akshay Choudhary
Code a Strategy on Pine Script With the Help of ChatGPT by Akshay Choudhary
QuantInsti

Lec21&22.pptx programing language and there study

  • 2. Computer programming Computer Programming is defined as the process of creating computer software using a programming Language. Computer programs are written by Human individuals(Programmers) A computer program is a step by step set of instructions that a computer has to work through in a logical sequence in order to carry out a particular task. The computer executes these instructions (obeys the instructions) when told to do so by the user.
  • 3. Programming Languages Programming languages are the vocabulary and set of grammatical rules for instructing a computer to perform specific tasks. There are many different types of programming languages each having a unique set of keywords (words that it understands) and a special syntax (grammar)for organising program instructions. There are many computer programming languages and so the programmer will have to decide which one to use for solving a particular problem. These languages must be learnt just as Swahili, English or French etc.
  • 4. Syntax Syntax refers to the spelling and grammar of a programming language. Each program defines its own syntactical rules that control which words the computer understands, which combinations of words are meaningful, and what punctuation is necessary. Text-based programming languages are based on sequences of characters, while visual programming languages are based on the spatial layout and connections between symbols (which may be textual or graphical).
  • 5. Syntax Example #include <studio> int main( void ) { printf( "Welcome to C!n" ); return 0; }
  • 6. Levels of programming languages Programming languages are classified into five major categories: Machine languages (first generation languages) Assembly languages (second generation languages) Third generation languages Fourth generation languages Natural languages. Machine and assembly languages are referred to as low level languages; third generation, fourth generation and natural languages are categorised as high level languages.
  • 7. Low level vs high level language A low level language is machine dependent; that is, it is written to run on one particular computer. A high level language is machine independent, which means the high level language code can run on many different types of computer. There are two types of low-level programming languages: Machine Language and Assembly Language.
  • 9. Machine language First Generation Language (1GL) The machine language writes programs using the machine code of 1s and 0s, which is directly understood by the computer. This makes the language suitable for the understanding of the machine but very much more difficult to interpret and learn by the human programmer. The main problems with using machine code directly are that it is very easy to make a mistake, and very hard to find it once you realise the mistake has been made. There was originally no compiler or assembler to process the instructions in 1GL.
  • 10. Characteristics of 1GL Advantages No translator is required The programs written in these languages utilize the memory in an efficient manner because it is possible to keep track of each bit of data. Fastest to execute because it is already in the language that the computer can understand Disadvantages Difficult to interpret (requires the aid of a reference manual to interpret the meaning of each code) Easy to make mistakes in the sequence of 1s and 0s; replacing a 1 for a 0 can result in the wrong command/instruction being executed It is difficult to identify mistakes made Time-consuming and tedious to write Machine dependent Programming becomes more difficult as the complexity of the program increases
  • 11. Assembly language Second Generation Language (2GL) Assembly language is written using mnemonic codes (abbreviated English words) or short codes that suggest their meaning and are therefore easier to remember. Assembly language contains human-readable notations that can be further converted to machine language using an assembler(converts assembly level instructions to machine level instructions.) These codes represent operations, addresses that relate to main memory, and storage registers of the computer. Typical codes might be: LDA, STO, ADD, NOP, etc. Assembly language are a necessary bridge between the underlying hardware of a computer and the higher-level programming languagessuch as Python or JavaScriptin which modern software programs are written.
  • 12. Example An example of a program code to add and store two numbers would be: LDA A, 20 : load accumulator A with the value 20 ADD A, 10 : add the value 10 to accumulator A STO B, A : store contents of accumulator A into storage register B NOP: no operation (stop here) An accumulator is a type of register included in a CPU
  • 13. Characteristics of 2GL As with machine language, assembly language is machine dependent. Assembly language, being machine dependent, is faster and more efficient in the use of hardware than high-level programming languages. Assembly languages have to be translated into machine language by language translators known as assemblers for the processor to understand. Easier to write than machine language The code is not very easy to understand, hence the introduction of high level programming languages.
  • 14. Assemblers and Compilers Assemblers and Compilers are programs that convert high level languages into machine code. The assembly-language program must be translated into machine code by a separate program called an assembler. The assembler program recognises the character strings that make up the symbolic names of the various machine operations, and substitutes the required machine code for each instruction. A Compiler is a program that converts the entire source code(compiles it) into machine language at one time before the computer can run the program at a later time. While compiling the source code into machine code, it checks that the syntax is properly written by the programmer for the programmer to debug the program.
  • 15. How a Compiler works
  • 16. Interpreters The interpreters are programs that translates the high level program code one statement at a time, that is, it reads a code statement, converts it to one or more machine language instructions, and then executes the instruction before moving translating the next code statement in the program. If there is any error in the statement, the programmer can correct the error before the interpreter evaluates the next statement. Interpreters are slower than Compilers because interpreters convert a statement at a time and runs it before moving to the next line.
  • 18. High-level programming languages High level programming language is defined as one that is machine independent and uses variables and objects, Boolean expressions, functions, loops, arrays, threads, locks which are similar to their meaning (abstraction). High-level languages have evolved over the years and can be grouped into categories: Third Generation Languages (3GL), Fourth Generation Languages (4GL), Object Oriented Programming Languages (OOP), Fifth Generation Languages (5GL) and Scripting Languages
  • 19. High-level programming languages These languages are problem oriented, so they are machine independent. Since high-level languages reflect the logic and procedures used in a human algorithm, the programmer is able to concentrate on developing task algorithms rather than on how the computer will carry out the instructions. the programmer must still specify a complete set of detailed instructions. The words and grammar of high-level languages are English-like and this makes the programs more readable and easy to write.
  • 20. Characteristics A high-level language is governed by a strict syntax (set of grammatical rules). they are easier to read, write, and maintain. They also permit faster development of large programs. programs written in a high-level language must be translated into machine language by a compiler or interpreter. They are machine independent hence portable They are user friendly and easy to learn They are more flexible hence they enhance the creativity of the programmer, increasing productivity They are executed much slower than low-level programming languages
  • 21. Third generation languages The third generation is also called procedural language /3 GL. It consists of the use of a series of English-like words that humans can understand easily, to write instructions. Its also called High-Level Programming Language. For execution, a program in this language needs to be translated into machine language using Compiler/ Interpreter. Examples of this type of language are C, PASCAL, FORTRAN, COBOL, etc. Advantages of third generation programming language It is easy to develop, learn and understand the program. As the program written in these languages are less prone to errors they are easy to maintain. The program written in these languages can be developed in very less time as compared to the first and second generation language Same code can be copied to another machine & executed on that machine by using compiler-specific to that machine
  • 22. Third generation languages Disadvantages : 1. Compiler/ interpreter is needed. 2. Different compilers are needed for different machines.
  • 23. Fourth Generation languages The fourth-generation language is also called a non procedural language/ 4GL. It enables users to access the database. Examples: SQL, FoxPro, Focus, etc. The fourth generation programming languages were designed and developed to reduce the time, cost and effort needed to develop different types of software applications. These languages are also human-friendly to understand. Advantages : 1. Easy to understand & learn. 2. Less time required for application creation. 3. It is less prone to errors. Disadvantages : 1. Memory consumption is high. 2. Has poor control over Hardware. 3. Less flexible.
  • 24. Fifth generation languages The fifth-generation languages are also called 5GL. It is based on the concept of artificial intelligence. It uses the concept that that rather than solving a problem algorithmically, an application can be built to solve it based on some constraints, i.e., we make computers learn to solve any problem. Parallel Processing & superconductors are used for this type of language to make real artificial intelligence. Example: PROLOG, LISP, etc. Advantages : 1. Machines can make decisions. 2. Programmer effort reduces to solve a problem. 3. Easier than 3GL or 4GL to learn and use. Disadvantages : 1. Complex and long code. 2. More resources are required & they are expensive too.
  • 25. Major high level programming languages used FORTRAN (FORmula TRAnslator)developed in the late 1950s developed to design scientific applications COBOL (Common Business Oriented Language) developed in early 1960s to develop business applications. RPG (Report Program generator) was developed in early 1960s to assist in generating reports and complex calculations.
  • 26. Major high level programming languages used BASIC (Beginners All-purpose symbolic instruction code) developed in mid 1960 Basic versions include MS-BASIC, QBASIC, SmallBASIC and visual basic. Pascal was developed in the late 1960s for the purpose of teaching structured programming concepts C developed in the early 1970s to write system software Ada was developed in the late 1970s originally developed to meet the needs of embedded computer systems
  • 27. Major high level programming languages used C++ developed in the 1980s is an object-oriented language mainly to develop application software Note that in addition to the major languages discussed above, there are many other programming languages that have been developed such as JavaScript, and Python