Instructor : Muhammad Haris
All Rights Reserved to Department of Computer Science – GCU Lahore
Attitude Does Matter
Bring a change in your attitudeYou are no more college studentsShow maturity and sensibility in your
conduct
Take a different approach towards your studiesLearning should be the primary objective
BS(CS) - A stepping-stone towards your professional life
Programming Fundamentals | Lecture-1 2
Commitment & Dedication The only thing that is required from you Do not take things for-granted Engender interest in this field of study
Even if you got admission without your consent or interest
Programming Fundamentals | Lecture-1 3
Zero Tolerance for Plagiarism An unethical practice which is
considered as cheating and deceiving othersDisciplinary actions may be taken against
you
Plagiarism detection is not a big deal in the field of Computer Science
Programming Fundamentals | Lecture-1 4
Be Prepared for Surprises Get to know about Semester System
from your seniorsThings will get passed at quite a rapid pace
Be ready for tight schedules and strict deadlines
Keep your morale up and try not to lose focusYou’ll end up enjoying your studies
Programming Fundamentals | Lecture-1 5
Instructor : Muhammad Haris
All Rights Reserved to Department of Computer Science – GCU Lahore
How Important is it?
Fundamental basis for all of your courses that involve programming throughout this degree program
It will be very hard to compensate for it in future
○ CAUTION: If you fail to perform well in this course, it will be very hard for you to go through next semesters and to finally get out with a degree in your hand
Programming Fundamentals | Lecture-1 7
Three Most Important Things
Programming Fundamentals | Lecture-1 8
Practice
Practice
Practice
How to Perform Well
Revise the lecture the same day Complete given tasks before next
lectureTasks will be given at the end of every
lecture
Consult your teacher, TA’s, senior students if you are unable to understand a concept
Programming Fundamentals | Lecture-1 9
Instructor : Muhammad Haris
All Rights Reserved to Department of Computer Science – GCU Lahore
Programming Fundamentals
Two Terms
Computer
Programming
11Programming Fundamentals | Lecture-1
Computer
You are familiar with calculators An electronic device much more
sophisticated than calculatorsThe hardware components it contain are
much more powerful than that of a calculator
A dumb terminalCannot think for itselfNot pre-designed with any kind of
functionality
12Programming Fundamentals | Lecture-1
Programming
Computers are dumb but they can do exactly what they are told to do
Giving instructions to a computer to perform a task is what we call “programming”
These set of instructions are called a “computer program”
This capability of computers is what makes them so powerfulExample: Adding numbers from 1 to 1000
13Programming Fundamentals | Lecture-1
Computer Program
A series of instructions given to a computer, in order to accomplish a task or to achieve a particular result
14Programming Fundamentals | Lecture-1
What kind of instructions a computer can understand?
How can we communicate it to the computer?
15Programming Fundamentals | Lecture-1
Looking Inside Computer
MICRO-PROCESSOR
16Programming Fundamentals | Lecture-1
Microprocessor
A micro-chip that can perform arithmetic operationsBeing a digital circuit, it understands only 0’s
and 1’s known as “machine language”○ It can handle only simple operations like Add,
Subtract, Multiply, Divide etc.
It can be used in many devices, computer is just one example
17Programming Fundamentals | Lecture-1
Giving Instructions to Microprocessor It’s very hard for human beings to
remember different patterns of 0’s and 1’s
It is almost impossible for a human being to write a computer program consisting only of 0’s and 1’s
There was a need to define a language which is easier to understand and work with
18Programming Fundamentals | Lecture-1
Solution: Assembly Language Set of short words to represent different
patterns of 0’s and 1’sExample: ADD 00101101
Remember: Microprocessor can only understand machine language (0s & 1s)How assembly language will work then?
19Programming Fundamentals | Lecture-1
Solution: Assembler A translator to convert words into appropriate
patterns of 0s & 1s i.e, converts series of instructions (written in
assembly language) into machine language
20Programming Fundamentals | Lecture-1
Instructions inAssembly Language
ASSEMBLER
Instructions inMachine Language
21Programming Fundamentals | Lecture-1
Problem with Assembly Language It is more close to machine rather than
human beingsA low-level language Human mind does not work so simply as the
machine does
It is still very different from the languages that human beings speakIt is still difficult for human beings to solve a
complex problem by writing a computer program in assembly language
22Programming Fundamentals | Lecture-1
Solution: High Level Languages The programming languages which are
closer to human languages and further from machine languagesIn contrast, assembly languages are
considered low-level because they are very close to machine languages
Remember: Microprocessor can only understand machine language (0s & 1s)How a high-level language will work then?
23Programming Fundamentals | Lecture-1
Solution: Compiler
A translator to convert instructions written in a high-level language to low-level languageSee figure on next slide
Programming Fundamentals | Lecture-1 24
Instructions inAssembly Language
ASSEMBLER
Instructions inMachine Language
COMPILER
Instructions inHigh-level Language
human being
microprocessor
25Programming Fundamentals | Lecture-1
Top Related