SlideShare a Scribd company logo
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.

More Related Content

What's hot (20)

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 programming
Neeru Mittal
 
C programming introduction
C programming introductionC programming introduction
C programming introduction
Ducat
 
10 lesson6
10 lesson610 lesson6
10 lesson6
Mary Grace Uminga
 
Computer programming
Computer programmingComputer programming
Computer programming
Vincent Valenzuela
 
Assembler
AssemblerAssembler
Assembler
Suneel Dogra
 
Programming in c
Programming in cProgramming in c
Programming in c
vishnu973656
 
Language translator
Language translatorLanguage translator
Language translator
asmakh89
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Prof. Erwin Globio
 
10 lesson7
10 lesson710 lesson7
10 lesson7
Mary Grace Uminga
 
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
 
Programming
ProgrammingProgramming
Programming
Leo Simon Anfone
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
Anandhasilambarasan D
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
Hajar Len
 
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
Tech
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
Jussi 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 language
GautamGupta136
 
Computer languages
Computer languagesComputer languages
Computer languages
Prince Arsal
 
10 lesson8
10 lesson810 lesson8
10 lesson8
Mary Grace Uminga
 
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
 
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 programming
Neeru Mittal
 
C programming introduction
C programming introductionC programming introduction
C programming introduction
Ducat
 
Language translator
Language translatorLanguage translator
Language translator
asmakh89
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Prof. 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 Ansari
Tech
 
Intro To Programming Concepts
Intro To Programming ConceptsIntro To Programming Concepts
Intro To Programming Concepts
Jussi 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 language
GautamGupta136
 
Computer languages
Computer languagesComputer languages
Computer languages
Prince 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
 

Similar to [ITP - Lecture 01] Introduction to Programming & Different Programming Languages (20)

Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
Arslan Hussain
 
Lesson 2.pptx
Lesson 2.pptxLesson 2.pptx
Lesson 2.pptx
AlinaMishra7
 
Introduction to Computer Programming
Introduction to Computer ProgrammingIntroduction to Computer Programming
Introduction to Computer Programming
Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12
Sehrish Rafiq
 
Programming languages.pptx
Programming languages.pptxProgramming languages.pptx
Programming languages.pptx
Christ Association
 
Define Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out CDefine Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out C
Dr Shailendra Bhalawe
 
Languages in computer
Languages in computerLanguages in computer
Languages in computer
The University of Lahore
 
Computer language
Computer languageComputer language
Computer language
WASEEM ARSLAN
 
PPL_Unit01 for the insem study first year.pptx
PPL_Unit01 for the insem study first year.pptxPPL_Unit01 for the insem study first year.pptx
PPL_Unit01 for the insem study first year.pptx
rockstarr066gj
 
INTRO. TO PROG.pptx
INTRO. TO PROG.pptxINTRO. TO PROG.pptx
INTRO. TO PROG.pptx
Samuel Quame
 
Language processors
Language processorsLanguage processors
Language processors
Dr. B T Sampath Kumar
 
C++ programming languages lectures
C++ programming languages lectures C++ programming languages lectures
C++ programming languages lectures
jabirMemon
 
Computer-charecteristics,types of languages,translators
Computer-charecteristics,types of languages,translatorsComputer-charecteristics,types of languages,translators
Computer-charecteristics,types of languages,translators
VarshaSivashanker
 
Language translators Of Programming in Computer science
Language translators Of Programming in Computer scienceLanguage translators Of Programming in Computer science
Language translators Of Programming in Computer science
RaianaTabitha
 
NEP.pptx
NEP.pptxNEP.pptx
NEP.pptx
SunnukhazisSunnu
 
1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptx
Vishwas459764
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwares
Nisarg Amin
 
Introduction to computer programming
Introduction to computer programming Introduction to computer programming
Introduction to computer programming
VanessaBuensalida
 
sege.pdf
sege.pdfsege.pdf
sege.pdf
SegezzBrian
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
PmarkNorcio
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
Arslan Hussain
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12
Sehrish Rafiq
 
Define Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out CDefine Computer language, Translator, Standard input out C
Define Computer language, Translator, Standard input out C
Dr Shailendra Bhalawe
 
PPL_Unit01 for the insem study first year.pptx
PPL_Unit01 for the insem study first year.pptxPPL_Unit01 for the insem study first year.pptx
PPL_Unit01 for the insem study first year.pptx
rockstarr066gj
 
INTRO. TO PROG.pptx
INTRO. TO PROG.pptxINTRO. TO PROG.pptx
INTRO. TO PROG.pptx
Samuel Quame
 
C++ programming languages lectures
C++ programming languages lectures C++ programming languages lectures
C++ programming languages lectures
jabirMemon
 
Computer-charecteristics,types of languages,translators
Computer-charecteristics,types of languages,translatorsComputer-charecteristics,types of languages,translators
Computer-charecteristics,types of languages,translators
VarshaSivashanker
 
Language translators Of Programming in Computer science
Language translators Of Programming in Computer scienceLanguage translators Of Programming in Computer science
Language translators Of Programming in Computer science
RaianaTabitha
 
1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptx
Vishwas459764
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwares
Nisarg Amin
 
Introduction to computer programming
Introduction to computer programming Introduction to computer programming
Introduction to computer programming
VanessaBuensalida
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
PmarkNorcio
 
