CP-101 Computing Fundamentals: Romana Farhan
CP-101 Computing Fundamentals: Romana Farhan
Computing Fundamentals
Lecture 1
Romana Farhan
[email protected]
1
Course Details
Course Title: Computing Fundamentals
Course Code: CP-101
Credit Hours: 2+1
Course Objectives:
Identify the components of a computer system.
basics of computer Organization including Memory and storage
elements, data representation in terms of number system.
To equip students with sound skills in C++ programming language.
To equip students with techniques for developing structured
computer programs.
Course Contents:
Introducing Computer Systems
Computer system
Anatomy of a computer Commands/Syntax ,Loops, Decisions,
Computer vs. Human relational operators, Functions,
Modern computers Debugging and program errors
Types of Computers
Programming basics for C++
Hardware Basics
Literals
Computer Memory and Storage Basics
Variables & constants
Software Basics
Data types
Computer Network Basics
cout statement
Basic Programming Structure
Escape sequence
Programming
Setw manipulator
Types of programming languages
cin statement
Assembler, Interpreter, Complier, Linker
Assignment statement
Source program, object program,
Arithmetic Operators and Expressions
executable program Conditional Statements
Developing an Algorithm: Pseudo code & Relational Operators
Flowchart Logical Operators
Basic Elements of programs: Variables, if, if-else, nested if, nested if-else
statements
Course Contents:
Decisions and Loops Overloaded Functions
Switch Default arguments
break Returning by reference
while loop
do-while loop
Arrays Objects & Classes
Declaration and Definition Procedural approach
One- dimensional arrays Object-oriented approach
Accessing array members Object-oriented concepts
Two-dimensional arrays Inheritance, encapsulation,
Functions polymorphism
Built-in and User defined functions Objects, classes, inheritance, reusability,
Declaration & Definition etc
Passing arguments
Basic object oriented programming
Returning Values
Defining Class and its members
Arguments passed by value
Member access specifiers
Arguments passed by reference
Declaring Objects
Accessing members of class
Recommended Books
Text Books:
H.M. Deitel and P.J. Deitel, C++
How To Program, 9th ed., Prentice- Excellent World Wide Web address: to
Hall,2014 look up computer terminology online
http://www.wikipedia.com,
Lafore, Robert, The Object- http://www.whatis.com
Oriented Programming using C+
+,3/e Excellent World Wide Web address: to
C M Aslam, T A Quershi - search companies, products, and
Programming with C++, object events
oriented programming http://www.google.com,
http://www.yahoo.com,
Peter Norton -Introduction to http://www.msn.com
Computers
Reference:
Fundamentals of c++ Programming
Richard L. Halterman January 18,
2015
Simple Program Design: A step-by-
step approach, Lesley Anne
Robertson, Course Technology,
2000
Glenn Brookshear- Computer
science-An Overview, 3rd edition
Nell Dale and John Lewis
-Computer Science Illuminated,
2nd edition
Marks Distribution of course(Theory)
Assignments ……….……… 10%
Quizzes ..…………….. 10%
Sessionals .………….….. 30%
Final .……………… 50%
6
Policies
The Lecture will always be on time, otherwise the
changed schedule will be announced in advance
The quiz will not be delayed, no one should come to
request for its delay
There will be no makeup quiz.
Assignments have to be submitted on mentioned time,
if submitted after 24 hrs of due time half marks shall be
granted, after that zero marks will be given.
Zero tolerance policy on class discipline.
Lets Start the Course…
8
Computers in Our World
Computers are everywhere
We can find them in pretty unlikely places
Family car
Home appliances
Alarm clock
Market
What is Computer
Computer is an advanced electronic device that takes
raw data as input from the user and processes these
data under the control of set of instructions (called
program) and gives the result (output) and saves output
for the future use.
11
Introducing Your Computer
How Does My Computer Work?
The “brain” of a computer is the central processing unit (CPU). When
the CPU receives and carries out an instruction, it has completed one
cycle.
13
Storage Units
How Big Is a Terabyte?
Common storage units:
Kilobyte (KB) = 1,000 bytes
(1,000,000) bytes
Gigabyte (GB) = 1,000 MB, or 1 billion
(1,000,000,000) bytes
Terabyte (TB) = 1,000 GB, or 1 trillion
(1,000,000,000,000) bytes
14
Looking Inside Computer
System
Most people believe that computers must be
15
Parts of the Computer System
Computer systems have four parts
Hardware
Software
Data
User
16
Hardware
Mechanical devices in the computer
Anything that can be touched
e.g. printer, keyboard, PDA etc.
consists of interconnected electronic
devices that you can use to control the
computer’s operation, input, and output.
generic term device refers to any piece
of hardware
17
Software
Set of instructions that makes the computer
perform tasks
Tell the computer what to do
Also called a program
Thousands of programs exist
Some for computer’s own use
Some for the service of the user
Reason majority of the people would want to
purchase a computer
E-mail, type letters, play games etc.
18
Computer data
Fact with no meaning on its own
Stored using the binary number system
Data can be organized into files
A file is simply a set of data that has been
given a name.
A file that the user can open and use is
often called a document.
19
Users
People operating the computer
20
Information Processing Cycle
Converts data into information
Data
The raw facts and figures that are processed into
information
Information
Data that has been summarized
Processing /
Input Output
Computation
21
Steps to Process Data
Input
Processing
Output
Storage
22
Steps to Process Data
Input
Computer accepts data from some source
Processing
Computers processing: components perform
actions on the data based on instructions from user
or program
Output
Computer conveys result to user.
Text, numbers, graphic, image, video, sound
Optional
Storage
Permanently store result on some medium
Optional
23
Essential Computer Hardware
Computers use the same basic hardware
Hardware categorized into four types
Processor
Memory
Input and Output
Storage
24
Processing Devices
Processing
The procedure that transforms raw data
into useful information
To perform this transformation, the
computer uses two components:
The Processor and
Memory
25
How does everything connect?
Motherboard
26
Motherboard
Main printed circuit
board in the computer
Everything connects
to the motherboard
Expansion slots -
“plugs” on the
motherboard for
expanding the PC’s
capabilities via
additional circuit
boards
27
Processor
Brain of the Computer
Processor chip
A tiny piece of silicon that contains millions of
miniature electronic circuits.
Central Processing Unit (CPU)
Carries out instructions that come from either
the user or the software.
Manipulate the data
Most computers have several processors
28
Memory
memory is one or more sets of chips that
store data and/or program instructions,
either temporarily or permanently.
Memory is a critical processing
component in any computer
Two most important types
Random access memory (RAM) and
Read-Only memory (ROM).
work in very different ways and perform
distinct functions
29
Random Access Memory
Also known as RAM or memory
Represent primary storage or temporary
storage.
Hold data before processing and information
after processing.
Volatile
More RAM results in a faster system
In MBs , GBs and TBs
RAM
30
Read Only Memory
Also called ROM
Nonvolatile
Permanent storage of programs
Holds the computer boot directions
Typically in KBs
ROM
31
Input
Input hardware - devices that allow people
to put data into the computer in a form that
the computer can use
Allows the user to interact
Input devices accept data
Keyboard
Mouse
32
The Keyboard
First peripheral to be used with computers
The most common input device for
inputting text and numbers
About 100 keys
Must be proficient with keyboard
Skill is called keyboarding
33
Standard Keyboard
Layout(QWERTY)
IBM Enhanced Keyboard with 101 keys
34
Five Groups of Keys
Alphanumeric Keys
Modifier Keys
Numeric Keypad
Function Keys
Cursor Movement keys
35
How Keyboard Works
Key is pressed on keyboard
Keyboard controller detects a key press
Keeps the code in its memory, Keyboard
buffer
Code represents the key pressed
Controller notifies the operating system
via an interrupt
Operating system responds the
interrupt by the reading the code from
buffer
OS passes the code to CPU
36
How Keyboard Works
37
The Mouse
All modern computers have a variant
Allows users to select objects
Pointer moved by the mouse
Mechanical mouse
Rubber ball determines direction and speed
The ball often requires cleaning
Optical mouse
Light shown onto mouse pad
Reflection determines speed and direction
Requires little maintenance
38
Benefits of Using Mouse
Pointer positioning is fast
39
Interacting With a Mouse
Actions involve pointing to an object
Clicking selects the object
Double clicking the object
Clicking and holding drags the object
Releasing an object is a drop
Right clicking activates the shortcut
menu
Modern mice include a scroll wheel
40
Cordless Keyboard and Mouse
Communicate with
a receiver attached
to a port on the
system unit
Use infra-red (IR)
or radio frequency
(RF) technology
41
Variants of the Mouse
Trackballs
Upside down mouse
Hand rests on the ball
User moves the ball
Uses little desk space
Mostly two buttons
Can be configured for both
right-handed and
Left-handed use
42
Track Pads
Stationary pointing device
Small plastic rectangle
Finger moves across the pad
Pointer moves with the finger
Popular on laptops
43
Track Point
Track point
Little joystick on the
keyboard between
G, H & B keys
Move pointer by
moving the joystick
Two buttons
beneath Spacebar
same as mouse
Save great of time
and effort
44
Other Input Devices
Joystick
Scanners
Digital Camera
Microphone
Webcam
45
Output
Output devices return
processed data to the
user or to another
computer system.
Most common
Monitor
Printer
Speaker
Some devices are
input and output
Touch screens
46
Output
Sound Card
Converts audio signal from
digital to analog and vice
versa
Speakers
the devices that play sounds
transmitted as electrical
signals from the sound card.
47
Output
Video card
converts the processor’s output
information into a video signal
that can be sent through a
cable to the monitor
Monitor
the display device that takes
the electrical signals from the
video card and forms an image
using points of colored light on
the screen
48
Communication Devices
Modem
a device that sends
and receives data over
telephone lines to and
from computers..
Network Interface
Cards (NIC)
Controls the flow of
data on a network link
49
Storage Devices
Hold data and programs permanently
Electronic file cabinet
Difference between storage and
memory
More capacity in storage
Contents are retained in storage even the
power is off
Storage is much cheaper
Access speed is slow
50
Types of Storage Devices
Magnetic storage
Optical storage
51
Magnetic Storage
Most common
Floppy disk
stores data on
removable 3.5-inch-
diameter diskettes.
Typical Capacity 1.4MB
Floppy disk
Zip Disk
stores data on floppy- Zip disk
disk cartridges with 70-
170 times the capacity
of the standard floppy
52
Hard disk drive
Storage device that stores billions of
characters of data on a non-removable
disk platter.
Capacity 40GB-750GB or even more in
TBs
53
Optical Storage
CD (Compact Disk) drive
a storage device that uses
laser technology to read data
from optical disks.
700MB for CD
DVD
4.7 to 17 GB
Blu-ray
Digital optical disc format.
200GB
54
Storage Capacity
1 byte - 1 character of data.
1 kilobyte – 210 bytes; 1,024 characters.
1 megabyte - 220 bytes; 1,048,576 characters.
1 gigabyte - more than 1 billion characters.
1 terabyte - more than 1 trillion characters.
55
Put all the hardware together
and…
56
Software Runs The Machine
Tells the computer what to do
Reason people purchase computers
Two types
System software
Application software
57
System Software
An Operating System (OS) is the master controller within a computer.
tells the computer how to use its own components.
An operating system interacts with:
All hardware installed in or connected to a computer system.
All software installed or running from a storage device on a computer system
Windows(xp,7,8,8.1), DOS, UNIX, Linux
Network operating system (OS)
Manages network resources.
Maintains security.
Tracks user accounts.
Handles communication between workstations and server
allows computers to communicate and share data across a network
Windows Server 2003
Utility
Utilities augment functionality of operating systems. Utilities includes device drivers
and Troubleshooting capabilities.
Utilities provide file management capabilities such as copying, moving or renaming a
file.
Norton Utilities includes an undelete function that can recover deleted files.
Symantec and McAfee Virus checkers add protection for all system and data files.
Application Software
Accomplishes a specific task
Most common type of software
Word processors
Spreadsheet
Database Management
Presentation
Graphics
Multimedia authoring
Entertainment and Education
Games
Web Design tools and web browsers
59
Computer Network Basics
A computer network is a group of computers
and other devices connected together.
Networks allow people to share:
information
hardware
storage devices
Internet connections
A network allows you to send data back and forth
between different computers, servers, storage
devices, and shared output devices
60
Computer Network Basics
A stand-alone computer is called a
workstation on a network.
A workstation provides access to:
Your computer’s local resources
Network resources
61
Communication Protocol
Communication standards called protocols
allow for global exchange of information.
Transmission Control Protocol (TCP)
Internet Protocol (IP)
All types of networks require special
networking hardware and networking
software to allow different computers to
communicate with each other.
Special hardware (Modem) and software
(browser) are required
62
Local Area Network
Personal Area Network(BAN)
Local Area Network (LAN) –
a network located in a limited area.
LANs are found in most businesses,
schools.
Many campuses use LANs.
Wide Area Network (WAN) –
a network that covers a large
geographical area.
63
Intranets - lets people within an organization or
business share information
64
Summary
Parts of the Computer System
Hardware, Software, Data, People
Information Processing Cycle
Input, Processing, Output, Storage
Computer Hardware
Processor, Memory, Motherboard
Input Devices Output devices
Storage Devices
Computer Software
Computer Users
Computer Networks
65