SlideShare une entreprise Scribd logo
1  sur  3
Télécharger pour lire hors ligne
Intro to Programming Languages Intro to Programming
MUHAMMAD HAMMAD WASEEM 1
What Is Programming:
As this course is titled “Introduction to Programming”, therefore it is most essential and
appropriate to understand what programming really means and what its basic fundamentals are. Let us
first see a widely known definition of programming.
"A program is a precise sequence of steps to solve a particular problem.”
It means that when we say that we have a program, it actually mean that we know about a
complete set activities to be performed in a particular order. The purpose of these activities is to solve a
given problem.
Why Programming Is Important:
Learning to programming is important because it develops analytical and problem solving
abilities. It is a creative activity and provides us a mean to express abstract ideas. Thus programming is
fun and is much more than a vocational skill. By designing programs, we learn many skills that are
important for all professions. These skills can be summarized as:
 Critical reading
 Analytical thinking
 Creative synthesis
Programming Languages:
A set of words and symbols used to write programs is called Programming Language.
Programmers write instructions in various programming languages, some directly understandable by
computers and others requiring intermediate translation steps. A programming language is a mean of
communication between a user and computer. Hundreds of computer languages are in use today. There
are two major types of programming languages. These are
 Low Level Languages
 High Level Languages.
Low Level Languages
Low-level languages are near to computer hardware and far from human languages. Low Level
languages are further divided into: Machine languages & Assembly languages
Machine language
 Any computer can directly understand only its own language (Machine Language). Machine
language is the "natural/native language" of a computer and as such is defined by its hardware
design.
 Machine languages generally consist of strings of numbers (ultimately reduced to 1s and 0s) that
instruct computers to perform their most elementary operations one at a time.
• E.g. a program instruction may look like this: 1011000111101
 Machine languages are machine dependent.
[Note: Machine language is often referred to as object code. This term predates "object-oriented programming."]
Advantage
 Machine language run very fast because no translation program is required for the CPU.
Intro to Programming Languages Intro to Programming
MUHAMMAD HAMMAD WASEEM 2
Disadvantages
 It is very difficult to program in machine language. The programmer has to know details of
hardware to write program.
 Programmer has to remember a lot of codes to write a program which results in program errors.
 It is difficult to debug the program.
Assembly languages
 Machine-language programming was simply too slow, boring and error-prone for most
programmers.
 Instead of using the strings of numbers that computers could directly understand, programmers
began using English-like abbreviations to represent elementary operations.
 These abbreviations formed the basis of assembly languages and called mnemonics (Pronounced
as: Ne-Monics).
 Translator programs called assemblers were developed to convert early assembly-language
programs to machine language at computer speeds.
o The following section of an assembly-language program adds overtime pay to base pay
and stores the result in gross pay:
 load basepay
 add overpay
 store grosspay
 Although such code is clearer to humans, it is incomprehensible to computers until translated to
machine language.
 Mostly used to write system software.
Advantages:
 The symbolic programming of Assembly Language is easier to understand and saves a lot of time
and effort of the programmer.
 It is easier to correct errors and modify program instructions.
 Assembly Language has the same efficiency of execution as the machine level language. Because
this is one-to-one translator between assembly language program and its corresponding machine
language program.
Disadvantages:
 One of the major disadvantages is that assembly language is machine dependent. A program
written for one computer might not run in other computers with different hardware
configuration.
High-level languages
 Computer usage increased rapidly with the advent of assembly languages, but programmers still
had to use many instructions to accomplish even the simplest tasks.
 To speed the programming process, high-level languages were developed in which single
statements could be written to accomplish substantial tasks.
 Translator programs called compilers convert HLL programs into machine language.
 High-level languages allow programmers to write instructions that look almost like every day
English and contain commonly used mathematical notations.
 A payroll program written in a high-level language might contain a statement such as:
Intro to Programming Languages Intro to Programming
MUHAMMAD HAMMAD WASEEM 3
o grossPay = basePay + overTimePay;
Advantages of High Level Languages
 Higher level languages have a major advantage over machine and assembly languages that higher
level languages are easy to learn and use. It is because that they are similar to the languages
used by us in our day to day life.
 Easy error detection.
 Machine independence
 Deep hardware knowledge not required.
