SlideShare a Scribd company logo
1 of 4
Download to read offline
1. Introduction to Programming
What is Computer Programming?
Is the process of designing, writing, testing, debugging, and maintaining source code of
computer programs.
(OR)
Act of instructing computer to perform the task.
Source code
Is any computer instruction (possibly with comments) written using some human readable computer
language (also known as, High-level Computer Language), usually as text.
This source code is written in one or more programming languages (i.e. High-level language such as C,
C++, C#, Java, Python, and Smalltalk).
Programming Language
Refer to the artificial language designed to communicate instruction to a machines particularly a
computer. Examples of Programming languages are C, C++, JAVA, Python, Machine Language and
Assembly language.
Program
Is the sequence of instructions, written to perform a specific task with Computer.
NOTE:
 The purpose of Computer Programming is to create a set of instructions (i.e. Program) that
computers use to perform specific operations or to exhibit desired behavior.
 Software refers to the collection/set of computer programs and related data to perform a
specified task with a computer.
Programmer
Is the someone who writes the computer program (Software) using any language of hisher choice.
Classification of Computer Language:
 High-Level Language (Machine Independent Languages)
Is the programming language with strong abstraction from the details of the computer. The
programmer can create the program using these languages without asking for design detail
of the particular Machine which will run his/her program.
Prepared By;
NOEL MALLE, B.Eng (Computer Engineering)
Kilimanjaro, Tanzania.
So, there is no need for a Programmer to study the design of the computer (such as,
Processor Instruction Set Architecture, Bus types and width, Processor Registers types and size,
and other Architecture Design).
Hence, programmer focuses only on the Problem to be solved. This is the reason they are also
known as Problem-Oriented Languages
Furthermore, programs created using these languages are Machine Independent, which means,
they can run on Computer with different designs (e.g. Processor type) with little, or no
modifications required in their codes.
Examples of High-Level Language:
 C
 C++
 JAVA
 Low-Level Language (Machine Dependent Languages)
Is the programming language that provides little or no abstraction from details of the computer.
The programmer must have strong knowledge about Computer design in order to write the
program for such Computer.
Hence, there is need for a Programmer to study the design of the computer (such as,
Processor Instruction Set Architecture, Bus types and width, Processor Registers types and size,
and other Architecture Design).
Furthermore, programs created using these languages are Machine Dependent, which means,
the Program created for particular Machine can’t run on different Machine.
Types of Low-Level Languages:
 Assembly Language
 Machine Language.
NOTE:
Other Programmers describe C-language as the Middle-Level Language because of the following
2 reasons:
A relatively good programming efficiency i.e. faster program development (as compared to
low level language)
Relatively good machine efficiency i.e. faster program execution (as compared to high level
language)
Hence, it occupies the space (level) between two, that is, middle level.
Prepared By;
NOEL MALLE, B.Eng (Computer Engineering)
Kilimanjaro, Tanzania.
Language Translators
Is the computer program that translates a program written in a given programming language into
functionally equivalent program in different language.
There are various types of Language Translator but I will describe only two types of Language
Translators, which are:
 Compiler
 Interpreter
Compiler
Translates a high level language (e.g. C, C++) into lower level language (i.e. Machine Language). Compiler
checks the entire user-written program (known as the source program) and, if error free, produces a
complete program in Machine Language. Each Language has its own Compiler.
Examples of Compiled Languages:
C, C++, COBOL, and Haskell.
Examples of Compilers for various languages are as follow:
C Pelles C, Power C, Turbo C.
C++ C++ Builder, Borland C++, GCC, Turbo C++
Interpreter
Translates a High level language into an Intermediate code which will be immediately executed. The
Interpreter translates one statement at a time and, if error-free, executes the instruction. Each
Language has its own Interpreter.
Examples of Interpreted Languages:
BASIC, PHP, Perl, lisp, Smalltalk, and Ruby.
Example of Interpreter is:
BASIC Altair BASIC
Difference between Compiler and Interpreter
Compiler Interpreter
Compiler translates the whole program before
execution begins.
Thus Interpreter translates and executes the first
instruction before it goes to the second.
Prepared By;
NOEL MALLE, B.Eng (Computer Engineering)
Kilimanjaro, Tanzania.
Other types include; Assembler, DeCompiler,
DisAssembler .
NOTE:
 JAVA is not listed as Compiled or Interpreted Language because; JAVA programs are Compiled
(to bytecode) then Interpreted. Hence, it is both Compiled and Interpreted Language.
 Assembler is the computer program which translates Assembly Language to Machine Language.
 All Machines (Computer) understand Machine Code (Language) only. Hence, this leads to the
necessities of System Software such as Compiler, and Interpreter to convert High level language
to Machine code. Also, Assembler to convert Assembly Language to Machine Code.
Generations of Computer Languages:
 1st
Generation (Machine language)
 2nd
Generation (Assembly Language)
 3rd
Generation (Problem Oriented Languages such as C, Paschal, FORTRAN, and COBOL)
 4th
Generation( e.g. dBASE, FoxPro, FOCUS)
These are Low level Language
High Level Language
Prepared By;
NOEL MALLE, B.Eng (Computer Engineering)
Kilimanjaro, Tanzania.

More Related Content

What's hot

Features of c language 1
Features of c language 1Features of c language 1
Features of c language 1srmohan06
 
software development and programming languages
software development and programming languages software development and programming languages
software development and programming languages PraShant Kumar
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and developmentAli Raza
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Arslan Hussain
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming conceptssalmankhan570
 
Programming Fundamentals lecture 1
Programming Fundamentals lecture 1Programming Fundamentals lecture 1
Programming Fundamentals lecture 1REHAN IJAZ
 
PROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESPROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESABHINAV SINGH
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programmingNeeru Mittal
 
Programming language
Programming languageProgramming language
Programming languageRajThakuri
 
Introduction to computer
Introduction to computerIntroduction to computer
Introduction to computerZunair Aslam
 
input output devices
input output devicesinput output devices
input output devicesuafridi
 

What's hot (20)

Features of c language 1
Features of c language 1Features of c language 1
Features of c language 1
 
software development and programming languages
software development and programming languages software development and programming languages
software development and programming languages
 
Computer programming concepts
Computer programming conceptsComputer programming concepts
Computer programming concepts
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
 
Presentation on Programming Languages.
Presentation on Programming Languages.Presentation on Programming Languages.
Presentation on Programming Languages.
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 
Programming Fundamentals lecture 1
Programming Fundamentals lecture 1Programming Fundamentals lecture 1
Programming Fundamentals lecture 1
 
Computer software
Computer softwareComputer software
Computer software
 
PROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESPROGRAMMING LANGUAGES
PROGRAMMING LANGUAGES
 
Introduction to programming languages
Introduction to programming languagesIntroduction to programming languages
Introduction to programming languages
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
Computer Programming - Lecture 1
Computer Programming - Lecture 1Computer Programming - Lecture 1
Computer Programming - Lecture 1
 
Operating system
Operating systemOperating system
Operating system
 
Programming language
Programming languageProgramming language
Programming language
 
Introduction to computer
Introduction to computerIntroduction to computer
Introduction to computer
 
computer languages
computer languagescomputer languages
computer languages
 
input output devices
input output devicesinput output devices
input output devices
 

Viewers also liked

Viewers also liked (12)

Consumer Product Safety Commission3
Consumer Product Safety Commission3Consumer Product Safety Commission3
Consumer Product Safety Commission3
 
Excel Lesson 1: Excel Basics
Excel Lesson 1: Excel BasicsExcel Lesson 1: Excel Basics
Excel Lesson 1: Excel Basics
 
Consumers' welfare and protection
Consumers' welfare and protectionConsumers' welfare and protection
Consumers' welfare and protection
 
Consumerism
ConsumerismConsumerism
Consumerism
 
Computer programmer
Computer programmerComputer programmer
Computer programmer
 
Programmer ppt
Programmer pptProgrammer ppt
Programmer ppt
 
Computer programmer job information
Computer programmer job informationComputer programmer job information
Computer programmer job information
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel Basics
 
Teaching Excel
Teaching ExcelTeaching Excel
Teaching Excel
 
Ppt on consumers rights
Ppt on consumers rightsPpt on consumers rights
Ppt on consumers rights
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languages
 
Consumer rights
Consumer rightsConsumer rights
Consumer rights
 

Similar to Introduction to computer programming

1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptxVishwas459764
 
Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7Shipra Swati
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computerzaheeriqbal41
 
Introduction to Programming By Wathika F. Maina
Introduction to Programming By Wathika F. MainaIntroduction to Programming By Wathika F. Maina
Introduction to Programming By Wathika F. MainaNez Computex
 
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
 
Programming languages
Programming languagesProgramming languages
Programming languagesgaurav jain
 
Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Chao-Lung Yang
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdfKINGZzofYouTube
 
lce1 مترجمات.pptx
lce1 مترجمات.pptxlce1 مترجمات.pptx
lce1 مترجمات.pptxSamiAAli44
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Compiler design slide share
Compiler design slide shareCompiler design slide share
Compiler design slide shareSudhaa Ravi
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)nharsh2308
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Sehrish Rafiq
 
