CSC 101 2020 - 2021 Module 1-1
CSC 101 2020 - 2021 Module 1-1
October, 2021 1
CSC 101: Introduction to
Computer Science
PREPARED BY SY AUNA
October, 2021 2
COURSE POLICIES
• The class will be interactive
• The course has been splitted into 4 modules/
parts. one module will be taken by a lecturer
• Lecture Note will be given to you by your
lecturers for each module probably in
batches
• No Noise Making, Phone Calls E.T.C will not
be tolerated
• Attendance is compulsory
• Late Attendance will not be tolerated
October, 2021 3
COURSE POLICIES…
• You are adviced to be serious,
hardworking and of good behavior
• You may be given assignments or
exercises that may help you get a better
understanding of the course and for your
exams
• Feel free to ask reasonable questions
October, 2021
4
COURSE OUTLINE (Module 1)
• A brief introduction to Computers and
Computer Science
• History and generations of Computers
• Characteristics of computers
• Computer Hardware
• Functional components of computers
• Modern I/O Devices
Nov 2017 5
COURSE OUTLINE (Module 2)
• Software:
– Operating Systems
– Application Packages
• computer networks
– Definition
– Types of computer networks
– Applications of computer networks
• Introduction to OSI and TCP/IP models
Nov 2016 6
COURSE OUTLINE (Module 3)
• Introduction to databases
• Review of Database Management
Systems (DBMS)
• Applications of (DBMS)
• How to use Microsoft access DBMS
software to create databases and
establish relationship between the tables
Nov 2016 7
COURSE OUTLINE (Module 4)
• Introduction to problem solving
• Tools used for solving problems:
• Algorithm
• Definition, Xtics, sample problems
• Flowcharts
• Definition, Xtics, sample problems
• pseudo codes
• Definition, Xtics, sample problems
Nov 2016 8
COURSE GRADING SYSTEM
• Each Lecturer will conduct a CA Test at
the end of his/her section graded 10
marks. You will therefore have a total of 4
CAs each of 10 marks making 40%.
• Exams will be graded 60%
• CA + Exams = 100%
Nov 2017 9
Module 1
Nov 2016 10
WHAT IS A COMPUTER?
• A computer is anelectronic machine that
takes input from theuser, processes the
given input and generates output in the
form of useful information.
• Computer.. Latin word.. compute
• Calculation Machine
• A computer system includes a computer,
peripheral devices, and software
Nov 2016 11
WHAT IS A COMPUTER?
• Accepts input, processes data, stores data,
and produces output
• Input refers to whatever is sent to a
Computer system
• Data refers to the symbols that represent
facts, objects, and ideas
• Processing is the way that a computer
manipulates data
• A computer processes data in a device
called thecentral processing unit (CPU)
Nov 2016 12
WHAT IS A COMPUTER?
• Input: data, programs, user reply
Data : the raw details that need to be
processed to generate some useful
information.
Programs : the set of instructions that can be
executed by the computer in sequential or
non-sequential manner.
User reply : the input provided by the user in
response to a question asked by the
computer.
Nov 2016 13
WHAT IS A COMPUTER?
• A computer includes various devices:
Central Processing Unit (CPU)
Monitor
Keyboard and Mouse
Nov 2016 14
WHAT IS COMPUTER SCIENCE?
• No general accepted definition of the field
however,
• Computer Science can be defined as the
study of computers and computational
systems.
• computer scientist deals mostly with
software and software systems; this
includes their theory, design, development,
and application.
15
WHAT IS COMPUTER SCIENCE?
• Computer Science is NOT just about
learning Technologies
• It is about building Technologies
• Computer science is about logic,
problem solving, and creativity
16
HISTORY OF COMPUTERS
• Before the 1500s, in Europe, calculations
were made with an abacus
– Invented around 500BC, available in many
cultures (China, Mesopotamia, Japan,
Greece, Rome, etc.)
Nov 2016 19
FIRST GENERATION COMPUTERS
Nov 2016 20
FIRST GENERATION COMPUTERS
• Advantages:
(1) Fastest computing devices of their time;
(2) These computers were able to execute
complex mathematical problems in an
efficient manner
Nov 2016 21
FIRST GENERATION COMPUTERS
• Disadvantages:
(1) The functioning of these computers depends
on the machine language.
(2) They were generally designed as special-
purpose computers.
(3) The use of vacuum tube technology make
these computers very large and bulky.
(4) They were not easily transferable from one
place to another due to their huge size and also
required to be placed in cool places.
(5) They were single tasking because they could
execute only one program at a time.
(6) They generate huge amount of heat and
hence were prone to hardware faults.
Nov 2016 22
FIRST GENERATION COMPUTERS
o Electronic Numerical
Integrator and Computer
(ENIAC)
o By Presper Eckert and John
Mauchly
o 18,000 vacuum tubes.
o Occupied a 30 by 50 foot
room
o Programming by plugging
wires into a patch panel.
Very difficult to do, because
this style of programming
requires intimate knowledge
of the computer.
Nov 2016 23
SECOND GENERATION
• COMPUTERS
Employed during
the period
1956-1963
• Use transistors in
place of vacuum
tubes in building
the basic logic
circuits.
Nov 2016 24
SECOND GENERATION
COMPUTERS
• Advantages:
• (1) Fastest computing devices of their time;
• (2) Easy to program because of the use
assembly language;
• (3) Could be transferred from one place to
other very easily because they were small and
light;
• (4) Require very less power in carrying out
their operations;
• (5) More reliable, did not require
maintenance at regular intervals of time.
Nov 2016 25
SECOND GENERATION
COMPUTERS
•Disadvantages:
(1)The input and output media were not
improved to a considerable extent
(2) Required to be placed in air-conditioned
places
(3) The cost of these computers was very high
and they were beyond the reach of home users
(4) Special-purpose computers and could
execute only specific applications
Nov 2016 26
SECOND GENERATION
COMPUTERS
• Transistors replaced
vacuum tubes for
circuitry and magnetic
drum by magnetic core
for memory.
• Smaller, faster and
more reliable.
• Used assembly
language. COBOL and
FORTRAN were
developed at this time
too.
• Second generation
computers still relied on
punched cards for
inputs and printouts for
outputs.
• IBM 7094, CDC 3600
computers are
examples of second
generation
Nov 2016 computers. 27
THIRD GENERATION COMPUTERS
• Employed during
the period
1964-1975
• Use of Integrated
Circuits
Nov 2016 28
THIRD GENERATION COMPUTERS
• Advantages:
• (1) Fastest computing devices at that time
• (2) Very productive
• (3) Easily transportable from one place to
another because of their small size
• (4) Use high-level languages
• (5) Could be installed very easily and
required less space
• (6) Can execute any type of application.
• (7) More reliable and require less frequent
maintenance schedules.
Nov 2016 29
THIRD GENERATION COMPUTERS
• Disadvantages:
(1)The storage capacity of these computers
was still very small;
(2) The performance of these computers
degraded while executing large applications,
involving complex computations because of
the small storage capacity;
(3) The cost of these computers was very
high;
(4) They were still required to be placed in air-
conditioned places.
Nov 2016 30
THIRD GENERATION COMPUTERS
Nov 2016 31
FOURTH GENERATION COMPUTERS
• Employed during
1975-1989
• Use of Large Scale
Integration (LSI)
technology and Very
Large Scale
Integration (VLSI)
technology
• The term Personal
Computer (PC)
became known to the
people during this era.
Nov 2016 32
FOURTH GENERATION COMPUTERS
Advantages:
(1) Very powerful in terms of their processing speed
and access time;
(2) Storage capacity was very large and faster;
(3) Highly reliable and required very less maintenance;
(4) User-friendly environment;
(5) Programs written on these computers were highly
portable;
(6) Versatile and suitable for every type of applications;
(7) Require very less power to operate.
Nov 2016 33
FOURTH GENERATION COMPUTERS
Disadvantages:
(1) The soldering of LSI and VLSI chips on
the wiring board was not an easy task and
required complicated technologies to bind
these chips on the wiring board;
(2) The working of these computers is still
dependent on the instructions given by the
programmer.
Nov 2016 34
FOURTH GENERATION COMPUTERS
Nov 2016 35
FIFTH GENERATION COMPUTERS
• Fifth Generation (Present and Beyond)
• The different types of modern digital computers come
under this category.
• Uses Ultra Large Scale Integration technology that
allows almost ten million electronic components to be
fabricated on one small chip.
• Fifth generation computing devices are based on
artificial intelligence and are still in development,
though there are some applications, such as voice
recognition, that are being used today. The use of
parallel processing and superconductors is helping to
make artificial intelligence a reality.
• Quantum computation and molecular and
nanotechnology will radically change the face of
computers in years to come.
• The goal of fifth-generation computing is to develop
devices that respond to natural language input and are
capable of learning and self-organization.
Nov 2016 36
FIFTH GENERATION COMPUTERS
Advantages:
(1) Fastest and powerful computers till date;
(2) Being able to execute a large number of applications
at the same time and that too at a very high speed;
(3) Decreasing the size of these computers to a large
extent;
(4)The users of these computers find it very comfortable
to use them because of the several additional multimedia
features;
(5) They are versatile for communications and resource
sharing.
Nov 2016 37
FIFTH GENERATION COMPUTERS
Nov 2016 38
CLASSIFICATION OF COMPUTERS
Nov 2016 39
CLASSIFICATION OF COMPUTERS
(1) Based on operating principles:
Analog computers: represent data in the form of continuous
electrical signals having a specific magnitude
Digital computers: store and process data in the digital form.
Hybrid computers: a combination of analog computer and
digital computer because it encompasses the best features
of both.
However, Hybrid computers are computers that exhibit
features of analog computers and digital computers. The
digital component normally serves as the controller and
provides logical and numerical operations, while the analog
component often serves as a solver of differential equations
and other mathematically complex equations.
Nov 2016 40
CLASSIFICATION OF COMPUTERS
Nov 2016 41
CLASSIFICATION OF COMPUTERS
(3) Based on size and capability
Microcomputers: Designed to be used by individuals also
known as Personal Computers. e.g. laptops, tablet PCs,
pocket calculators e.t.c.
Mini Computers: Can handle more data and more input and
output than micro computers e.g. IBM System/3,
Honeywell 200, TI-990 e.t.c.
Mainframe Computers: Very large computers in size,
memory, power and very expensive e.g. IBM zSeries,
System z9, System z10 Servers e.t.c.
Super Computers: The fastest type of computer that can
perform complex operations at a very high speed e.g. IBM
Roadrunner, Trinity by Cray Inc., IBM Sequoia e.t.c.
Nov 2016 42
CHARACTERISTICS OF MODERN
COMPUTERS
• The unique capabilities and
characteristics of a computer:
Speed
Storage capacity
Accuracy
Reliability
Versatility
Diligence
Nov 2016 43
CHARACTERISTICS OF MODERN
COMPUTERS
• SPEED
– Computers operate at extremely high speeds
Nov 2016 44
CHARACTERISTICS OF MODERN
COMPUTERS
• ACCURACY
– The computer’s accuracy is consistently high.
– Almost without exception, the errors in
computing are due to human rather than
technological weakness i.e. due to vague
thinking by the programmer, inaccurate data,
user instructions or hardware problems.
Nov 2016 45
CHARACTERISTICS OF MODERN
COMPUTERS
• AUTOMATIC (SPONTANEOUS)
– The computers are automatic. They do not
need any supervision in order to perform
programs when instructed or execute the work
assigned.
Nov 2016 46
CHARACTERISTICS OF MODERN
COMPUTERS
• DILIGENCE (ENDURANCE)
– Computers have the ability to perform the
same task over for long time without getting
tired. This is because a computer is a
machine, and so does not have human
behaviors of tiredness and lack of
concentration
Nov 2016 47
CHARACTERISTICS OF MODERN
COMPUTERS
• versatility
– Modern Computers can perform different kind
of tasks simultaneously (doing many tasks at
the same time). For example you can play
music while typing a document at the same
time. This is also known as multi-tasking.
Nov 2016 48
CHARACTERISTICS OF MODERN
COMPUTERS
• Adaptability
– Modern Computers can comply with different
settings. For example, they can be used as
personal computers, for home use, banking,
communication, entertainment, weather
forecasting, space explorations, teaching,
railways, medicine etc.
Nov 2016 49
CHARACTERISTICS OF MODERN
COMPUTERS
• Artificial intelligence
– Computers are artificially intelligent. i.e.
They can be programmed to assume
capabilities such as learning, reasoning,
adaptation, and self-correction. For
example computers can respond as if they
were thinking by playing chess, recognize
handwriting and speech. However, the
computers themselves cannot think. The
artificial intelligence is only supported by
the power of the programs installed in
them.
Nov 2016 50
CHARACTERISTICS OF MODERN
COMPUTERS
• storage
– For a computer to be able to work, it must
have some form of work space where data is
stored before being processed. All
information is stored on a hard disk or in the
memory, for example on a RAM.
Nov 2016 51
CHARACTERISTICS OF MODERN
COMPUTERS
• Need user Input
– Computers cannot initiate themselves and
make the decisions. They need instructions
from users to enhance the process. After all, a
computer is only a machine.
Nov 2016 52
LIMITATIONS OF A COMPUTER
Garbage-In, Garbage-Out
Dumb machine
Nov 2016 53
THE COMPUTER SYSTEM
• Hardware
• Software
• Data
• People
Nov 2016 54
THE COMPUTER SYSTEM
Nov 2016 55
HARDWARE AND SOFTWARE
• Hardware
– the physical, tangible parts of a computer
– keyboard, monitor, disks, wires, chips, etc.
• Software
– programs and data
– a program is a series of instructions that tells the
computer to perform a specific task
Nov 2016 57
CENTRAL PROCESSING UNIT(CPU)
•The main operations of the CPU include four
phases:
(1) Fetching instructions from the memory
(2) Decoding the instructions to decide what
operations to be performed
(3) Executing the instructions
(4) Storing the results back in the memory
Nov 2016 58
THE CENTRAL PROCESSING UNIT
• A CPU is on a chip called amicroprocessor
• It continuously follows thefetch-decode-execute
cycle:
Retrieve an instruction from main memory
fetch
execute decode
Nov 2016 60
COMPONENTS OF A CPU
• Registers
• Arithmetic Unit
• Logic Unit
• Control Unit
Nov 2016 61
COMPONENTS OF A CPU
• The CPU contains:
Performs
Arithmetic / Logic Unit calculations and
makes decisions
Coordinates
Control Unit processing steps
Small storage
Registers areas
Nov 2016 63
LOGIC UNIT
• Logic Unit is the part of the CPU that
performs logical operations on the data.
Nov 2016 64
CONTROL UNIT
• Control Unit is an important component of
CPU that controls the flow of data and
information. It maintains the sequence of
operations being performed by the CPU.
Nov 2016 65
REGISTERS
• CPU contains a few special purpose,
temporary storage units known as
registers. They are high-speed memory
locations used for holding instructions,
data and intermediate results that are
currently being processed.
Nov 2016 66
REGISTERS (CONTINUED)
• The direct communication between the
processor and memory of the computer system
is implemented with the help of two registers:
(1) Memory Address Register
(2) Memory Buffer Register
The reading and writing operations performed by
the processor are calledmemory read and
memory write operations.
Nov 2016 67
PROCESSOR TO I/O DEVICES
COMMUNICATION
• The communication between I/O devices
and processor of the computer system is
implemented using an interface unit . The
interface unit acts as an intermediary
between the processor and the device
controllers of various peripheral devices in
the computer system.
Nov 2016 68
MACHINE CYCLE
• The cycle during which a machine
language instruction is executed by the
processor of the computer system is
known as machine cycle.
Nov 2016 69
INSTRUCTION CYCLE
Nov 2016 70
EXECUTION CYCLE
Nov 2016 71
THE BUS
• A bus is a set of wires that is used to connect the
different internal components of the computer system
for the purpose of transferring data as well addresses
amongst them.
• Data bus: used to transfer data amongst the different
internal components. Modern computer systems use 32-
bit data buses for data transfer.
• Address bus: transfers the memory addresses for read
and write memory operations.
Nov 2016 72
THE BUS
Nov 2016 73
MEMORY AND STORAGE SYSTEMS
• Primary Memory: Store the data that are
being currently handled by the CPU;
generally known as “memory” , main
memory or RAM;
• Secondary Memory: Store the results and
the data for future use; generally known as
“storage”;
• Internal Process Memory: Placed either
inside the CPU or near the CPU such as
Cache memory and Registers.
Nov 2016 74
MEMORY REPRESENTATION
• In the memory, values are represented by
sequences of binary digits, know as bits. Most
computers use a group of eight bits, known as a
byte, to represent a character.
• Memory is a “bunch” of bytes or cells into which
we can place data. Each cell, known as a data
item, is assigned a unique number known as
“address”. The CPU can identify each cell by its
address.
Nov 2016 75
MEMORY REPRESENTATION
9278
Main memory is divided
9279 into many memory
9280 cells )
locations (or
9281
9282
9283
9284 Each memory cell has a
numericaddress , which
9285 uniquely identifies it
9286
Nov 2016 78
RANDOM ACCESS MEMORY(RAM)
• Random Access Memory (RAM) is a volatile
memory and loses all its data when the power is
switched off.
• It is the main memory of the computer system
that stores the data temporarily and allows the
data to be accessed in any order.
• RAM can be categorised into two main types,
namely, Static RAM and Dynamic RAM.
Nov 2016 79
RANDOM ACCESS MEMORY(RAM)
• Static RAM: is a type of RAM in which data is stored till
the power of the computer system is switched on. SRAM
uses a number of transistors to store a single bit of
digital information.
• Dynamic RAM: is the RAM in which data is stored in a
storage cell, consisting of a transistor and a capacitor.
The DRAM needs to be continuously refreshed with
power supply because the capacitor has the tendency to
get discharged. DRAM retains the data for a very short
span of time, even after the power supply is switched off.
Nov 2016 80
RAM
Nov 2016 81
READ ONLY MEMORY(ROM)
• ROM is the memory that stores the data
permanently.
• The data can be easily read from this type of
memory but cannot be changed.
• ROM is most commonly used in devices such as
calculators, laser printers, etc.
• ROM does not allow the random access of data,
and allows sequential access of data.
Nov 2016 82
READ ONLY MEMORY(ROM)
ROM is divided into four types:
(1) Programmable ROM: a memory chip on which the write
operation of data can be performed only once. PROM is reliable and
stores the data permanently without making any change in it. It is
mostly used in video games and electronic dictionaries.
(2) Erasable PROM: a type of ROM in which data can be erased or
destroyed using Ultraviolet Light.
(3) Electrically Erasable PROM: a type of ROM in which data can be
erased or destroyed by exposing it to an electric charge.
(4) Flash ROM: a type of EEPROM that stores the information using
floating-gate transistors, which can store electric charge for a
longer period of time as compared to the normal transistors. This
memory is mainly used in the memory cards of mobile phones,
digital cameras and iPods for storing data. Flash ROM has faster
speed of reading data, as compared to any other type of ROM.
Nov 2016 83
ROM
Nov 2016 84
Nov 2016 85
Nov 2016 86
SECONDARY STORAGE SYSTEMS
• Storage systems are the devices used for data
storage. The main objective of the storage
system is to permanently store data. The storage
systems can be classified as follows:
(1) Magnetic
(2) Optical
(3) Solid state
(4) Magneto Optical
Nov 2016 87
MAGNETIC STORAGE SYSTEMS
• Magnetic storage systems can be defined as the
storage systems that store the data on a
magnetised medium, with the help of
magnetised particles. Magnetic tapes, magnetic
disks, hard disks, floppy disks are examples of
magnetic storage systems.
• Can store any type of data, such as text, audio,
video, image
Nov 2016 88
MAGNETIC STORAGE SYSTEMS
• Magnetic tapes: The plastic tapes with magnetic coating
that are used for storing the data. They are similar to the
normal recording tapes. The data stored on the
magnetic tapes can be accessed using the sequential
access method.
• Magnetic Disks: A flat disk that is covered with magnetic
coating for holding information. It is used to store digital
information in the form of small and magnetized needles.
These needles help in encoding a single bit of
information by getting polarized in one direction
represented by 1, and opposite direction represented by
0. It allows the random access of data and provides the
facility of erasing and re-recording the data as many
times as required.
Nov 2016 89
Secondary Storage Samples
Nov 2016 90
OPTICAL STORAGE SYSTEMS
• The optical storage systems use the laser
light as the optical medium to retrieve as
well as record data.
• The optical storage devices are either
read-only or writable.
Nov 2016 91
SOLID-STATE STORAGE DEVICES
• Solid-state Storage Devices were developed in
1978 by Storage Tek Company.
• Do not use magnetic and optical medium to
store data. Instead, use the semiconductor
devices.
• Contains all the properties of hard disk drives to
store the data and use solid-state memory,
which has no moving parts.
• The examples of SSD are flash memory cards
and Universal Serial Bus (USB) devices.
Nov 2016 92
CACHE MEMORY
• Cache memory is a small, fast and
expensive memory that stores the copies
of data that needs to be accessed
frequently from the main memory.
Nov 2016 93
STORAGE EVALUATION CRITERIA
• Access Mode: random access mode, sequential access
mode, direct access mode
• Access Time: the time taken by the processor in
completing the requests made by the user for
performing the read and write operations.
• Storage Capacity: the size of the memory available for
storing the data, and measured in terms of bytes.
• Storage Type: Temporary and permanent memory.
• Cost: the cost of the storage device used in the
computer system for holding the data.
Nov 2016 94
INPUT DEVICES
• Input devices are electromechanical devices
that are used to provide data to a computer for
storing and further processing, if necessary.
• We can provide the input to a computer in two
ways: (1) Manually through devices such as
keyboard and mouse; (2) Directly from
documents using devices such as scanners.
Nov 2016 95
INPUT DEVICES
Depending upon the type or method of input, the
input device may belong to one of the following
categories:
(1) Keyboard
(2) Pointing devices
(3) Scanning devices
(4) Optical recognition devices
(5) Digital camera
(6) Voice recognition devices
(7) Media input devices
Nov 2016 96
INPUT DEVICES
Nov 2016 97
Keyboard
Keyboard is the most commonly used input device. We can use a
keyboard to type data and text and execute commands. A standard
keyboard consists of the following groups of keys:
(1) Alphanumeric keys: The alphanumeric keys include the number
keys and alphabet keys. These keys are arranged in the same style as
in the normal typewriters, popularly known as QWERTY layout;
(2) Function keys: Arranged in a row on the top of the keyboard. Help
perform specific tasks, such as searching a file or refreshing a web
page;
(3) Central keys: Used for controlling the movement of cursor and
screen display. Include arrow keys, modifier keys such as SHIFT, ALT,
CTRL;
(4) Numeric keypad: Located on the right side of the keyboard. This
looks like a calculator’s keypad;
(5) Special purpose keys: Escape, Insert, Delete, Print Screen, Pause,
Tab, Spacebar;
Nov 2016 98
Pointing Devices
Pointing devices are the input devices that are generally
used for moving the cursor to a particular location to point
an object on the screen. With the help of pointing devices,
we can easily select the icons, menus, windows, etc on the
Graphical User Interface. Some of the commonly used
pointing devices are:
(1) Mouse
(2) Trackball
(3) Light pen
(4) Joystick
(5) Touchscreen
Nov 2016 99
Mouse
A small hand-held pointing device that
basically controls the two-dimensional
movement of the cursor on the displayed
screen. The most commonly used types of
mouse are:
(1) Mechanical mouse
(2) Optical mouse
• Microphone
• Webcam
• Graphics tablet