Concept of Source and Object Code:
Source Code:
A program written in a high level language is called source code. It is also called source program.
It cannot be executed by computer directly, it is converted into object code and then executed.
Object Code:
A program in machine language is called object code. It is also called object program or machine
code. Computer understands object code directly.
Concept of Language Translators:
Computer understand only machine language. A program written in high level or assembly language
cannot be run on a computer directly. It must be converted into machine language before execution.
Language processor or translator is a type of system software that converts these programs into
machine language. Every computer language has its own translators.
Types of translators:
Assembler:
An assembler is a translating program that translates the instruction of assembly language into
machine language.
Interpreter:
It is a program that converts one statement of a program into machine at one time. It executes a
statement before translating the next statement of source program. If there is an error in the
statements, interpreter stops working and displays an errors message.
The advantage of interpreters over compiler is that an error is found immediately. So the
programmer can correct errors during program development.
The disadvantage of interpreter is that it is not very efficient. The interpreter does not produce an
object program. It must convert the program each time it is executed.
Compiler:
A compiler is a program that converts the instruction of a high level language (source) program
into machine language (object program) as a whole. The object program can be executed many times.
The compiler checks each statement in the source program and generates machine instructions.
Compiler also checks syntax errors in program. A source program containing an error cannot be
compiled. A compiler can translate the programs of only those languages for which it is written.

Contenu connexe

Tendances

Translators(compiler assembler interpretor).
Translators(compiler assembler interpretor).Translators(compiler assembler interpretor).
Translators(compiler assembler interpretor).JayminSuhagiya
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programmingNeeru Mittal
 
C programming introduction
C programming introductionC programming introduction
C programming introductionDucat
 
Language translator
Language translatorLanguage translator
Language translatorasmakh89
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer ProgrammingProf. Erwin Globio
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program Leela Koneru
 
Introduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem AnsariIntroduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem AnsariTech
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming ConceptsJussi Pohjolainen
 
presentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C languagepresentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C languageGautamGupta136
 
Computer languages
Computer languagesComputer languages
Computer languagesPrince Arsal
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Md Hossen
 

Tendances (20)

Translators(compiler assembler interpretor).
Translators(compiler assembler interpretor).Translators(compiler assembler interpretor).
Translators(compiler assembler interpretor).
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
C programming introduction
C programming introductionC programming introduction
C programming introduction
 
10 lesson6
10 lesson610 lesson6
10 lesson6
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Assembler
AssemblerAssembler
Assembler
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Language translator
Language translatorLanguage translator
Language translator
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
 
10 lesson7
10 lesson710 lesson7
10 lesson7
 
How to execute a C program
How to execute a C  program How to execute a C  program
How to execute a C program
 
Programming
ProgrammingProgramming
Programming
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Introduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem AnsariIntroduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem Ansari
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
 
presentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C languagepresentation on the topic: Introduction to the C language
presentation on the topic: Introduction to the C language
 
Computer languages
Computer languagesComputer languages
Computer languages
 
10 lesson8
10 lesson810 lesson8
10 lesson8
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
 

Similaire à Intro Programming Languages

Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Arslan Hussain
 
Programming Languages
Programming LanguagesProgramming Languages
Programming LanguagesMohamed Omar
 
Computer programming
Computer programmingComputer programming
Computer programmingSuneel Dogra
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Sehrish Rafiq
 
Program, Programming and Programming Language.pptx
Program, Programming and Programming Language.pptxProgram, Programming and Programming Language.pptx
Program, Programming and Programming Language.pptxHariharPaudel1
 
programming languages
programming languagesprogramming languages
programming languagesRajendran
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)Suneel Dogra
 
Compiler design slide share
Compiler design slide shareCompiler design slide share
Compiler design slide shareSudhaa Ravi
 
4programming-languages.ppt
4programming-languages.ppt4programming-languages.ppt
4programming-languages.pptNeetuJindal9
 
FIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer LanguagesFIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer Languagesraksharao
 
Programming languages of computer
Programming languages of computerProgramming languages of computer
Programming languages of computerKeval Goyani
 
Abstraction level taxonomy of programming language frameworks
Abstraction level taxonomy of programming language frameworksAbstraction level taxonomy of programming language frameworks
Abstraction level taxonomy of programming language frameworksijpla
 
Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdfRakibRahman19
 

Similaire à Intro Programming Languages (20)

Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
 
Ppt 1
Ppt 1Ppt 1
Ppt 1
 
Programming Languages
Programming LanguagesProgramming Languages
Programming Languages
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12
 
Program, Programming and Programming Language.pptx
Program, Programming and Programming Language.pptxProgram, Programming and Programming Language.pptx
Program, Programming and Programming Language.pptx
 
