SlideShare a Scribd company logo
1 of 20
Programming Language
(ECEg4182)
Lecture 01
Introduction to Programming
Languages
1
Outlin
e
►Definition of programming language
►Role of programming languages
►Why study programming languages
►Influences on language design
►Attributes of good programming language
2
3
What is a programming language?
 Programming Language – Definition:
A programming language is a set of rules that
provides a way of telling a computer what
operations to perform.
 A language that is intended for the expression of computer programs and that is
capable of expressing any computer program.
 A vocabulary and set of grammatical rules for instructing a computer to perform
specific tasks
Programming Languages
4
 Programming languages allow programmers to code software.
 The three major families of languages are:
 Machine languages
 Assembly languages
 High-Level languages
Machine Languages
5
 The “native” language of a computer.
 Comprised of 1s and 0s
 Difficult to program – one misplaced 1 or 0 will cause the program to fail.
111010101110
10100011110111
 Example of code:
1110100010101
10111010110100
Assembly Languages
6
 Assembly languages are a step towards easier programming.
 Assembly languages are comprised of a set of elemental commands which are tied
to a specific processor.
 Assembly language code needs to be translated to machine language before the
computer processes it.
 Example:
ADD R1,R2 ;1001011011010011
High-Level Languages
7
 High-level languages represent a giant leap towards easier programming.
 The syntax of HL languages is similar to English.
 High level language includes pascal, C, C++, FORTRAN, Java, Visual
Basic, and many more.
 One command in high-level language may translate to tens of machine
language instructions.
Compiling
8
 Regardless of the HL language , all HL programs need to be translated to
machine code so that the computer can process the program .
 Some programs are translated using a compiler.
 When programs are compiled, they are translated all at once.
 Compiled programs typically execute more quickly than interpreted
programs, but have a slower translation speed.
The compilation
process
9
Interpreting
10
 Some programs are translated using an interpreter. Such programs are translated
line-by-line instead of all at once (like compiled programs).
 Interpreted programs generally translate quicker than compiled programs, but
have a slower execution speed.
 Both interpreters and compilers are available for most high-level languages.
 However, BASIC and LISP were especially designed to be executed by an
interpreter
Interpreting
Pure interpretation
11
14
Hybrid Implementation Systems
 Some language implementation systems are a compromise between compilers and
pure interpreters; They translate high-level language programs to an intermediate
language designed to allow easy interpretation.
 This method is faster than pure interpretation because the source language
statements are decoded only once.
Hybrid Implementation Systems
Hybrid interpretation
13
3/24/201
Beyene University of
17
Role of Programming Languages
 Computers have been applied to different areas, from controlling nuclear
power plants to providing video games in mobile phones.
 Because of this great diversity in computer use, programming languages with
very different goals have been developed.
Scientific applications
• They have relatively simple data structures but require large numbers of
floating-point arithmetic computations.
• The most common data structures are arrays and matrices.
15
Role of Programming Languages
 Scientific applications…
• The first language for scientific applications was FORTRAN. ALGOL 60 and
most of its descendants were also intended for use in this area
BusinessApplications
The first successful high-level language for business was COBOL.
Business languages are characterized by facilities for producing elaborate
reports, precise ways of describing and storing decimal numbers and character
data, and the ability to specify decimal arithmetic operations.
16
20
Role of Programming Languages…
 Artificial Intelligence
 It is a broad area of computer applications characterized by the use of symbolic
rather than numeric computations.
 Symbolic computation means symbols, consisting of names rather than
numbers, are manipulated.
 Symbolic computation is more conveniently done with linked lists of data
rather than arrays.
for AI applications
 The first widely used programming language developed
was the functional language LISP.
 PROLOG is also used in this area.
 Some AI applications have been written in systems languages such as C.
21
Role of Programming Languages…
 Systems Programming
 The operating system and all of the programming support tools of a computer system are
collectively known as its systems software.
 Systems software is used almost continuously and so it must be efficient.
 The UNIX operating system is written almost entirely in C which has made it relatively easy
to port, or move, to different machines.
 Web Software:
 The World Wide Web is supported by an eclectic collection of languages, ranging from
markup languages, such as XHTML, which is not a programming language, to general-
purpose programming languages, such as Java.
Why study programming languages?
19
 To improve your ability to develop effective algorithms and to improve your use
of existing programming language.
 To increase your vocabulary of useful programming constructs.
 To allow a better choice of programming languages.
 To make it easier to learn a new language.
 To make it easier to design a new language.
Reading Assignment
20
 Influences on language design
 Attributes of good programming language

More Related Content

