CSC 103 Introduction To Computers and Programming: By: Dr. Sadaf Tanvir

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 32

-

CSC 103 Introduction to Computers and


Programming
by: Dr. Sadaf Tanvir
https://sites.google.com/site/sadaftanvir/

CIIT, Islamabad
Course Objectives
 Introduce students to the world of computers and programming

 Familiarize them with the basic computing concepts

 Students should gain in depth knowledge of the notions like functions,


arrays and pointers

 Prepare them for the upcoming programming based courses

 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

 Computer Systems (third edition) by J.Stanley Warford

 Introduction to programming using turbo C by Robert Lafore

 Let us C by Yashavant Kanetka

 Programming with C by schaum series

 Many others

CIIT, Islamabad
12/07/2021 4
Administrivia (3)
Students’ Background

 Medium of instruction

 Interaction with computers?

 Previous programming experience?

Method of Study
 Note down points from the lecture

 Study from books, internet etc.

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 machine that computes….

 A programmable machine that receives input, stores and manipulates data/information, and provides
output in a useful format

 Programmable: computer takes a set of instructions

Who invented Computer?

 Not a simple question to answer. Many scientists contributed in giving it the form it has today

 Charles Babbage is said to be the father of modern computing.

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

Today, How does a computer serve us?


 Mathematical calculations
 Microwave ovens
 Word processing
 Desktop publishing  Game consoles
 Internet
 Digital audio video composition  Automatic washing machines
 Banks
etc.
 Travel
 Many more

CIIT, Islamabad
12/07/2021 9
Evolution of Computers
1941 Konrad Zuse - Z3 Computer

1942 ABC Computer world's first electronic digital


computer(used vacuum tubes)

1946 ENIAC 1 Computer electronic general-


purpose computer

1947/48 The Transistor

1951 UNIVAC Computer

1958 The Integrated Circuit

1971 Intel 4004 Computer Microprocessor

CIIT, Islamabad
12/07/2021 10
Evolution of Computers
1983 Apple Lisa Computer

1984 Apple Macintosh Computer

1996 Intel releases 200Mhz processor

1999 The Intel Pentium III 500 MHz is released

2006 Intel releases the Core2 Duo Processor

What is the latest????

CIIT, Islamabad
12/07/2021 11
Introduction to Computers

How did the first computer look like?


 Charles Babbage invented an Analytical Engine (1837)

 It was a mechanical device

 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

Graphics Card ROM


 

Hard disk drive


Power Supply
CD Drive

RAM microprocessor
CIIT, Islamabad
12/07/2021 15
Computer Components

Network Card Wireless Network Card

Modem Sound Card


Courtesy: http://www.computerhope.com

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

 Data & instruction cache memory

 Instruction unit

 Arithmetic-Logic unit

 Floating-point unit

 Control unit

 Input/Output management unit

 Registers
Courtesy: http://en.kioskea.net

CIIT, Islamabad
12/07/2021 18
Processing
Input Processing Output

Input Central Processing Output


Main Memory
device Unit Devices

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

 Bar code readers

 Scanners
CIIT, Islamabad
12/07/2021 20
Output Devices

Input Central Output


Main Memory
device Processing Unit Devices

Bus

 Disk Drives

 Magnetic tape 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

Input Central Main Output


device Processing Unit Memory Devices Input Central Main Output
device Processing Unit Memory Devices

(c) Then CPU sends processed data back to


main memory (d)Finally the results go to the output device

Steps (b) and (c ) usually repeat many times

CIIT, Islamabad
12/07/2021 22
System Software
 Makes hardware accessible to the applications

 Controls and coordinates computer operations

 Manages programs and resources(CPU and memory)

 Controls input and output

 Manages communication through user interface

 e.g. DOS, Windows, UNIX, MacOS etc.

CIIT, Islamabad
12/07/2021 23
Application Software
 Makes hardware accessible to the end user

 e.g. to make this lecture

Microsoft Power point


 Performs specific tasks

 Word processing (Microsoft word)


Windows XP

 Spreadsheet (Microsoft excel)


Hardware
 Databases (Microsoft access) etc.

 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?

Ans. We write a program to command it

 Human beings understand English or similar languages whereas

 Computers understand machine language i.e. 010101010

 Q. How to command a computer?

 Ans. A computer's language of instruction and information is a PROGRAMMING LANGUAGE


 It is understandable to human beings

 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

obj obj lib

linker

lib dll exe

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.

 Interpretation and compilation are the two principal means by which


programming languages are implemented however

 They are not fully distinct

 Assembler converts assembly language instructions into machine code 01010100


to be executed by the processor

 Assembly language is a low-level programming language


 for computers, microprocessors, microcontrollers, and other integrated circuits

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

 To modify/edit a program, the wire connections needed to be altered which


was a tedious task e.g. ENIAC computer’s main memory only stored data
but no 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

 Herman Hollerith encoded the 1890 census data on punch cards

 1943 - ENIAC coding system

 FORTRAN (1955), the "FORmula TRANslator“

 LISP (1958), the "LISt Processor“

 COBOL, the COmmon Business Oriented Language

 ALGOL 60 (the "ALGOrithmic Language“)

 Simula (1960), a superset of Algol 60

 C, an early systems programming language, was developed at Bell Labs between 1969 and 1973

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

You might also like