Lecture1 compilers
Lecture1 compilersLecture1 compilers
Lecture1 compilersAftab Ahmad
 

Similar to Introduction to computer programming (20)

1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptx
 
Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7
 
Ppt 1
Ppt 1Ppt 1
Ppt 1
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computer
 
C_NOTES.pdf
C_NOTES.pdfC_NOTES.pdf
C_NOTES.pdf
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
Introduction to Programming By Wathika F. Maina
Introduction to Programming By Wathika F. MainaIntroduction to Programming By Wathika F. Maina
Introduction to Programming By Wathika F. Maina
 
Unit 1
Unit 1Unit 1
Unit 1
 
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
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)Introduction to Computer Programming (general background)
Introduction to Computer Programming (general background)
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
 
Assembler
AssemblerAssembler
Assembler
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
 
lce1 مترجمات.pptx
lce1 مترجمات.pptxlce1 مترجمات.pptx
lce1 مترجمات.pptx
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Compiler design slide share
Compiler design slide shareCompiler design slide share
Compiler design slide share
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12
 
Lecture1 compilers
Lecture1 compilersLecture1 compilers
Lecture1 compilers
 

Recently uploaded

Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Hiroshi SHIBATA
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfUK Journal
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxNeo4j
 

Recently uploaded (20)

Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 