Similar to CH 01.pptx

Programming languages of computer
Programming languages of computerProgramming languages of computer
Programming languages of computerKeval Goyani
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Arslan Hussain
 
Computer languages and generation
Computer languages and generationComputer languages and generation
Computer languages and generationMunawar Bukhari
 
Computer languages
Computer languagesComputer languages
Computer languagesAtiq_Ahmed
 
English de lenguaje de programacion
English de lenguaje de programacionEnglish de lenguaje de programacion
English de lenguaje de programacionVillalba Griselda
 
Trend of Visual Programming Language
Trend of Visual Programming LanguageTrend of Visual Programming Language
Trend of Visual Programming LanguageTeddy Marcus
 
Computer programming
Computer programmingComputer programming
Computer programmingSuneel Dogra
 
Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Chao-Lung Yang
 
La5 ict-topic-5-programming
La5 ict-topic-5-programmingLa5 ict-topic-5-programming
La5 ict-topic-5-programmingAzmiah Mahmud
 
Computer programing 111 lecture 1
Computer programing 111 lecture 1 Computer programing 111 lecture 1
Computer programing 111 lecture 1 ITNet
 
Introduction Programming Languages
Introduction Programming LanguagesIntroduction Programming Languages
Introduction Programming LanguagesManish Kharotia
 
Introduction to Programming By Wathika F. Maina
Introduction to Programming By Wathika F. MainaIntroduction to Programming By Wathika F. Maina
Introduction to Programming By Wathika F. MainaNez Computex
 

Similar to CH 01.pptx (20)

Nota programming
Nota programmingNota programming
Nota programming
 
SYSTEM DEVELOPMENT
SYSTEM DEVELOPMENTSYSTEM DEVELOPMENT
SYSTEM DEVELOPMENT
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Notacd071
Notacd071Notacd071
Notacd071
 
Programming languages of computer
Programming languages of computerProgramming languages of computer
Programming languages of computer
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
 
Computer languages and generation
Computer languages and generationComputer languages and generation
Computer languages and generation
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Computer languages
Computer languagesComputer languages
Computer languages
 
English de lenguaje de programacion
English de lenguaje de programacionEnglish de lenguaje de programacion
English de lenguaje de programacion
 
Trend of Visual Programming Language
Trend of Visual Programming LanguageTrend of Visual Programming Language
Trend of Visual Programming Language
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)
 
Ict topic 5
Ict topic 5Ict topic 5
Ict topic 5
 
La5 ict-topic-5-programming
La5 ict-topic-5-programmingLa5 ict-topic-5-programming
La5 ict-topic-5-programming
 
Computer programing 111 lecture 1
Computer programing 111 lecture 1 Computer programing 111 lecture 1
Computer programing 111 lecture 1
 
Introduction Programming Languages
Introduction Programming LanguagesIntroduction Programming Languages
Introduction Programming Languages
 
Ayushi
AyushiAyushi
Ayushi
 
PROG0101_CH02.pptx
PROG0101_CH02.pptxPROG0101_CH02.pptx
PROG0101_CH02.pptx
 
Introduction to Programming By Wathika F. Maina
Introduction to Programming By Wathika F. MainaIntroduction to Programming By Wathika F. Maina
Introduction to Programming By Wathika F. Maina
 

More from Obsa2

CMHS DEPTOF NURSING SEMARA UNIVERSITY 2023
CMHS DEPTOF NURSING SEMARA UNIVERSITY 2023CMHS DEPTOF NURSING SEMARA UNIVERSITY 2023
CMHS DEPTOF NURSING SEMARA UNIVERSITY 2023Obsa2
 
5. Health Planning.pptx
5.  Health Planning.pptx5.  Health Planning.pptx
5. Health Planning.pptxObsa2
 
entrepreneurship
entrepreneurshipentrepreneurship
entrepreneurshipObsa2
 
Chapter five Aminots.ppt
Chapter five  Aminots.pptChapter five  Aminots.ppt
Chapter five Aminots.pptObsa2
 
urinalisis.pptx
urinalisis.pptxurinalisis.pptx
urinalisis.pptxObsa2
 
CH 4.pptx
CH 4.pptxCH 4.pptx
CH 4.pptxObsa2
 
OR-Chapter One (1).pdf
OR-Chapter One (1).pdfOR-Chapter One (1).pdf
OR-Chapter One (1).pdfObsa2
 
3. Unit-Three.ppt
3. Unit-Three.ppt3. Unit-Three.ppt
3. Unit-Three.pptObsa2
 
4. Unit- Four.pptx
4. Unit- Four.pptx4. Unit- Four.pptx
4. Unit- Four.pptxObsa2
 