Computer language
Computer languageComputer language
Computer language
 
programming languages
programming languagesprogramming languages
programming languages
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)
 
Compiler design slide share
Compiler design slide shareCompiler design slide share
Compiler design slide share
 
4programming-languages.ppt
4programming-languages.ppt4programming-languages.ppt
4programming-languages.ppt
 
FIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer LanguagesFIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer Languages
 
Programming languages of computer
Programming languages of computerProgramming languages of computer
Programming languages of computer
 
Abstraction level taxonomy of programming language frameworks
Abstraction level taxonomy of programming language frameworksAbstraction level taxonomy of programming language frameworks
Abstraction level taxonomy of programming language frameworks
 
C_NOTES.pdf
C_NOTES.pdfC_NOTES.pdf
C_NOTES.pdf
 
Languages in computer
Languages in computerLanguages in computer
Languages in computer
 
Chapter 2.pptx
Chapter 2.pptxChapter 2.pptx
Chapter 2.pptx
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdf
 
SYSTEM DEVELOPMENT
SYSTEM DEVELOPMENTSYSTEM DEVELOPMENT
SYSTEM DEVELOPMENT
 

Plus de Muhammad Hammad Waseem

[ITP - Lecture 16] Structures in C/C++
[ITP - Lecture 16] Structures in C/C++[ITP - Lecture 16] Structures in C/C++
[ITP - Lecture 16] Structures in C/C++Muhammad Hammad Waseem
 
[ITP - Lecture 13] Introduction to Pointers
[ITP - Lecture 13] Introduction to Pointers[ITP - Lecture 13] Introduction to Pointers
[ITP - Lecture 13] Introduction to PointersMuhammad Hammad Waseem
 
[ITP - Lecture 10] Switch Statement, Break and Continue Statement in C/C++
[ITP - Lecture 10] Switch Statement, Break and Continue Statement in C/C++[ITP - Lecture 10] Switch Statement, Break and Continue Statement in C/C++
[ITP - Lecture 10] Switch Statement, Break and Continue Statement in C/C++Muhammad Hammad Waseem
 
[ITP - Lecture 09] Conditional Operator in C/C++
[ITP - Lecture 09] Conditional Operator in C/C++[ITP - Lecture 09] Conditional Operator in C/C++
[ITP - Lecture 09] Conditional Operator in C/C++Muhammad Hammad Waseem
 
[ITP - Lecture 08] Decision Control Structures (If Statement)
[ITP - Lecture 08] Decision Control Structures (If Statement)[ITP - Lecture 08] Decision Control Structures (If Statement)
[ITP - Lecture 08] Decision Control Structures (If Statement)Muhammad Hammad Waseem
 
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of PrecedenceMuhammad Hammad Waseem
 
