CSC 103 Introduction To Computers and Programming: By: Dr. Sadaf Tanvir
CSC 103 Introduction To Computers and Programming: By: Dr. Sadaf Tanvir
CSC 103 Introduction To Computers and Programming: By: Dr. Sadaf Tanvir
CIIT, Islamabad
Course Objectives
Introduce students to the world of computers and programming
By the end of the course, students should feel confident and competent
about their computer know how and ability to write programs
CIIT, Islamabad
12/07/2021 2
Administrivia(1)
Marks Breakdown
Midterms 25%
Assignments 10%
Quiz (will be pop) 5%
Project 10%
Final Exam 50%
CIIT, Islamabad
12/07/2021 3
Administrivia (2)
Reading Material
www.google.com
en.wikipedia.org
Many others
CIIT, Islamabad
12/07/2021 4
Administrivia (3)
Students’ Background
Medium of instruction
Method of Study
Note down points from the lecture
CIIT, Islamabad
12/07/2021 5
CSC 103
CSC 103: Part I
Introduction to Computers (4 lectures)
CSC 103: Part 2
Introduction to Programming (22 lectures)
CIIT, Islamabad
12/07/2021 6
CSC 103: Part I
Introduction to Computers
CIIT, Islamabad
12/07/2021 7
Introduction to Computers
Meaning of the term computer?
A programmable machine that receives input, stores and manipulates data/information, and provides
output in a useful format
Not a simple question to answer. Many scientists contributed in giving it the form it has today
CIIT, Islamabad
12/07/2021 8
Introduction to Computers
Why was a computer invented?
Initially, Babbage’s invention was a special purpose calculator that was designed to tabulate
logarithms and trigonometric functions
CIIT, Islamabad
12/07/2021 9
Evolution of Computers
1941 Konrad Zuse - Z3 Computer
CIIT, Islamabad
12/07/2021 10
Evolution of Computers
1983 Apple Lisa Computer
CIIT, Islamabad
12/07/2021 11
Introduction to Computers
The Engine had five parts: the mill, or calculating unit, the store (memory), an input device, a control section and
a printer. The input and the control section were fed by punched cards.
CIIT, Islamabad
12/07/2021 12
Introduction to Computers
• What is a computer made
up of?
• Hardware Output Devices
• The tangible parts of computer
• Central Processing Unit(CPU)
• Memory
CPU,Memory,Storage
• Storage
• Input/output device
• Software
• Something that operates the hardware
• System Software
• Application Software
Input Devices
Courtesy: Microsoft
CIIT, Islamabad
12/07/2021 13
What is inside of a CPU box?
Power supply
Motherboard
Bus
Ports
Video card
Modem
Network card
Sound card
ROM
RAM
Slots
DIMMs
Processor
Courtesy: http://www.computerhope.com
CIIT, Islamabad
12/07/2021 14
Computer Components
RAM microprocessor
CIIT, Islamabad
12/07/2021 15
Computer Components
CIIT, Islamabad
12/07/2021 16
Random Access Memory (RAM)
"Random" means any piece of data can be accessed in a constant time,
regardless of its physical location and whether or not it is related to the
previous piece of data
RAM/Main memory stores both data being processed and the programs
processing data
It is volatile
Information is lost the moment the power is switched off
CIIT, Islamabad
12/07/2021 17
The Processor
The processor is also known as computer's brain. It processes data to yield meaningful
information
Instruction unit
Arithmetic-Logic unit
Floating-point unit
Control unit
Registers
Courtesy: http://en.kioskea.net
CIIT, Islamabad
12/07/2021 18
Processing
Input Processing Output
Bus
CIIT, Islamabad
12/07/2021 19
Input Devices
Input Central Output
Main Memory
device Processing Unit Devices
Keyboards
Mouse devices
Disk Drives
Magnetic tapes
Scanners
CIIT, Islamabad
12/07/2021 20
Output Devices
Bus
Disk Drives
Screens
Printers
CIIT, Islamabad
12/07/2021 21
Data flow for a complete job
Input Central Main Output Input Central Main Output
device Processing Unit Memory Devices device Processing Unit Memory Devices
(a) First data flows from the input device into the (b) Next CPU brings the data into its registers for
main memory processing
CIIT, Islamabad
12/07/2021 22
System Software
Makes hardware accessible to the applications
CIIT, Islamabad
12/07/2021 23
Application Software
Makes hardware accessible to the end user
CIIT, Islamabad
12/07/2021 Compiler (e.g. for C language) 24
Programming Languages
Q. How does a computer do what we ask him to do?
Once we have written a program, special purpose softwares are used to convert the human
understandable instructions into machine understandable ones
But How?
CIIT, Islamabad
12/07/2021 25
Compilation
Compiler: A computer program (or set of programs) that transforms source code written
in a high level language into the object code (binary form) that a computer can
understand e.g. Compiler for C language
Understandable by human
beings
Source Code
Understandable by
computer
Object Code
CIIT, Islamabad
12/07/2021 26
Linking
Linker is a program that takes one or more objects generated by a compiler and
combines them into a single executable program
It often takes objects from a library
linker
CIIT, Islamabad
12/07/2021 27
Interpreter, Assembler, JIT
Interpreter normally means a computer program that executes the source
code directly e.g. pearl, python, MATLAB, awk etc.
CIIT, Islamabad
12/07/2021 28
Just in time compilation
JIT compilers represent a hybrid of Compilation and
Interpretation
It translates continuously but also caches the
translated code to speed up program execution e.g.
Microsoft's .NET Framework and Java
CIIT, Islamabad
12/07/2021 29
Von Neumann Architecture
Earliest computers used hand wired programs
In 1945, John Von Neumann proposed the idea to store program in the memory
along with the data
A revolutionary idea
In 1949, EDSAC was built using Von Neumann's stored program idea
All commercial modern day computers are based on von Neumann's concept
CIIT, Islamabad
12/07/2021 30
Evolution of Programming Languages
Ada Lovelace specified a method for calculating Bernoulli numbers with the Babbage’s Analytical Engine which is
considered as the world's first computer program
COBOL, the COmmon Business Oriented Language
CIIT, Islamabad
12/07/2021 31
Evolution of Programming Languages
1970 Pascal
1972 C
1972 SmallTalk
1972 Prolog
1978 SQL
1980 C++
1983 Ada
1984 Common Lisp
1987 Perl
1988 Tcl
1991 Python
1995 Java
1995 Delphi
1995 Javascript
1995 PHP
1998 Visual Basic
1999 D
2001 C#
2001 Visual Basic.Net
CIIT, Islamabad
12/07/2021 32