SlideShare a Scribd company logo
Computer
Programming
Computer Programming
 Computer programming is the process of
writing instructions that direct a computer to
carry out specific tasks
 A computer program is a set of step-by-
step instructions that tell a computer how to
solve a problem or carry out a task
 The instructions that make up a computer program
are often referred to as code
 A program is written in a computer programming
language
Programming Languages (-1-)
 A programming language is an artificial
language designed for creating instructions that a
computer can carry out
 In contrast, the languages we speak [e.g., English / Urdu] are
natural languages
 Programming languages differ from natural
languages in that
 natural languages are used for interaction between people
 programming languages allow humans to communicate
instructions to machines as well as machine-to-machine
interaction
Programming Languages (-2-)
 Programming languages can be divided into two major
categories
 Low-level languages
 Require the programmer to write instructions for the lowest level of
computer’s hardware
 Easy for computer to understand; Difficult for humans
 Examples: Machine Language, Assembly Language
 High-level languages
 Makes programming process easier by providing commands such
as PRINT or WRITE instead of unintelligible strings of 1s and 0s
 Examples: FORTRAN, C, C++, Java, Python …
 Languages can also be categorized by generations
LOW-LEVEL
LANGUAGES
Programming Language
Categorization
HARDWARE
MACHINE LANGUAGE
ASSEMBLY
LANGUAGE
HIGH-LEVEL
LANGUAGES
1st
Generation
Language [1GL]
2GL
3GL, 4GL
Machine Language /
Machine Code
 The first languages for programming computers – sometimes
referred to as first-generation languages
 A machine language consists of a set of commands,
represented as a series of 1s and 0s, corresponding to the
instruction set understood by a microprocessor
 A machine language is specific to a particular CPU or
microprocessor family
 High-level languages are (mostly) translated [compiled] to
machine language in order to be understood and executed by
the microprocessor
Example
Add the registers 1 and 2. Place the result in
register 6.
[ op | rs | rt | rd | shamt | funct ]
0 1 2 6 0 32
decimal 000000 00001 00010 00110 00000
100000 binary
Machine Language /
Machine Code
Assembly Language
 Allows programmers to use abbreviated
command words rather than 1s and 0s used in
machine languages
 A significant improvement over machine languages
 Mnemonics such as ADD, SUB, MUL, DIV, JMP etc are
more understandable than 0001, 0100 etc
 Also referred to as second-generation languages
 Assembly languages are also machine specific
 Each assembly language command corresponds on a
one-to-one basis to a machine language instruction
Assembly Language
Example 1
Add 10 to the variable MARKS
ADD MARKS, 10
Example 2
Transfer the value 10 to the AL register
MOV AL, 10
High-level languages
C/C++, JAVA, BASIC and etc.
 Similar to everyday English,
 Use mathematical notations
Example 1
Add 10 to the variable MARKS
MARKS = MARKS + 10;
Example 2
Assign the value 10 to the variable A, value 20 to variable B,
add them and store the results in variable C
A = 10; B = 20;
C = A + B;
Next
 Now we move on to: C How to Program
Ad

More Related Content

Similar to Basic Introduction to Computer Programming.ppt (20)

Introduction Programming and Application Lecture 1.pptx
Introduction Programming and Application Lecture 1.pptxIntroduction Programming and Application Lecture 1.pptx
Introduction Programming and Application Lecture 1.pptx
MahamaHaruna
 
Programming languages.pptx
Programming languages.pptxProgramming languages.pptx
Programming languages.pptx
Christ Association
 
Rajesh ppt
Rajesh pptRajesh ppt
Rajesh ppt
Swarnima Tiwari
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Bilal Amjad
 
Computer programming
Computer programmingComputer programming
Computer programming
Suneel Dogra
 
Computer languages and generation
Computer languages and generationComputer languages and generation
Computer languages and generation
Munawar Bukhari
 
Programming Language
Programming LanguageProgramming Language
Programming Language
Madhushree Shettigar
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
Arslan Hussain
 
