Lecture 1 - Introduction to Programming (1)
Lecture 1 - Introduction to Programming (1)
Programming
|
Outline
• Definition:
– Program
– Computer Programming
– Programming Languages
• Categories of Programming Languages
– Low Level Languages
– High Level Languages
• Translating High Level Language
04/27/202
5
Lecture 1: Introduction to Programming |
Program
04/27/202
5
Lecture 1: Introduction to Programming |
Computer Programming
04/27/202
5
Lecture 1: Introduction to Programming |
Programming Language
04/27/202
5
Lecture 1: Introduction to Programming |
Programming Language
04/27/202
5
Lecture 1: Introduction to Programming |
Programming Languages
04/27/202
5
Lecture 1: Introduction to Programming |
Very many programming
languages
• Programming languages have evolved
over times as better ways have been
developed to design them.
– First PLs developed in the 1950s
– Since then thousands of language have been
developed
• Different programming languages are
designed for different types of programs
04/27/202
5
Lecture 1: Introduction to Programming |
Categories of Programming
Languages
04/27/202
5
Lecture 1: Introduction to Programming |
Categories of Programming
Languages
• Low level languages
– Machine Language
– Assembly Language
• High Level Languages
– Procedural Languages
– Object Oriented Programming Languages
• A Low Level language is one which exposes
a significant amount of the computer's inner
workings while high level programming
languages hide the details of the computer.
04/27/202
5
Lecture 1: Introduction to Programming |
Low Level Languages
04/27/202
5
Lecture 1: Introduction to Programming |
Machine Language
• Consist of a string of binary numbers (1s and
0s)
• “Natural language” of a computer and as such
defined by its hardware design.
• Machine dependent:-Any computer can directly
understand only its own machine language.
• Easily understood by computers
• Cumbersome for humans:
– Too slow
– Tedious
– Error prone
04/27/202
5
Lecture 1: Introduction to Programming |
Machine Language Example
04/27/202
5
Lecture 1: Introduction to Programming |
Assembly Languages
04/27/202
5
Lecture 1: Introduction to Programming |
Assembly Languages
04/27/202
5
Lecture 1: Introduction to Programming |
High Level Languages
04/27/202
5
Lecture 1: Introduction to Programming |
High Level Languages
04/27/202
5
Lecture 1: Introduction to Programming |
Procedural Languages
04/27/202
5
Lecture 1: Introduction to Programming |
Object Oriented Programming
Languages
• The focus of OOP languages is not on
structure, but on modeling data.
• Programmers code using “blueprints” of
data models called classes.
• Examples of OOP languages include Java,
C++,Visual Basic.NET and Java.
04/27/202
5
Lecture 1: Introduction to Programming |
Translation of HL Languages
• All HL programs
need to be
translated to
machine language
so that a
computer can
process the
program.
04/27/202
5
Lecture 1: Introduction to Programming |
Translation of HL Languages
04/27/202
5
Lecture 1: Introduction to Programming |
Compiling
04/27/202
5
Lecture 1: Introduction to Programming |
Compiling
04/27/202
5
Lecture 1: Introduction to Programming |
Interpreting
04/27/202
5
Lecture 1: Introduction to Programming |
Comparison
04/27/202
5
Lecture 1: Introduction to Programming |
Discussion
• Procedural programming
• Object oriented programming
• Functional programming
04/27/202
5
Lecture 1: Introduction to Programming |
Reading Task
04/27/202
5
Lecture 1: Introduction to Programming |