6. Met of CHO.pptx
6. Met of CHO.pptx6. Met of CHO.pptx
6. Met of CHO.pptxObsa2
 
CHAPTER –THREE.pptx
CHAPTER –THREE.pptxCHAPTER –THREE.pptx
CHAPTER –THREE.pptxObsa2
 
Animal Feed and Nutrition (Ch3).pptx
Animal Feed and Nutrition (Ch3).pptxAnimal Feed and Nutrition (Ch3).pptx
Animal Feed and Nutrition (Ch3).pptxObsa2
 
Ecology_Chapt_4[1].pptx
Ecology_Chapt_4[1].pptxEcology_Chapt_4[1].pptx
Ecology_Chapt_4[1].pptxObsa2
 
Ecology_Chapt_5[1].pptx
Ecology_Chapt_5[1].pptxEcology_Chapt_5[1].pptx
Ecology_Chapt_5[1].pptxObsa2
 
2.Chapter Two.pptx
2.Chapter Two.pptx2.Chapter Two.pptx
2.Chapter Two.pptxObsa2
 
1.Chapter one .pptx
1.Chapter one .pptx1.Chapter one .pptx
1.Chapter one .pptxObsa2
 
SENSE_ORGANS_physiology[1].pptx
SENSE_ORGANS_physiology[1].pptxSENSE_ORGANS_physiology[1].pptx
SENSE_ORGANS_physiology[1].pptxObsa2
 
biochemist 5.pptx
biochemist 5.pptxbiochemist 5.pptx
biochemist 5.pptxObsa2
 
bioch 4.pptx
bioch 4.pptxbioch 4.pptx
bioch 4.pptxObsa2
 
Introduction to ECOLOGY.ppt
Introduction to ECOLOGY.pptIntroduction to ECOLOGY.ppt
Introduction to ECOLOGY.pptObsa2
 

More from Obsa2 (20)

CMHS DEPTOF NURSING SEMARA UNIVERSITY 2023
CMHS DEPTOF NURSING SEMARA UNIVERSITY 2023CMHS DEPTOF NURSING SEMARA UNIVERSITY 2023
CMHS DEPTOF NURSING SEMARA UNIVERSITY 2023
 
5. Health Planning.pptx
5.  Health Planning.pptx5.  Health Planning.pptx
5. Health Planning.pptx
 
entrepreneurship
entrepreneurshipentrepreneurship
entrepreneurship
 
Chapter five Aminots.ppt
Chapter five  Aminots.pptChapter five  Aminots.ppt
Chapter five Aminots.ppt
 
urinalisis.pptx
urinalisis.pptxurinalisis.pptx
urinalisis.pptx
 
CH 4.pptx
CH 4.pptxCH 4.pptx
CH 4.pptx
 
OR-Chapter One (1).pdf
OR-Chapter One (1).pdfOR-Chapter One (1).pdf
OR-Chapter One (1).pdf
 
3. Unit-Three.ppt
3. Unit-Three.ppt3. Unit-Three.ppt
3. Unit-Three.ppt
 
4. Unit- Four.pptx
4. Unit- Four.pptx4. Unit- Four.pptx
4. Unit- Four.pptx
 
6. Met of CHO.pptx
6. Met of CHO.pptx6. Met of CHO.pptx
6. Met of CHO.pptx
 
CHAPTER –THREE.pptx
CHAPTER –THREE.pptxCHAPTER –THREE.pptx
CHAPTER –THREE.pptx
 
Animal Feed and Nutrition (Ch3).pptx
Animal Feed and Nutrition (Ch3).pptxAnimal Feed and Nutrition (Ch3).pptx
Animal Feed and Nutrition (Ch3).pptx
 
Ecology_Chapt_4[1].pptx
Ecology_Chapt_4[1].pptxEcology_Chapt_4[1].pptx
Ecology_Chapt_4[1].pptx
 
Ecology_Chapt_5[1].pptx
Ecology_Chapt_5[1].pptxEcology_Chapt_5[1].pptx
Ecology_Chapt_5[1].pptx
 
2.Chapter Two.pptx
2.Chapter Two.pptx2.Chapter Two.pptx
2.Chapter Two.pptx
 
1.Chapter one .pptx
1.Chapter one .pptx1.Chapter one .pptx
1.Chapter one .pptx
 
SENSE_ORGANS_physiology[1].pptx
SENSE_ORGANS_physiology[1].pptxSENSE_ORGANS_physiology[1].pptx
SENSE_ORGANS_physiology[1].pptx
 