[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++Muhammad Hammad Waseem
 
[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member Functions[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member FunctionsMuhammad Hammad Waseem
 
[OOP - Lec 16,17] Objects as Function Parameter and ReturnType
[OOP - Lec 16,17] Objects as Function Parameter and ReturnType[OOP - Lec 16,17] Objects as Function Parameter and ReturnType
[OOP - Lec 16,17] Objects as Function Parameter and ReturnTypeMuhammad Hammad Waseem
 
[OOP - Lec 13,14,15] Constructors / Destructor and its Types
[OOP - Lec 13,14,15] Constructors / Destructor and its Types[OOP - Lec 13,14,15] Constructors / Destructor and its Types
[OOP - Lec 13,14,15] Constructors / Destructor and its TypesMuhammad Hammad Waseem
 
[OOP - Lec 09,10,11] Class Members & their Accessing
[OOP - Lec 09,10,11] Class Members & their Accessing[OOP - Lec 09,10,11] Class Members & their Accessing
[OOP - Lec 09,10,11] Class Members & their AccessingMuhammad Hammad Waseem
 

Plus de Muhammad Hammad Waseem (20)

[ITP - Lecture 17] Strings in C/C++
[ITP - Lecture 17] Strings in C/C++[ITP - Lecture 17] Strings in C/C++
[ITP - Lecture 17] Strings in C/C++
 
[ITP - Lecture 16] Structures in C/C++
[ITP - Lecture 16] Structures in C/C++[ITP - Lecture 16] Structures in C/C++
[ITP - Lecture 16] Structures in C/C++
 
[ITP - Lecture 15] Arrays & its Types
[ITP - Lecture 15] Arrays & its Types[ITP - Lecture 15] Arrays & its Types
[ITP - Lecture 15] Arrays & its Types
 
[ITP - Lecture 14] Recursion
[ITP - Lecture 14] Recursion[ITP - Lecture 14] Recursion
[ITP - Lecture 14] Recursion
 
[ITP - Lecture 13] Introduction to Pointers
[ITP - Lecture 13] Introduction to Pointers[ITP - Lecture 13] Introduction to Pointers
[ITP - Lecture 13] Introduction to Pointers
 
[ITP - Lecture 12] Functions in C/C++
[ITP - Lecture 12] Functions in C/C++[ITP - Lecture 12] Functions in C/C++
[ITP - Lecture 12] Functions in C/C++
 
[ITP - Lecture 11] Loops in C/C++
[ITP - Lecture 11] Loops in C/C++[ITP - Lecture 11] Loops in C/C++
[ITP - Lecture 11] Loops in C/C++
 
[ITP - Lecture 10] Switch Statement, Break and Continue Statement in C/C++
[ITP - Lecture 10] Switch Statement, Break and Continue Statement in C/C++[ITP - Lecture 10] Switch Statement, Break and Continue Statement in C/C++
[ITP - Lecture 10] Switch Statement, Break and Continue Statement in C/C++
 
[ITP - Lecture 09] Conditional Operator in C/C++
[ITP - Lecture 09] Conditional Operator in C/C++[ITP - Lecture 09] Conditional Operator in C/C++
[ITP - Lecture 09] Conditional Operator in C/C++
 
[ITP - Lecture 08] Decision Control Structures (If Statement)
[ITP - Lecture 08] Decision Control Structures (If Statement)[ITP - Lecture 08] Decision Control Structures (If Statement)
[ITP - Lecture 08] Decision Control Structures (If Statement)
 
[ITP - Lecture 07] Comments in C/C++
[ITP - Lecture 07] Comments in C/C++[ITP - Lecture 07] Comments in C/C++
[ITP - Lecture 07] Comments in C/C++
 
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
[ITP - Lecture 06] Operators, Arithmetic Expression and Order of Precedence
 
[ITP - Lecture 05] Datatypes
[ITP - Lecture 05] Datatypes[ITP - Lecture 05] Datatypes
[ITP - Lecture 05] Datatypes
 
[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++[ITP - Lecture 04] Variables and Constants in C/C++
[ITP - Lecture 04] Variables and Constants in C/C++
 
[OOP - Lec 20,21] Inheritance
[OOP - Lec 20,21] Inheritance[OOP - Lec 20,21] Inheritance
[OOP - Lec 20,21] Inheritance
 
[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member Functions[OOP - Lec 19] Static Member Functions
[OOP - Lec 19] Static Member Functions
 
[OOP - Lec 18] Static Data Member
[OOP - Lec 18] Static Data Member[OOP - Lec 18] Static Data Member
[OOP - Lec 18] Static Data Member
 
[OOP - Lec 16,17] Objects as Function Parameter and ReturnType
[OOP - Lec 16,17] Objects as Function Parameter and ReturnType[OOP - Lec 16,17] Objects as Function Parameter and ReturnType
[OOP - Lec 16,17] Objects as Function Parameter and ReturnType
 
[OOP - Lec 13,14,15] Constructors / Destructor and its Types
[OOP - Lec 13,14,15] Constructors / Destructor and its Types[OOP - Lec 13,14,15] Constructors / Destructor and its Types
[OOP - Lec 13,14,15] Constructors / Destructor and its Types
 
[OOP - Lec 09,10,11] Class Members & their Accessing
[OOP - Lec 09,10,11] Class Members & their Accessing[OOP - Lec 09,10,11] Class Members & their Accessing
[OOP - Lec 09,10,11] Class Members & their Accessing
 

Dernier

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Dernier (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 

Intro Programming Languages

  • 1. Intro to Programming Languages Intro to Programming MUHAMMAD HAMMAD WASEEM 1 What Is Programming: As this course is titled “Introduction to Programming”, therefore it is most essential and appropriate to understand what programming really means and what its basic fundamentals are. Let us first see a widely known definition of programming. "A program is a precise sequence of steps to solve a particular problem.” It means that when we say that we have a program, it actually mean that we know about a complete set activities to be performed in a particular order. The purpose of these activities is to solve a given problem. Why Programming Is Important: Learning to programming is important because it develops analytical and problem solving abilities. It is a creative activity and provides us a mean to express abstract ideas. Thus programming is fun and is much more than a vocational skill. By designing programs, we learn many skills that are important for all professions. These skills can be summarized as:  Critical reading  Analytical thinking  Creative synthesis Programming Languages: A set of words and symbols used to write programs is called Programming Language. Programmers write instructions in various programming languages, some directly understandable by computers and others requiring intermediate translation steps. A programming language is a mean of communication between a user and computer. Hundreds of computer languages are in use today. There are two major types of programming languages. These are  Low Level Languages  High Level Languages. Low Level Languages Low-level languages are near to computer hardware and far from human languages. Low Level languages are further divided into: Machine languages & Assembly languages Machine language  Any computer can directly understand only its own language (Machine Language). Machine language is the "natural/native language" of a computer and as such is defined by its hardware design.  Machine languages generally consist of strings of numbers (ultimately reduced to 1s and 0s) that instruct computers to perform their most elementary operations one at a time. • E.g. a program instruction may look like this: 1011000111101  Machine languages are machine dependent. [Note: Machine language is often referred to as object code. This term predates "object-oriented programming."] Advantage  Machine language run very fast because no translation program is required for the CPU.
  • 2. Intro to Programming Languages Intro to Programming MUHAMMAD HAMMAD WASEEM 2 Disadvantages  It is very difficult to program in machine language. The programmer has to know details of hardware to write program.  Programmer has to remember a lot of codes to write a program which results in program errors.  It is difficult to debug the program. Assembly languages  Machine-language programming was simply too slow, boring and error-prone for most programmers.  Instead of using the strings of numbers that computers could directly understand, programmers began using English-like abbreviations to represent elementary operations.  These abbreviations formed the basis of assembly languages and called mnemonics (Pronounced as: Ne-Monics).  Translator programs called assemblers were developed to convert early assembly-language programs to machine language at computer speeds. o The following section of an assembly-language program adds overtime pay to base pay and stores the result in gross pay:  load basepay  add overpay  store grosspay  Although such code is clearer to humans, it is incomprehensible to computers until translated to machine language.  Mostly used to write system software. Advantages:  The symbolic programming of Assembly Language is easier to understand and saves a lot of time and effort of the programmer.  It is easier to correct errors and modify program instructions.  Assembly Language has the same efficiency of execution as the machine level language. Because this is one-to-one translator between assembly language program and its corresponding machine language program. Disadvantages:  One of the major disadvantages is that assembly language is machine dependent. A program written for one computer might not run in other computers with different hardware configuration. High-level languages  Computer usage increased rapidly with the advent of assembly languages, but programmers still had to use many instructions to accomplish even the simplest tasks.  To speed the programming process, high-level languages were developed in which single statements could be written to accomplish substantial tasks.  Translator programs called compilers convert HLL programs into machine language.  High-level languages allow programmers to write instructions that look almost like every day English and contain commonly used mathematical notations.  A payroll program written in a high-level language might contain a statement such as:
  • 3. Intro to Programming Languages Intro to Programming MUHAMMAD HAMMAD WASEEM 3 o grossPay = basePay + overTimePay; Advantages of High Level Languages  Higher level languages have a major advantage over machine and assembly languages that higher level languages are easy to learn and use. It is because that they are similar to the languages used by us in our day to day life.  Easy error detection.  Machine independence  Deep hardware knowledge not required. Concept of Source and Object Code: Source Code: A program written in a high level language is called source code. It is also called source program. It cannot be executed by computer directly, it is converted into object code and then executed. Object Code: A program in machine language is called object code. It is also called object program or machine code. Computer understands object code directly. Concept of Language Translators: Computer understand only machine language. A program written in high level or assembly language cannot be run on a computer directly. It must be converted into machine language before execution. Language processor or translator is a type of system software that converts these programs into machine language. Every computer language has its own translators. Types of translators: Assembler: An assembler is a translating program that translates the instruction of assembly language into machine language. Interpreter: It is a program that converts one statement of a program into machine at one time. It executes a statement before translating the next statement of source program. If there is an error in the statements, interpreter stops working and displays an errors message. The advantage of interpreters over compiler is that an error is found immediately. So the programmer can correct errors during program development. The disadvantage of interpreter is that it is not very efficient. The interpreter does not produce an object program. It must convert the program each time it is executed. Compiler: A compiler is a program that converts the instruction of a high level language (source) program into machine language (object program) as a whole. The object program can be executed many times. The compiler checks each statement in the source program and generates machine instructions. Compiler also checks syntax errors in program. A source program containing an error cannot be compiled. A compiler can translate the programs of only those languages for which it is written.