Ad

More from 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++
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 15] Arrays & its Types
[ITP - Lecture 15] Arrays & its Types[ITP - Lecture 15] Arrays & its Types
[ITP - Lecture 15] Arrays & its Types
Muhammad Hammad Waseem
 
[ITP - Lecture 14] Recursion
[ITP - Lecture 14] Recursion[ITP - Lecture 14] Recursion
[ITP - Lecture 14] Recursion
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 Pointers
Muhammad Hammad Waseem
 
[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++
Muhammad Hammad Waseem
 
[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++
Muhammad 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 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++
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 Precedence
Muhammad Hammad Waseem
 
[ITP - Lecture 05] Datatypes
[ITP - Lecture 05] Datatypes[ITP - Lecture 05] Datatypes
[ITP - Lecture 05] Datatypes
Muhammad 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 20,21] Inheritance
[OOP - Lec 20,21] Inheritance[OOP - Lec 20,21] Inheritance
[OOP - Lec 20,21] Inheritance
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 Functions
Muhammad Hammad Waseem
 
[OOP - Lec 18] Static Data Member
[OOP - Lec 18] Static Data Member[OOP - Lec 18] Static Data Member
[OOP - Lec 18] Static Data Member
Muhammad 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 ReturnType
Muhammad 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 Types
Muhammad 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 Accessing
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 Pointers
Muhammad 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 Precedence
Muhammad 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 Functions
Muhammad 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 ReturnType
Muhammad 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 Types
Muhammad 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 Accessing
Muhammad Hammad Waseem
 
Ad

Recently uploaded (20)

Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
BUSINESS QUIZ PRELIMS | QUIZ CLUB OF PSGCAS | 9 SEPTEMBER 2024
Quiz Club of PSG College of Arts & Science
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
Artificial intelligence Presented by JM.
Artificial intelligence Presented by JM.Artificial intelligence Presented by JM.
Artificial intelligence Presented by JM.
jmansha170
 
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18
Celine George
 
Exploring Ocean Floor Features for Middle School
Exploring Ocean Floor Features for Middle SchoolExploring Ocean Floor Features for Middle School
Exploring Ocean Floor Features for Middle School
Marie
 
Unit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdfUnit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdf
KRUTIKA CHANNE
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptxCapitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition OecdEnergy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independenceParenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti MpdBasic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
EUPHORIA GENERAL QUIZ FINALS | QUIZ CLUB OF PSGCAS | 21 MARCH 2025
Quiz Club of PSG College of Arts & Science
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
TV Shows and web-series quiz | QUIZ CLUB OF PSGCAS | 13TH MARCH 2025
Quiz Club of PSG College of Arts & Science
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big CycleRay Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptxPests of Rice: Damage, Identification, Life history, and Management.pptx
Pests of Rice: Damage, Identification, Life history, and Management.pptx
Arshad Shaikh
 
How to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 SalesHow to Create Quotation Templates Sequence in Odoo 18 Sales
How to Create Quotation Templates Sequence in Odoo 18 Sales
Celine George
 
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17Different pricelists for different shops in odoo Point of Sale in Odoo 17
Different pricelists for different shops in odoo Point of Sale in Odoo 17
Celine George
 
Optimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptxOptimization technique in pharmaceutical product development.pptx
Optimization technique in pharmaceutical product development.pptx
UrmiPrajapati3
 
Artificial intelligence Presented by JM.
Artificial intelligence Presented by JM.Artificial intelligence Presented by JM.
Artificial intelligence Presented by JM.
jmansha170
 
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKANMATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
MATERI PPT TOPIK 4 LANDASAN FILOSOFIS PENDIDIKAN
aditya23173
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptxjune 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18How to Manage Maintenance Request in Odoo 18
How to Manage Maintenance Request in Odoo 18
Celine George
 
Exploring Ocean Floor Features for Middle School
Exploring Ocean Floor Features for Middle SchoolExploring Ocean Floor Features for Middle School
Exploring Ocean Floor Features for Middle School
Marie
 
Unit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdfUnit- 4 Biostatistics & Research Methodology.pdf
Unit- 4 Biostatistics & Research Methodology.pdf
KRUTIKA CHANNE
 
Capitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptxCapitol Doctoral Presentation -June 2025.pptx
Capitol Doctoral Presentation -June 2025.pptx
CapitolTechU
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition OecdEnergy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
Parenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independenceParenting Teens: Supporting Trust, resilience and independence
Parenting Teens: Supporting Trust, resilience and independence
Pooky Knightsmith
 
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti MpdBasic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Basic English for Communication - Dr Hj Euis Eti Rohaeti Mpd
Restu Bias Primandhika
 
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptxDiptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Diptera: The Two-Winged Wonders, The Fly Squad: Order Diptera.pptx
Arshad Shaikh
 
Ray Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big CycleRay Dalio How Countries go Broke the Big Cycle
Ray Dalio How Countries go Broke the Big Cycle
Dadang Solihin
 
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_HyderabadWebcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Webcrawler_Mule_AIChain_MuleSoft_Meetup_Hyderabad
Veera Pallapu
 

[ITP - Lecture 01] Introduction to Programming & Different 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.