Chapter One Introduction To Computer: For 2008 None Computer Science Student
Chapter One Introduction To Computer: For 2008 None Computer Science Student
Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
Chapter one
Introduction to computer
A computer is an electronic device that takes input such as raw data which can be numbers, text, sound,
image, animations, video, etc., processes it, and converts it into meaningful information that could be
understood, presenting the changed input (processed input) as output. All numbers, text, sound, images,
animations, and video used as input are called data, and all numbers, text, sound, images, animations,
and video returned as output are called information.
∑ The data consists of numbers, text, sound, images, animations, and video.
∑ The process converts numbers, text, sound, images, animations, and video (data) into usable
data, which is called information.
∑ The information consists of numbers, text, sound, images, animations, and video that has been
converted by the process.
∑ The data is inserted using an input device.
∑ The central processing unit (CPU) converts data to information.
∑ The information is put on an output device.
A storage device is an apparatus for storing data and information. A basic computer consists of 4
components: an input device, a CPU, output devices, and memory.
By using computer we can exchange different kinds of data as well as information’s.
What is Data?
∑ Data is raw, unorganized facts that need to be processed.
¸ It is a collection of symbols that represent a thing, a concept or an event
¸ It is any collection of figures that are arranged in general accessed principle or convention.
Example 16, John, table…….
Data Processing
¸ It is the process of rearrangement of collected data in to our desire.
¸ It is the process of collecting, arranging and representing of a given facts in accordance with sets
of rules.
What is Information
∑ When data is processed, organized, structured or presented in a given context so as to make it
useful, it is called information.
¸ Information:-
o Should be meaningful
o Should be correct and accurate
o Should help for decision making actions
What is Knowledge?
¸ It is accumulation (group) of Information gathered from different area.
¸ Is information that helps us to draw conclusion
¸ Different kinds of information stored inside our mind.
What is Wisdom?
¸ It is the use of knowledge in making judgment based on the accepted values and tradition of
society.
¸ By using the knowledge you have creating/inventing new things for the society.
1
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
Fig .Hierarchy of data processing
DATA
INFORMATION
KNOWLEDGE
WISDOM
Sources of information
Sources of information are classified into two major categories; Documentary Source and Non
Documentary Source.
I. Documentary sources of information
It is a recorded sources of information in different forms.It is categorized into three groups.
These are
A) Primary documentary sources.
B) Secondary documentary sources.
C) Tertiary documentary sources.
A) Primary documentary sources of information are the first published records of original
research and development undertakings. It may also be a description of new application or new
interpretation of an old idea or Original thinking or new discoveries.
∑ It constitute the latest available information ,therefore ,researcher who produces new information
make it available to interested readers in the same field.
∑ It is unorganized and difficult to be directly used as they are. In most cases, they further
organized into secondary sources.
∑ It is important because they highly contribute to the development and strengthening of a given
subject or discipline.
∑ Primary sources of information can be published in variety of forms such as periodicals, research
reports, patent, standards, dissertations, journals, seminar ...etc
There are also unpublished primary sources examples of these are
∑ Laboratory note books
∑ Diaries (personal records of the daily activities of the diarist, depending on
His /her interest mostly kept on daily bases)
∑ Coins, inscription on stone.
B) Secondary documentary Sources: - Are those sources which are either compiled from or
referred to the primary sources of information. The primary sources is modified, selected,
filtered, digested, reorganized and repacked knowledge rather than a new knowledge is produced
as the secondary sources of information.
Secondary sources can be published in the form of periodicals, reference books, index, bibliographies,
text books...etc
2
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
Tertiary documentary sources:-It contains information, which is refined or distilled and collected
from primary and secondary sources of information.
Such information is published in the form of catalogues, directories (such as telephone directories)
Data Processing: - is the manipulation and transformation of data into a more useful form. Data
processing includes all the tasks performed to produce an information package. This may include:-
Classifying, Comparing, Organizing, Merging, Calculating, Sorting, Transmitting the obtained data.
The raw data is collected, the collected data is processed, output is produced and the output is
communicated to concerned users in the processing of data.
Data processing can be performed manually, mechanically or electronically.
3
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
INPUT: - This is the stage in which data is prepared and input to the system. This kind of input
information is determined factor for the quality of the output. To get quality results you must have
quality data to start with. Thus, within the information processing community, there is a well known
saying Garbage in Garbage out (GIGO), to mean unreliable original data inputs generate unusable
results or outputs
PROCESSING:- this is the stage in which data is transformed into information. The processing activity
involves any methods for using, handling, adding to or changing data.
OUTPUT: - that is a processed data which is ready to be used for some kinds of tasks. The output stage
must provide the required information on a readily usable form
What is a computer?
Before going into the details about how a computer works, its components and so on, we will begin by
defining what a computer is. Here are some definitions:
A computer is an electronic device that can perform a variety of operations in accordance with a set of
instructions called program.
A computer is a tool that people use to achieve a goal, just like any other tool that we use for example a
hammer to knock in nails. A computer in its simplest form is a box full of switches. These switches can
have two possible states, On or Off. That is why a computer is known as a ‘Two state electronic device’.
Most people assume that computers are intelligent, but this is not true. Computers are really thick, they
4
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
can’t do anything without being told to do so, and when a computer does something wrong, it is not
usually the computer that is wrong but either the person using the Computer, or the person who
programmed the software.
A computer is a device that is capable to processing data. The world’s greatest and most advanced
computer is the human body. Your mind is much faster and far superior to any computer in existence.
The characteristics of a computer show the capability and the potential of the computer for processing
data. This saves time, space, money, labor etc.
Speed: The most important characteristic of a computer is its speed. Computer works only one step at a
time. Its speed is measured by the amount of time it took to perform or carry out a basic operation.
Computer speed measured in terms of micro second (10-6 one millionths), nano second (10-9 one
billionths), and pico second (10-12 one trillionths).
Storage: Computers have enormous storage capacity. Computers can store a vast amount of
information, which can be recalled at any time in a fraction of a second. The information is stored in the
form of files, but on disks and tapes. This helps in easy and speedy retrieval of information. This storage
is known as electronic storage system. This system removes the duplication of information being stored.
For example, in a company or an organization the details of employees are given such as name, address,
basic salary, unique code number etc…, that may be required by accounts department as well as
personnel department. In case, an employee resigns or is promoted, then the updating of the information
is required only once and at one place.
Accuracy: Now a day’s computers are being used for surgical purposes which need almost hundred
percent accuracy. From this we can understand that computer is accurate and consistent. Unless there is
an error in the input data or unreliable program the computer processes with a very accurate.
Reliability:-Computer works for longer period of time without any problem or failure.
Versatility/Flexibility: Computers have the potential to perform or solve varieties of tasks and
problems, as long as the problem or the task can be put or reduced in the form of logical steps.
Diligence: Computers being a machine doesn’t suffer from the human traits of tiredness and lack of
concentration. If 1 million instructions have to be performed then the computer will perform the last
millionth instruction with the same accuracy and speed as the first instruction. In other word computers
does the same thing repeatedly with out saying I am tired.
Advantages of Computer
Computers have advantages over other computing devices as they are fast, reliable, accurate, can store
massive amounts of information, can move information quickly from one place to another and are
versatile in nature.
5
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
The advantages of computers can be listed out as below:
Limitations of computers
(a) Non-affordability: The high cost of installation of computers puts a limit over its use. However, due
to the advent of PCs and super mini-computers and mini super computers, a common man can also
afford to buy a computer.
(b) Compatibility: Programs and software written for one type of computer or microprocessor cannot be
used for other type of microprocessors.
(c) Dependent upon human beings.
(d) Have no imagination and intuition of their own.
(e) Tasks have to be described in detail.
(f) Cannot detect flaw or error in logic.
(g) Need of an expert programmer, etc.
Generations of computers
Although computer professionals do not agree on exact dates or specifics, computer developments are
often categorized by generations. Actually there are four generations and major characteristics that
distinguish these generations are the following;
Computer generations are usually categorized by dramatic improvement in the hardware, typically
tenfold or better increases in speed and reliability.
Types of Computers
There are different types of computers. Their differences depend on different categories of
characteristics.
A. Classification by the method of operation (processing)
Computers are classified by the type of data they are designed to process. They are classified into three:
I. Analog Computers
Analog computers operate by measuring. They deal with continues variables, they don’t compute
directly with numbers, rather, they operate by measuring physical magnitude such as pressure,
temperature, voltage, current etc. They are special purpose computers.
Examples: Thermometer, Voltmeter, Speedometer, Gasoline pomp, etc.
7
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
Examples: Abacus, Desk & pocket computers and most general purpose computers
Super computer: - is the fastest, largest and most potential type of computer. They have speed of
hundreds of millions of operation per second, a primary memory capacity of about 80 million characters,
and a secondary memory of capacity of about 20 times its primary memory. They are multi-user systems
in intercontinental range. They can carry out enormously complex scientific calculations. They are used
to process huge amount of data and are commonly used in space technology centers, meteorology
stations, astronomical observatories, inter continental communications, airline organizations.
Mainframe computers:- Smaller than in size and capacity, lower in speed & memory capacity than the
super computers. However they are multi-user systems and handle hundreds of users, usually used in
large organizations. The older ones used punched card for data input.
Mini computers:- have relatively lower speed, can handle multi-users, are smaller in size than the
mainframe computers. They use terminals for inputs and output. Mini computers are used in small
organizations.
8
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
Micro computers:-are the most widely used type of computers. They are single users, can fit on
desktops, are of varying capacity and easy to handle. Microcomputers are sometimes referred as
personal computers. They have video display unit for output purpose. Data is entered through the
keyboard and by the help of floppy disk.
Computers Systems
System is a group of components, consisting of subsystems or procedures that work in a coordination
fashion to achieve some objective.
A computer system consists of hardware and software for its proper functioning.
Hardware: is the physical equipment of the computer you see, you use to and the parts you can touch.
The basic units of a computer system include Central processing Unit (CPU), Storage Devices, Input
Devices, Output Devices and Communication Bus. Below is given a detailed explanation of these
devices.
It is also referred as the brain of the system. It is that part of the process the data which contains
electronic circuit to process the data. Depending on the instructions of input devices it performs
operations on the data. It also controls the flow of data through the system, directing the data to enter the
system, placing it in memory and retrieving it when required and directing the output.
The CPU consists of Arithmetical Logic Unit and Control Unit
ALU (Arithmetical Logic Unit): It takes logical decision and performs all type of arithmetical
calculations.
Control unit: It controls all the activities of other units of computer system. It receives instructions from
memory unit. It decodes these instructions. It decides the routing and storage of these instructions.
® Is that the memory which is directly accessible by the control unit and ALU;
® Usually referred as Random Access Memory (RAM), because each memory location can be
accessed without having to work sequentially through hundreds or even thousands of
memory locations called addresses;
® Each memory location can be referred by its memory location (address);
® Holds instructions and data elements which are currently being used by the computer;
® The data in the main memory while be lost when the power is off;
9
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
ROM (Read Only Memory)
® This type of memory is integrated into the circuitry of the computer and can not be altered
without altering the computer circuitry;
® Used to store programs and data that are used frequently and permanently;
Secondary storage or auxiliary storage, can take many forms, which have traditionally included punched
cards, papers tape, magnetic tape, magnetic disk and magnetic drum. This storage media are stores data
and information permanently.
Magnetic Tapes
Magnetic tapes are a particularly popular form of secondary storage because of their high data density
(the number of bytes of instruction per inch of tape) and their convenience in handling. Magnetic tapes
are approximately one - half inch wide is made of Mylar – based plastic film which can be magnetized.
Data are stored on a magnetic tape by running the tape over the electromagnetic called read/write head
which magnetizes small spots on the tape. Seven-track tapes store information as bytes of information,
where each byte consists of a six-bit code and a one-bit parity bit. Nine-track tape uses an eight-bit and a
parity bit.
Magnetic disks
Magnetic disks are metals or plastic platters coated with ferrous oxide, an easily magnetically material.
Magnetic disks allow for random access of information and overcome the slow access time commonly
found in tape files.
Disk drive: - is part of a computer system which reads from and writes data on a disk.
Floppy disks
ÿ Also called flexible or diskette.
ÿ Used to store programs and data for a longer period outside the computer system.
ÿ Often used with mini and micro computers.
ÿ Data is stored in concentric circles called tracks.
ÿ Each track is further divided into sectors
ÿ A sector stores the amount of information that can be read or written in single operation.
Track Sector
Hard Disk
ÿ A high capacity magnetic disk made up of metal which can be fixed in the system unit of the
computer.
ÿ Serves as a secondary storage.
ÿ Enables very fast accessibility of data.
ÿ Accessing data from hard disk is faster than from floppy disks.
ÿ The disks, which are usually grouped together into a disk pack are separated by small air spaces to
allow access for read/write head.
ÿ Each disk has approximately 200 tracks on which information is stored. Tracks of the small
10
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
number on all adjacent disks are referred to as a cylinder of that disk.
ÿ The disk pack is mounted on a magnetic disk drive which rotates the disk at speed up to 1,000
revolutions per second.
ÿ The total collection of tracks available on one movement of the access mechanism is known as
cylinder.
ÿ The amount of time it takes to retrieve (or store) data from (or to) disk is called the disk access
time.
Input Devices
π Is the unit used to enter data into the computer so that it can be processed.
π It converts information from a form suitable to human beings to one understandable by the
computer.
Examples of input devices;
π Keyboard (which is the most widely used input devices)
π Disk derives (floppy and hard-disk derives)
π Mouse
π Scanner
π Light pen (a photo cell to choose a displayed response to request further information).
π Voice synthesizer;
π CD-ROM Drive, etc.
Output Devices
ÿ Used to get data out of a computer so that it can be examined, analyzed or distributed to others.
ÿ Convert the result of the only-machine understandable form to a form understandable by human
beings.
Examples
ÿ The Visual Display Unit (VDU) or monitor or screen
ÿ Printers (dot matrix, laser printers)
ÿ Plotters
ÿ Voice (audio) response unit
ÿ Disk drives
11
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
5. Communication Bus
We have seen that there are different components of a computer and each performs a specific function.
But to perform a given task in synchronized form there should be some mechanism of communication.
For this reason there is an electronic circuit which produces communication path between the different
components of a computer system along which data are transferred, that is Bus. The bus, which
communicates the different parts of the CPU, is called Internal Bus. And the bus, which communicates
the CPU with memory and peripheral devices, is called External Bus. The size of the bus determines the
speed of efficiency of the computer.
Computer Software
The computer hardware is an electronic device which has the potential of performing the task of solving
a problem. However one has to give precise instructions to the hardware in order to solve problem.
The finite set of instructions (steps) that the computer follow to perform a given job is called a program.
Any program to be executed first it should reside / loaded/ in the memory.
Software: - is a collection of programs and routines that support the operations of performing a task
using a computer. Software also includes documentations, rules and operational procedures. Software
makes the interface between the user and the electronic components of the computer.
USER
Software
Hardware
Computer software is classified into two
1. System software
2. Application software
1. System software
¸ Constitutes those programs which facilitates the work of the computer hardware.
¸ It organizes and manages the machine’s resources, handles the input/output devices.
¸ It controls the hardware by performing functions that users shouldn’t have to or are unable to handle.
¸ System programs make complex hardware more users friendly.
¸ It acts as intermediate between the user and the hardware.
¸ It enables the computer understand programming languages i.e. it serves as means of communication
between user and a computer.
12
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
I. Operating system
Operating system coordinates the activity between the user and the computer. An operating system has
three major functions.
Types of Operating Systems
Operating systems can be classified by:
ÿ The number of programs they can handle at a time and
ÿ The number of users they serve at once at one or different stations (i.e. terminals or micro-
computers connected to a central computer).
13
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
2. Application Software
ÿ Is software that is designed to perform tasks for the specific area or areas. But for use in more than
one installation.
ÿ Are usually called application packages as they may include a number of programs along with
operating instruction, documentation and so forth.
ÿ Depending on their function or task they are categorized in to the following.
1. Word Processors/ Word processing
- is a computerized typewriter which permits the electronic creation, editing, formatting,
filing and printing text.
Example: WordStar, WordPerfect, Microsoft word
2. Spreadsheet
- is an electronic worksheet display on the VDU.
- Until recently, financial analysis and other mathematical calculation were done by entering
numbers on pages of an accountants ruled ledger pad.
Example: Lotus 1-2-3, Microsoft Excel, Quatropro
3. Database management system.
- Allow you to store information on a computer, retrieve it when you need it and update it
when necessary.
- You can do this with index cards, but database management programs do them more
quickly and easily.
- Example: You can store large mailing list, inventory record or billing and collect
information in lists stored in files and manipulate this information, one file at a time with
database management program.
Example: Dbase IV, FoxPro, Microsoft Access.
14
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
The Binary number system
v Binary number system is based on the two different digits; 0 and 1;
v It is important to note that every decimal number system has its equivalent binary number;
v Conversion from binary to its equivalent decimal and from decimal to its equivalent binary is
possible;
v Operation on binary number system is also possible
Binary Decimal
0 0
1 1
10 2
11 3
100 4
101 5
110 6
111 7
1000 8
1001 9 etc.
v The most elementary form to organize data within a computer (an electronic device) is in the form of
a code which utilizes the “ON” and “OFF” states of electric switches or there is “current” and “no
current” condition of the electronic components;
v We see that the nature of the electronic devices has similarity with the binary number system in that
both represent only two elementary states;
v It is therefore convenient to use binary number system to represent data in a computer;
v An “ON” corresponds to a 1;
v An “OFF” corresponds to a 0;
v In the computer “ON” is represented by the existence of a current and “OFF” is represented by non
existence of current
v On a magnetic disk, the same information is stored by changing the polarity of magnetized particles
on the disk’s surface.
CODING METHODS
∑ It is possible to represent any of the character in our language in a way as a series of electrical
switches in arranged manner;
∑ These switch arrangements can therefore be coded as a series of an equivalent arrangements of bits.
There are different coding systems that convert one or more character sets into computer codes. Some
are: EBCDIC pronounced as “Eb-see-dick” and stands for Extended Binary Coded Decimal Interchange
Code.
∑ It is an 8-bit coding scheme; (00000000 – 11111111)
∑ It accommodates to code 28 or 256 different characters
∑ It is a standard coding scheme for the large computers.
15
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
Coding Examples
EBCDIC
Character Zone Digit
a 1000 0001
b 1000 0010
A 1100 0001
B 1100 0010
0 1111 0000
9 1111 1001
BCD (6-bits)
∑ Stands for Binary Coded Decimal
∑ It uses 6-bits to code a Character
Coding Examples
BCD
Character Zone digits
A 11 0001
Q 10 1000
8 00 1000
9 00 1001
ASCII-7
∑ ASCII stands for American Standard Code for Information Interchange
∑ Used widely before the introduction of ASCII-8 (the Extended ASCII)
∑ Uses 7 bits to represent a character;
∑ With the seven bits, 27( or 128) different characters can be coded (0000000-1111111)
∑ It has a zone and digit bits positions
Coding examples:
ASCII-7
Character Zone digit
$ 010 0100
% 010 0101
A 100 0001
a 110 0001
b 110 0010
16
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
Coding Examples
Character Binary representation in ASCII
a 01100001
b 01100010
A 01000001
B 01000010
? 00111111
+ 00101011
1 00110001
2 00110010
3 00110011
BIT
ÿ Bits are the smallest units and can convey only two possible states 0 or 1;
ÿ bit stands for binary digits;
ÿ A bit is a single element in the computer, on a disk that stands for either “ON” indicating 1 or
“OFF” indicating 0;
ÿ In the computer “ON” is represented by the existence of current and “OFF” is represented by the non
existence of current
ÿ On a magnetic disk, the same information is stored by changing the polarity or magnetized particles
on the disk’s surface;
BYTE
ÿ Bits can be organized into large units to make them represent more and meaningful information;
ÿ This large unit is called a byte and is the basic “unit of data representation” in a computer system;
ÿ The commonly used byte contains 8 bits;
ÿ Since each bit has two states and there are 8 bits in a byte, the total amount of data that can be
represented is 28 or 256 possible combinations;
ÿ Each byte can represent a character(a character is either a letter, a number or a special symbol such
as +,-,?,*, $, etc
ÿ A byte is then used as a unit of measurement in the computer memory, processing unit, external
storage and during communication;
ÿ If the computer memory is 524288 byte, this is expressed in short by saying 512KB, where KB
stands for kilobyte.
¸ 1 Kilobyte(1KB) is 210 or 1024 bytes
¸ 1 Megabyte(MB) is 220 bytes or 210 kilobytes
¸ 1 Gigabyte(GB) is 230 bytes or 220 kilobytes or 210 megabytes
WORD
ÿ Word refers the number of bits that a computer process at a time or a transmission media transmits
at a time
ÿ Although bytes can store or transmit information, the process can even be faster if more than one
byte is processed at a once;
17
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
ÿ A combination of bytes, then form a “word”
ÿ A word can contain one, two, three or four bytes based on the capacity of the computer;
ÿ Word length is usually given in bits
ÿ We say that a computer is an 8-bits, a 16 bit, a 32 bit or a 64 bit computer to indicate that the amount
of data it can process at a time;
ÿ The large the word length a computer has the more powerful and faster it is.
Example: - (13020110)2
=1*23 + 0*22 + 0*21 + 1*20
=1*8+0*4+0*2+1*1
=8+0+0+1
=9
Therefore (1001)2 are equivalent to (9)10
Example 2: What is the equivalent decimal number of (101110)2?
Solution :-(150413121100)2
Number/2 Reminder
12/2=6 0
6/2=3 0
3/2=1 1
1 1
18
St.Mary’s University
Faculty of Informatics
Department of Computer Science
For 2008 None Computer Science Student
¸ Put the reminder one by one from the bottom to top like this (1100)2.
Therefore 12 in base 10 is equivalent to (1100)2
Computer Viruses
Computer virus is a self- replicating (copying) computer program that interferes with a computer's
hardware and operating system. It may attach itself to any executable code, including but not limited to
the boot sectors and/or partition sections of hard and/or floppy disks. It may damage, corrupt, destroy
data, or degrade system performance. Once the infected programs are executed, the computer viruses,
like biological viruses, destabilize the normal functions of the computer operating system.
Viruses are designed to duplicate and to escape detection. Like any other computer program, a virus
must be executed to function, that is, it must be loaded from the computers memory, and the computer
must then follow the virus instructions. These instructions are called the payload of the virus. The
payload may disrupt or change data files, display a message, or cause the OS to malfunction.
Viruses range from the relatively harmless to the destructive ones. Some may do nothing more than
display a message or your screen, whereas others may lock up your screen, corrupt or erase files,
reformat hard disk, or totally crash your system. All viruses take up RAM and hard disk space, and may
slow down the performance of your system.
19