rajeshppt-141119011256-conversion-gate01 (1).pdf
rajeshppt-141119011256-conversion-gate01 (1).pdfrajeshppt-141119011256-conversion-gate01 (1).pdf
rajeshppt-141119011256-conversion-gate01 (1).pdf
SunnukhazisSunnu
 
Unit i (part2) b.sc
Unit i (part2)   b.scUnit i (part2)   b.sc
Unit i (part2) b.sc
Hepsijeba
 
classification of computer language
classification of computer languageclassification of computer language
classification of computer language
BinamraRegmi
 
What is a programming language.docx
What is a programming language.docxWhat is a programming language.docx
What is a programming language.docx
ssuser9846a6
 
COMPUTER LANGUAGES programming languages.pptx
COMPUTER LANGUAGES programming languages.pptxCOMPUTER LANGUAGES programming languages.pptx
COMPUTER LANGUAGES programming languages.pptx
harshsingh0889
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
kapil078
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
kapil078
 
Programming
ProgrammingProgramming
Programming
Rohaiziah
 
10 lesson7
10 lesson710 lesson7
10 lesson7
Mary Grace Uminga
 
1. Define Program, programmer, Programming Language and its type||Learn C Pro...
1.	Define Program, programmer, Programming Language and its type||Learn C Pro...1.	Define Program, programmer, Programming Language and its type||Learn C Pro...
1. Define Program, programmer, Programming Language and its type||Learn C Pro...
Fiaz Hussain
 
4programming-languages.ppt
4programming-languages.ppt4programming-languages.ppt
4programming-languages.ppt
NeetuJindal9
 
Computer Languages....ppt
Computer Languages....pptComputer Languages....ppt
Computer Languages....ppt
hashgeneration
 
Introduction Programming and Application Lecture 1.pptx
Introduction Programming and Application Lecture 1.pptxIntroduction Programming and Application Lecture 1.pptx
Introduction Programming and Application Lecture 1.pptx
MahamaHaruna
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 1(Microcomputer ...
Bilal Amjad
 
Computer programming
Computer programmingComputer programming
Computer programming
Suneel Dogra
 
Computer languages and generation
Computer languages and generationComputer languages and generation
Computer languages and generation
Munawar Bukhari
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
Arslan Hussain
 
rajeshppt-141119011256-conversion-gate01 (1).pdf
rajeshppt-141119011256-conversion-gate01 (1).pdfrajeshppt-141119011256-conversion-gate01 (1).pdf
rajeshppt-141119011256-conversion-gate01 (1).pdf
SunnukhazisSunnu
 
Unit i (part2) b.sc
Unit i (part2)   b.scUnit i (part2)   b.sc
Unit i (part2) b.sc
Hepsijeba
 
classification of computer language
classification of computer languageclassification of computer language
classification of computer language
BinamraRegmi
 
What is a programming language.docx
What is a programming language.docxWhat is a programming language.docx
What is a programming language.docx
ssuser9846a6
 
COMPUTER LANGUAGES programming languages.pptx
COMPUTER LANGUAGES programming languages.pptxCOMPUTER LANGUAGES programming languages.pptx
COMPUTER LANGUAGES programming languages.pptx
harshsingh0889
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
kapil078
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
kapil078
 
1. Define Program, programmer, Programming Language and its type||Learn C Pro...
1.	Define Program, programmer, Programming Language and its type||Learn C Pro...1.	Define Program, programmer, Programming Language and its type||Learn C Pro...
1. Define Program, programmer, Programming Language and its type||Learn C Pro...
Fiaz Hussain
 
4programming-languages.ppt
4programming-languages.ppt4programming-languages.ppt
4programming-languages.ppt
NeetuJindal9
 
Computer Languages....ppt
Computer Languages....pptComputer Languages....ppt
Computer Languages....ppt
hashgeneration
 

Recently uploaded (20)

Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
*"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"**"Sensing the World: Insect Sensory Systems"*
*"Sensing the World: Insect Sensory Systems"*
Arshad Shaikh
 
Overview Well-Being and Creative Careers
Overview Well-Being and Creative CareersOverview Well-Being and Creative Careers
Overview Well-Being and Creative Careers
University of Amsterdam
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
Search Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo SlidesSearch Matching Applicants in Odoo 18 - Odoo Slides
Search Matching Applicants in Odoo 18 - Odoo Slides
Celine George
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
Module 1: Foundations of Research
Module 1: Foundations of ResearchModule 1: Foundations of Research
Module 1: Foundations of Research
drroxannekemp
 
Origin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theoriesOrigin of Brahmi script: A breaking down of various theories
Origin of Brahmi script: A breaking down of various theories
PrachiSontakke5
 
Rock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian HistoryRock Art As a Source of Ancient Indian History
Rock Art As a Source of Ancient Indian History
Virag Sontakke
 
Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)Myasthenia gravis (Neuromuscular disorder)
Myasthenia gravis (Neuromuscular disorder)
Mohamed Rizk Khodair
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptxANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
ANTI-VIRAL DRUGS unit 3 Pharmacology 3.pptx
Mayuri Chavan
 