biochemist 5.pptx
biochemist 5.pptxbiochemist 5.pptx
biochemist 5.pptx
 
bioch 4.pptx
bioch 4.pptxbioch 4.pptx
bioch 4.pptx
 
Introduction to ECOLOGY.ppt
Introduction to ECOLOGY.pptIntroduction to ECOLOGY.ppt
Introduction to ECOLOGY.ppt
 

Recently uploaded

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 

CH 01.pptx

  • 2. Outlin e ►Definition of programming language ►Role of programming languages ►Why study programming languages ►Influences on language design ►Attributes of good programming language 2
  • 3. 3 What is a programming language?  Programming Language – Definition: A programming language is a set of rules that provides a way of telling a computer what operations to perform.  A language that is intended for the expression of computer programs and that is capable of expressing any computer program.  A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks
  • 4. Programming Languages 4  Programming languages allow programmers to code software.  The three major families of languages are:  Machine languages  Assembly languages  High-Level languages
  • 5. Machine Languages 5  The “native” language of a computer.  Comprised of 1s and 0s  Difficult to program – one misplaced 1 or 0 will cause the program to fail. 111010101110 10100011110111  Example of code: 1110100010101 10111010110100
  • 6. Assembly Languages 6  Assembly languages are a step towards easier programming.  Assembly languages are comprised of a set of elemental commands which are tied to a specific processor.  Assembly language code needs to be translated to machine language before the computer processes it.  Example: ADD R1,R2 ;1001011011010011
  • 7. High-Level Languages 7  High-level languages represent a giant leap towards easier programming.  The syntax of HL languages is similar to English.  High level language includes pascal, C, C++, FORTRAN, Java, Visual Basic, and many more.  One command in high-level language may translate to tens of machine language instructions.
  • 8. Compiling 8  Regardless of the HL language , all HL programs need to be translated to machine code so that the computer can process the program .  Some programs are translated using a compiler.  When programs are compiled, they are translated all at once.  Compiled programs typically execute more quickly than interpreted programs, but have a slower translation speed.
  • 10. Interpreting 10  Some programs are translated using an interpreter. Such programs are translated line-by-line instead of all at once (like compiled programs).  Interpreted programs generally translate quicker than compiled programs, but have a slower execution speed.  Both interpreters and compilers are available for most high-level languages.  However, BASIC and LISP were especially designed to be executed by an interpreter
  • 12. 14 Hybrid Implementation Systems  Some language implementation systems are a compromise between compilers and pure interpreters; They translate high-level language programs to an intermediate language designed to allow easy interpretation.  This method is faster than pure interpretation because the source language statements are decoded only once.
  • 15. Role of Programming Languages  Computers have been applied to different areas, from controlling nuclear power plants to providing video games in mobile phones.  Because of this great diversity in computer use, programming languages with very different goals have been developed. Scientific applications • They have relatively simple data structures but require large numbers of floating-point arithmetic computations. • The most common data structures are arrays and matrices. 15
  • 16. Role of Programming Languages  Scientific applications… • The first language for scientific applications was FORTRAN. ALGOL 60 and most of its descendants were also intended for use in this area BusinessApplications The first successful high-level language for business was COBOL. Business languages are characterized by facilities for producing elaborate reports, precise ways of describing and storing decimal numbers and character data, and the ability to specify decimal arithmetic operations. 16
  • 17. 20 Role of Programming Languages…  Artificial Intelligence  It is a broad area of computer applications characterized by the use of symbolic rather than numeric computations.  Symbolic computation means symbols, consisting of names rather than numbers, are manipulated.  Symbolic computation is more conveniently done with linked lists of data rather than arrays. for AI applications  The first widely used programming language developed was the functional language LISP.  PROLOG is also used in this area.  Some AI applications have been written in systems languages such as C.
  • 18. 21 Role of Programming Languages…  Systems Programming  The operating system and all of the programming support tools of a computer system are collectively known as its systems software.  Systems software is used almost continuously and so it must be efficient.  The UNIX operating system is written almost entirely in C which has made it relatively easy to port, or move, to different machines.  Web Software:  The World Wide Web is supported by an eclectic collection of languages, ranging from markup languages, such as XHTML, which is not a programming language, to general- purpose programming languages, such as Java.
  • 19. Why study programming languages? 19  To improve your ability to develop effective algorithms and to improve your use of existing programming language.  To increase your vocabulary of useful programming constructs.  To allow a better choice of programming languages.  To make it easier to learn a new language.  To make it easier to design a new language.
  • 20. Reading Assignment 20  Influences on language design  Attributes of good programming language