Introduction to computer programming

  • 1. 1. Introduction to Programming What is Computer Programming? Is the process of designing, writing, testing, debugging, and maintaining source code of computer programs. (OR) Act of instructing computer to perform the task. Source code Is any computer instruction (possibly with comments) written using some human readable computer language (also known as, High-level Computer Language), usually as text. This source code is written in one or more programming languages (i.e. High-level language such as C, C++, C#, Java, Python, and Smalltalk). Programming Language Refer to the artificial language designed to communicate instruction to a machines particularly a computer. Examples of Programming languages are C, C++, JAVA, Python, Machine Language and Assembly language. Program Is the sequence of instructions, written to perform a specific task with Computer. NOTE:  The purpose of Computer Programming is to create a set of instructions (i.e. Program) that computers use to perform specific operations or to exhibit desired behavior.  Software refers to the collection/set of computer programs and related data to perform a specified task with a computer. Programmer Is the someone who writes the computer program (Software) using any language of hisher choice. Classification of Computer Language:  High-Level Language (Machine Independent Languages) Is the programming language with strong abstraction from the details of the computer. The programmer can create the program using these languages without asking for design detail of the particular Machine which will run his/her program. Prepared By; NOEL MALLE, B.Eng (Computer Engineering) Kilimanjaro, Tanzania.
  • 2. So, there is no need for a Programmer to study the design of the computer (such as, Processor Instruction Set Architecture, Bus types and width, Processor Registers types and size, and other Architecture Design). Hence, programmer focuses only on the Problem to be solved. This is the reason they are also known as Problem-Oriented Languages Furthermore, programs created using these languages are Machine Independent, which means, they can run on Computer with different designs (e.g. Processor type) with little, or no modifications required in their codes. Examples of High-Level Language:  C  C++  JAVA  Low-Level Language (Machine Dependent Languages) Is the programming language that provides little or no abstraction from details of the computer. The programmer must have strong knowledge about Computer design in order to write the program for such Computer. Hence, there is need for a Programmer to study the design of the computer (such as, Processor Instruction Set Architecture, Bus types and width, Processor Registers types and size, and other Architecture Design). Furthermore, programs created using these languages are Machine Dependent, which means, the Program created for particular Machine can’t run on different Machine. Types of Low-Level Languages:  Assembly Language  Machine Language. NOTE: Other Programmers describe C-language as the Middle-Level Language because of the following 2 reasons: A relatively good programming efficiency i.e. faster program development (as compared to low level language) Relatively good machine efficiency i.e. faster program execution (as compared to high level language) Hence, it occupies the space (level) between two, that is, middle level. Prepared By; NOEL MALLE, B.Eng (Computer Engineering) Kilimanjaro, Tanzania.
  • 3. Language Translators Is the computer program that translates a program written in a given programming language into functionally equivalent program in different language. There are various types of Language Translator but I will describe only two types of Language Translators, which are:  Compiler  Interpreter Compiler Translates a high level language (e.g. C, C++) into lower level language (i.e. Machine Language). Compiler checks the entire user-written program (known as the source program) and, if error free, produces a complete program in Machine Language. Each Language has its own Compiler. Examples of Compiled Languages: C, C++, COBOL, and Haskell. Examples of Compilers for various languages are as follow: C Pelles C, Power C, Turbo C. C++ C++ Builder, Borland C++, GCC, Turbo C++ Interpreter Translates a High level language into an Intermediate code which will be immediately executed. The Interpreter translates one statement at a time and, if error-free, executes the instruction. Each Language has its own Interpreter. Examples of Interpreted Languages: BASIC, PHP, Perl, lisp, Smalltalk, and Ruby. Example of Interpreter is: BASIC Altair BASIC Difference between Compiler and Interpreter Compiler Interpreter Compiler translates the whole program before execution begins. Thus Interpreter translates and executes the first instruction before it goes to the second. Prepared By; NOEL MALLE, B.Eng (Computer Engineering) Kilimanjaro, Tanzania. Other types include; Assembler, DeCompiler, DisAssembler .
  • 4. NOTE:  JAVA is not listed as Compiled or Interpreted Language because; JAVA programs are Compiled (to bytecode) then Interpreted. Hence, it is both Compiled and Interpreted Language.  Assembler is the computer program which translates Assembly Language to Machine Language.  All Machines (Computer) understand Machine Code (Language) only. Hence, this leads to the necessities of System Software such as Compiler, and Interpreter to convert High level language to Machine code. Also, Assembler to convert Assembly Language to Machine Code. Generations of Computer Languages:  1st Generation (Machine language)  2nd Generation (Assembly Language)  3rd Generation (Problem Oriented Languages such as C, Paschal, FORTRAN, and COBOL)  4th Generation( e.g. dBASE, FoxPro, FOCUS) These are Low level Language High Level Language Prepared By; NOEL MALLE, B.Eng (Computer Engineering) Kilimanjaro, Tanzania.