Form View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo SlidesForm View Attributes in Odoo 18 - Odoo Slides
Form View Attributes in Odoo 18 - Odoo Slides
Celine George
 
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon DolabaniHistory Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
History Of The Monastery Of Mor Gabriel Philoxenos Yuhanon Dolabani
fruinkamel7m
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Redesigning Education as a Cognitive Ecosystem: Practical Insights into Emerg...
Leonel Morgado
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18How to Share Accounts Between Companies in Odoo 18
How to Share Accounts Between Companies in Odoo 18
Celine George
 
Ad

Basic Introduction to Computer Programming.ppt

  • 2. Computer Programming  Computer programming is the process of writing instructions that direct a computer to carry out specific tasks  A computer program is a set of step-by- step instructions that tell a computer how to solve a problem or carry out a task  The instructions that make up a computer program are often referred to as code  A program is written in a computer programming language
  • 3. Programming Languages (-1-)  A programming language is an artificial language designed for creating instructions that a computer can carry out  In contrast, the languages we speak [e.g., English / Urdu] are natural languages  Programming languages differ from natural languages in that  natural languages are used for interaction between people  programming languages allow humans to communicate instructions to machines as well as machine-to-machine interaction
  • 4. Programming Languages (-2-)  Programming languages can be divided into two major categories  Low-level languages  Require the programmer to write instructions for the lowest level of computer’s hardware  Easy for computer to understand; Difficult for humans  Examples: Machine Language, Assembly Language  High-level languages  Makes programming process easier by providing commands such as PRINT or WRITE instead of unintelligible strings of 1s and 0s  Examples: FORTRAN, C, C++, Java, Python …  Languages can also be categorized by generations
  • 6. Machine Language / Machine Code  The first languages for programming computers – sometimes referred to as first-generation languages  A machine language consists of a set of commands, represented as a series of 1s and 0s, corresponding to the instruction set understood by a microprocessor  A machine language is specific to a particular CPU or microprocessor family  High-level languages are (mostly) translated [compiled] to machine language in order to be understood and executed by the microprocessor
  • 7. Example Add the registers 1 and 2. Place the result in register 6. [ op | rs | rt | rd | shamt | funct ] 0 1 2 6 0 32 decimal 000000 00001 00010 00110 00000 100000 binary Machine Language / Machine Code
  • 8. Assembly Language  Allows programmers to use abbreviated command words rather than 1s and 0s used in machine languages  A significant improvement over machine languages  Mnemonics such as ADD, SUB, MUL, DIV, JMP etc are more understandable than 0001, 0100 etc  Also referred to as second-generation languages  Assembly languages are also machine specific  Each assembly language command corresponds on a one-to-one basis to a machine language instruction
  • 9. Assembly Language Example 1 Add 10 to the variable MARKS ADD MARKS, 10 Example 2 Transfer the value 10 to the AL register MOV AL, 10
  • 10. High-level languages C/C++, JAVA, BASIC and etc.  Similar to everyday English,  Use mathematical notations Example 1 Add 10 to the variable MARKS MARKS = MARKS + 10; Example 2 Assign the value 10 to the variable A, value 20 to variable B, add them and store the results in variable C A = 10; B = 20; C = A + B;
  • 11. Next  Now we move on to: C How to Program
  翻译: