0% found this document useful (0 votes)
2 views222 pages

Computer Generations and Types Explained

Uploaded by

rebornedbetalpha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views222 pages

Computer Generations and Types Explained

Uploaded by

rebornedbetalpha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

READERS ARE LEADERS

PART I: COMPUTER SYSTEMS

CHAPTER 1: CLASSIFYING COMPUTERS


Competence: To know the history of the computer, the different types that exist with their main
technological change and the types of data computers use.
Exploring generations and types of computers
Introduction
Computers differ in size and shape such that one used in a hospital laboratory is different from
that used in an office and a computer that is used in weather forecasting is different from the
two kind mentioned above.
To facilitate the study and understanding of this machine, they are often divided into groups
based on certain criteria for example; Generation, Purpose, Size and Data representation.

1- Generation: Generation in computer terminology is a change in technology a computer


was being used. Initially, the generation term was used to distinguish between varying hardware
technologies. But nowadays, generation includes both hardware and software, which together
make up an entire computer system.
Each generation is characterized by a medium technological development which radically
changed the way computer resulting in increasingly smaller, cheaper, more powerfully and more
efficient machines and they include the 1st, 2nd, 3rd, 4th and 5th.

Following are the main five generations of computers


S.N. Generation & Description
First Generation
1
The period of first generation: 1942-1954. Vacuum tube base.
Second Generation
2
The period of second generation: 1952-1964. Transistor based.
Third Generation
3 The period of third generation: 1964-1972. Integrated Circuit
based.
Fourth Generation
4 The period of fourth generation: 1972-1990. VLSI
microprocessor based.
Fifth Generation
5 The period of fifth generation: [Link]
microprocessor based.

a) 1st Generation Computers


Developed between 1940 - 1956 this generation was characterized by devices called Vacuum
tubes. They were too large, too expensive to operate using a great deal of electricity thus
generating much heat which usually caused malfunctioning. They relayed on machine
language to perform operations and could solve only one problem at a time. In this generation
mainly batch processing operating system were used. Inputs were based on punched cards and
paper tape while output was displayed on print out.

GBHS DSCHANG Page 1


READERS ARE LEADERS
nd
b) 2 Generation Computers
They were developed between 1956-1963 and were characterized by devices called
Transistors. Here, computers became faster and more economical but still relayed on punched
cards and print outs. They moved from binary language to assembling languages enabling user
to specify information in words.
In this generation assembly language and high level programming language like FORTRAN,
COBOL was used. There were Batch processing and Multiprogramming Operating system used.
The main features of Second Generation are; Use of transistors, Reliable as compared to
First generation computers, Smaller size as compared to First generation computers, Generate
less heat as compared to First generation computers, Consumed less electricity as compared to
First generation computers, Faster than first generation computers, Still very costly, A.C.
needed, Support machine and assembly languages.

c) 3rd Generation computers


They had Integrated Circuits (ICs) as their fundamental component and were produced from
1964-1971. Transistors were minimized and placed on silicon chips called semiconductors
radically increasing their speed and accuracy. A single IC has many transistors, resistors and
capacitors along with the associated circuitry. Users interacted whit computers using keyboards
and monitors. An interface with operating system allowed the devise to run more than one
program at a time with a central program monitoring the memory.
This development made computers smaller in size, reliable and efficient.
In this generation Remote processing, Time-sharing, Real-time, Multi-programming Operating
System were used. High level language (FORTRAN-II TO IV, COBOL, PASCAL PL/1,
BASIC, ALGOL-68 etc.) were used during this generation.

The main features of Third Generation are; ICs used, more reliable, Smaller in size,
Generate less heat, Faster, Lesser maintenance, still costly, AC needed, consumed lesser
electricity, Support high level language.

d) 4th Generation computers


Developed since 1971, they are known as microcomputers and are characterized by devices
called processors or CPU
This generation provides multimedia facilities and possibilities offsetting up computer networks
like the internet. They provide a friendly user interface called GUI.

The fourth generation of computers is marked by the use of Very Large Scale Integrated (VLSI)
circuits. VLSI circuits having about 5000 transistors and other circuit elements and their
associated circuits on a single chip made it possible to have microcomputers of fourth
generation. Fourth Generation computers became more powerful, compact, reliable, and
affordable. As a result, it gave rise to personal computer (PC) revolution. In this generation
Time sharing, Real time, Networks, Distributed Operating System were used. All the Higher
level languages like C and C++, DBASE etc. were used in this generation.

The main features of Fourth Generation are; VLSI technology used, Very cheap, Portable
and reliable, Use of PC's, Very small size, Pipeline processing, No AC needed, Concept of
internet was introduced, Great developments in the fields of networks, Computers became easily
available.

GBHS DSCHANG Page 2


READERS ARE LEADERS
th
e) 5 Generation computers
They are based on artificial intelligence software and are still under process although there are
some applications such as voice recognition and natural languages which are being used today.
The use of parallel processing, quantum computation and molecular combinations make
artificial intelligence a reality. This is to develop devices and software that can respond to
natural language input and be capable of learning and serving organizations.
In the fifth generation, the VLSI technology became ULSI (Ultra Large Scale Integration)
technology, resulting in the production of microprocessor chips having ten million electronic
components.
This generation is based on parallel processing hardware and AI (Artificial Intelligence)
software.

Artificial Intelligence: It is an emerging branch in computer science, which interprets means


and method of making computers think like human beings. All the Higher level languages like
C and C++, Java, .Net etc. are used in this generation.

AI includes: Robotics, Neural networks, Game Playing, Development of expert systems to


make decisions in real life situations, Natural language understanding and generation.

The main features of Fifth Generation are; ULSI technology, Development of true artificial
intelligence, Development of Natural language processing, Advancement in Parallel Processing,
Advancement in Superconductor technology, More user friendly interfaces with multimedia
features, Availability of very powerful and compact computers at cheaper rates.
Some computer types of this generation are; Desktop, Laptop, Note Book, Ultra Book.

2- SIZE and PERFORMANCE


Based on size, performance or cost, computers can be classified as: super computers,
mainframe, midrange and microcomputers.

a) Super computers.
These are the largest, fastest and most expensive (can cost tens of billions of francs CFA)
computers. A typical super computer deals with very large quantities of data and can be used
simultaneously by thousands of people who can be in different offices or towns who have
access to it by mean of devices called terminals. Its speed is measured in floating points per
second (FLOPS). These are mostly used where there is heavy demand for processing speed e.g.
weather forecasting, creation of military weapons research and design, space exploration, space
exploration, aircraft design, oil exploration, etc. and are mostly found in big universities,
research institutions, governmental agencies, and typically use operating systems such as
LINUXUNIX and UNICOS.
.
b) Mainframe computers
This is the second class of largest computers and is similar to super computers in many ways but
is generally smaller, cheaper and slower. They support more simultaneous processes than super
computers even though a typical super computer will perform a single operation faster than it.
Just like super computers, several terminals in different geographical locations can be connected
to a mainframe thus making it possible for hundreds of people to use the computer at the same
time. They are mostly used in banks, insurance companies, airlines, universities and in the
internet as servers. They usually have a speed measured in millions of instructions per second
(MIPS).

GBHS DSCHANG Page 3


READERS ARE LEADERS

Example
If a microprocessor completes 1million instructions in [Link] is the speed of this chip in
MIPS?
Solution
Speed= Number of instructions/Time = 1000000/0.05 = 20,000,000instructions/second
Now in MIPS = 20MIPS.

c) Midrange computers
They are designed to serve tens of people at a time each sitting on a terminal. Although they
may be accessed and used by the above number of users, these users are usually at proximity of
the computers.
d) Microcomputers
These are the smallest, least expensive and slowest type of computers but are however the most
diversified, affordable and least expensive type of computers. They are designed to be used by
one person and are usually called personal computers. A typical microcomputer is
fundamentally implemented with a microprocessor, memory, storage, input and output units.

A COMPUTER TERMINAL is an electronic or electromechanical hardware device that can


be used for entering data into, and displaying data from a computer or computer system. Three
basic types of terminals are 1) Dumb terminal; has no built-in processing capabilities and serves
only to send and receive data. 2) Smart terminal; has limited data processing capabilities and 3)
Intelligent terminal; has substantial data processing capabilities due to in-built processor,
memory and storage

3- Purpose
Here they are grouped as special and general purpose computers.

1) Special purpose computers


Also called embedded computers, it is designed for a particular job only.
2) General purpose computers
Also called jack-of-all trade, it is designed to solve multiple problems/tasks.

4- Based on Data Representation


There are 3 main types which are:
a. Digital computers
It represents information in the form of discrete quantities. E.g. 1, 2, 3, +∞.
b. Analogue computers
They represent data in the form of variable quantities like voltage. Generally, they are very fast
since they can solve a complex question in the time a signal crosses the circuit.
c. Hybrid Computers
This is a computer made by combining features of digital and analogue computers.

GBHS DSCHANG Page 4


READERS ARE LEADERS
CHAPTER 2: APPLICATIONS OF COMPUTER SYSTEMS
Competence;
 Define a system and computer system,
 List components of a computer system,
 Types of computers,
 Uses of computer systems,
 Principal application areas of a computer system.

A System is a collection of parts that work together for a given purpose.


A Computer System is a set of interconnected computers that share a central storage system
and various peripheral devices such as printers, scanners, or routers. A Computer System is
made up of hardware, software and the operator (user). Each computer connected to the system
can operate independently, but has the ability to communicate with other external devices and
computers.

TYPES OF COMPUTER SYSTEMS


Workstations: Workstations are usually desktop computers mainly used for executing numeric
and graphic intensive applications such as CAD, simulating complex systems, visualizing the
results of simulations. They have higher processor speed than that of personal computers and
use sophisticated display screens featuring high resolution color graphics.

Personal Computers (PCs)


They are generally single-user machines with multi-tasking capabilities. Used for lots of tasks
including:
 Running application software such as word processors, spreadsheets, database, etc. etc.
 Accessing the Internet for research work and entertainment.
PCs have the following sub-types;
- Desktop: These are the most familiar type of computer. They come with a CPU housed
in a metal or plastic case with many other components, monitor, keyboard and mouse.
They are either used as standalone machines or connected to a network.
- Laptop computers has the same specification like the Desktop but differs in that they
can carry about easily and run from a battery. Often, they have built in wireless
technology allowing them to connect to network without having to use cables.
- Palmtop computers (sometimes called PDAs (Personal Digital Assistants)) have a touch
sensitive screen and come with a stylus allowing the user to select things through the use
of a screen. Data entry is usually done using handwriting recognition although some
PDAs do have a small keyboard. They can be used to do tasks similar to ones done by
desktop and laptops but more often they are used for note taking, calendars, address
books and a means of sending and receiving email. A palmtop works together with a
desktop or laptop so data can be transferred between computers. This is done using a
cable or using some wireless technology connection like Bluetooth.
- Smart phones: These are mobile phones that offer advanced capabilities with PC-like
functionality. The majority of these devices run on popular OSs such as Android,
Symbian, iOS, Blackberry OS and Windows Mobile.
- Tablet PCs: Designed and developed by Apple, it is a pen-based computer that provides
the screen capabilities of a PDA with the functional capabilities of a notebook or desktop
computer. Uses OSs like those of a smart phone.

GBHS DSCHANG Page 5


READERS ARE LEADERS
Microcontrollers (embedded computers): They consist of a single chip that contains
all of the elements that are essential for a computer. Such elements are the RAM, ROM,
CPU, Input, Output, and System Clock. They are used in telephones, televisions,
camera‘s, washing machines, microwave cookers, cars, planes, trains, jets, rockets,
helicopters, etc. etc.

Server computers: These are computers that are design to provide services to other
computers over a network. They have powerful processors, large memories and hard
drives. Services provided by server computers include:
 Sharing of files across the networks
 Facilitating communication within the terminals in the network
 Authenticating all network users.

Wearable computers: These are wearable devices such as wrist watches, cell phones,
eye glasses and even clothing into which applications have been integrated. These
applications may include: e-mail, database, multimedia, calendar/scheduler, etc. etc.

Mainframe computers

Super computers: Types of super computers Cray Jaguar, IBM Roadrunner and Earth
Simulator.

USES OF COMPUTER SYSTEMS.


A computer is used in all human life. It has revolutionized all phases of human activities. The
most important have been as follows:
• Routine job handling: The routine classical and stenotype jobs calculating and formality bits,
salaries, updating stocks, tax return, reservation records and information.
• Traffic control: Controlling traffic, traffic lights. Television cameras are used to maintain
traffic light routine.
• Electronic money: Automated tellers machine (ATM) is very common in banks. You can
deposit and withdraw money with the ATM.
• Electronic office: All type information are stored, manipulated and utilized in the electronic
form.
A document is sent to different place with FAX, Internet and e-mail.
• Industrial Application: It plays an important role in production control.
• Telephones: With the help of computerized telephones through satellites Subscriber Trunk
Dialing (STD) and Inter Switch Trunk (IST) services have been introduced. It maintains the
record of calls and does the billing for you.
• Trade: Every type of trade a computer is used successfully. It is used in Banks, stock
exchanges to control stocks and accounts, etc.
• Scientific research: In every science, the research work becomes economical from time,
energy, money point of new, large data is analyzed very quickly.
• Space Science: The satellite controlled in space is with the help of computer. The
information‘s are collected by using the computer from the space satellite.

GBHS DSCHANG Page 6


READERS ARE LEADERS
• Publication: The composing work is done speedily and economical with the help of computer.
The designing work is also done by computer. The quality is maintained so is publication by the
use of computer.
• Communications: The computer is used for calling and sending messages e.g. VOIP, FAX,
and E-Mail through the Internet.
• Film industry: It had influenced film industry such as animation; titling etc. The multimedia
approach is used in film production with the help of computer. The cartoon films are developed
by computers.
• Military: Computers are largely used in defense. Military also employs computerized control
systems. Some military areas where a computer has been used are: Modern tanks weapons,
Missile Control, Military Communication, Military Operation and Planning, Smart Weapons.
• Health Care: Computers have become important part in hospitals, labs, and dispensaries. The
computers are being used in hospitals to keep the record of patients and medicines. It is also
used in scanning and diagnosing different diseases. ECG, EEG, Ultrasounds and CT Scans etc.,
are also done by computerized machines. Some major fields of health care in which computers
are used are;
Diagnostic System - Computers are used to collect data and identify cause of illness.
Lab-diagnostic System - All tests can be done and reports are prepared by computer.
Patient Monitoring System - These are used to check patient's signs for abnormality such as in
Cardiac Arrest, ECG etc.
Pharmacy Information System - Computer checks Drug-Labels, Expiry dates, harmful drug‘s
side effects etc.
Surgery - Nowadays, computers are also used in performing surgery.

• Government: Computers play an important role in government. Some major fields in this
category are: Payment of government agents, Budgets, Sales tax department, Income tax
department, Male/Female ratio, Computerization of voters‘ lists, and Computerization of
driving licensing system.
• Education: The computer is widely used in the field of education and an independent study
field of computer science has developed which is so popular these days. At every stage, a
computer is compulsory in one way or another. The distance (online) education is using
computer for instructional purpose as multimedia approach. The computer makes teacher
learning process effecting by involving audio and visual sense of learners. The computer
provides a tool in the education system known as CBE Computer Based Education. CBE
involves control, delivery, and evaluation of learning.

PRINCIPAL APPLICATIONS OF COMPUTER SYSTEMS


Communication and information systems
Communication system is a collection of individual communications networks, transmission
systems, relay stations, tributary stations, and Data Terminal Equipment (DTE) usually capable
of interconnection and interoperation to form an integrated whole.

An information system is a collection of hardware, software, data, people and procedures that
are designed to generate information that supports the day-to-day, short-range, and long-range
activities of users in an organization.
Examples of communication and information systems

GBHS DSCHANG Page 7


READERS ARE LEADERS
• They can use telephone-related services, such as fax, voice-mail and e-mail.
• Thy can do teleconferencing and videoconferencing.
• Thy can use online services for studies, research, e-mail, games, travel services and
teleshopping.
• Thy can connect with the Internet and the Web for almost any activity imaginable. Information
retrieval online databases, encyclopedias, dictionaries, bus timetables, etc.

Computers in Office Applications


Office Automation
Office automation is the use of hardware, software and networks to enhance general office
works such as communication among employees, and documents typing and filing or
combination of various technologies to reduce the manual labor required in operating an
efficient office environment. These technologies include voice mail, email, scheduling software,
desktop publishing, word processing, fax, and so on. OAs are used throughout all levels of an
organization. The backbone of office automation is a network.

Home base communication


Games
The single biggest use of PC (personal computer) within the home (along with accessing the
Internet) is for playing games. The capabilities of the PC have been greatly enhanced over the
years and today‘s games bear very little resemblance to the early ―Space Invader‖ and ―Ping
Pong‖ type games. In fact, many PC manufactures configure PCs with games in mind. Apart
from PCs, there are computers which are built specifically for game playing; these include
―Dreamcast‖, ―Nintendo 64‖ and ―PlayStation‖. These are game consoles rather than general-
purpose computers.
Home working
If you have a computer at your home, linked to the office via a modem, there is often little real
need to travel to the office. Many people find that working at home is more productive, and
often far less stressful than fighting your way through the commuters into a large city. Many
sales people rarely see their head office as they communicate with their companies via phone
calls or e-mails. The rise of the Internet and e-mail has been accompanied with a rise in what is
called ―home working‖. If you consider the cost of office space, lighting, heating, compared
with the small initial cost of setting up part of the workforce at home with a computer and
telecom equipment, and then companies can make substantial cost savings.

The Internet
The Internet is a global collection of many types of computers and computer networks that are
linked together. The Internet is a mixture of many services with the two most commonly used
being electronic mail (e-mail) and the World Wide Web (www). It plays a significant role in
education, health, political processes, agriculture, economy, businesses and newsgroups.
Electronic mail (E-mail)
E-mail is a way of sending an electronic letter or message between individuals or groups of
persons over the Internet using smart phones, computer tablets or computers.

GBHS DSCHANG Page 8


READERS ARE LEADERS
COMMERCIAL AND GENERAL DATA PROCESSING SYSTEM
These are often batch-processing systems involving data being collected over a period of time,
and then processed later. The collected data is stored in a transaction file, and this is used to
update the master file to give a new master file.
Examples of commercial and general data processing:
• Banking systems i.e. bank accounts are updated based on daily transactions.
• Personnel records employee‘s pay is calculated based on hours worked.
• Stock control when items are ordered /sent / received, the stock is updated.
• Order processing and received orders are dealt with.

FUNCTIONS OF COMMERCIAL AND GENERAL DATA PROCESSING SYSTEM


Banking system
Electronic banking uses computers to carry out transfers of money. For example, automated
teller machines (ATMs) enable bank customers to withdraw money from their checking or
savings accounts by inserting an ATM card and a private electronic code into an ATM 24/7 in
your home country and abroad. Some Banks also offer debit cards that directly withdraw funds
from a customer‘s account for the amount of a purchase, much like writing a check. Many banks
also use the Internet to enable customers to pay bills, move money between accounts, and
perform other banking functions.
Stock control
Using a stock control application, a supermarket can have more efficient and effective control of
stock. By inputting the necessary information (the name of an item; its expire date; the amount
of stock bought and on which date; how many units of the item were sold etc.), the owner can
quickly get information regarding the stock in the form of reports.
• Automatically issue a warning when the stock levels of an item have dropped to a predefined
level. The application can also be setup to print an order form for the purchase of the item.
• Warn the owner when the expiry date of an item is nearing. A user can easily get statistics on
the sale of an item – to consider whether it is worth purchasing any more.
• Checking the levels of stock at the end of the year (what is known as stock taking) can be
much more detailed and obtained more rapidly.

INDUSTRIAL, TECHNICAL AND SCIENTIFIC USES OF COMPUTER SYSTEMS


In the case of CAD systems, products can be designed and tested completely within the
computer‘s memory. In forecasting systems, predictions are made about the future based on
previous data, and a model of how the system works.
• Weather Forecasting i.e. trying to predict weather, taking data from sensors, using computer
models of weather systems
Functions of industrial, technical and scientific uses of computer systems
Computers in Industrial Applications
Although drafting tables and T-squares are still around, more and more engineers and architects
are designing products with computers. In this unit, we will introduce the use of computers in
design, manufacturing and transportation.

Computer-Aided Design (CAD) is a term that refers to the use of computers and graphics-
oriented software to aid in the design process. It is use to design objects that can be designed,
altered and tested within the computer prior to manufacture. CAD systems allow engineers to

GBHS DSCHANG Page 9


READERS ARE LEADERS
create two-dimensional (2D) or three-dimensional (3D) electronic objects. They also enable the
designers to view the objects from different perspectives.
Computer Aided Manufacturer (CAM) is the entire process of getting computers to aid
many or all of the stages in a production process. It is done by using a variety of machine tools
or robots.
Example uses of CAD
• Vehicle design, Air jets design, Fighter Jets design (military), Trains, Clothes, etc. etc.
• Building design, Mansions designs, Bridges, etc. etc.
Advantages of a CAD system
• It allows a designer to modify the design more easily than traditional manual drafting.
• It allows a designer to view the object from different perspectives. Hence, the designer does
not need to produce a different drawing for each view.
• It allows a designer to change the size of the object.
• It reduces the design time.

Computer Integrated Manufacturing


Computer-integrated manufacturing (CIM) is the manufacturing approach of using computers to
control the entire production process. It is the total integration of computer-aided design and
computer-aided manufacturing. The computers that design the products are linked directly to the
computers that aid the manufacturing process.

TRANSPORTATION SYSTEMS
Traffic lights control: In order to optimize a traffic flow, a computer system can be used to
coordinate the signal timings of the adjacent traffic lights in a district. The system can monitor
the traffic flows in real time by collecting traffic flow data from different traffic sensors placed
at various locations. Based on the current traffic flow situation, the system will send signal
control instructions to the traffic lights to adjust their signal timings in order to minimize delays
and reduce stopping time e.g. Train scheduling.

COMPUTERS IN SCIENTIFIC APPLICATIONS


Computers are used extensively in science. For example, meteorologists use computers to study
the formation of tornadoes. Computers can also be used to simulate automobile accidents on
screen. In this unit, we will introduce the use of computers in modeling and simulation, and
weather forecasting.
Modeling: Computer modeling is the use of computers to create abstract models of real life
objects, organisms, situations, or systems for the purpose of simulating (representing the
behavior and response of) a wide range of systems and prototypes. A computer model (or
mathematical model) is not static; you can feed data in and examine how it behaves under
certain conditions. Other types of models are static like wooden models.
Example of modeling: A financial manager can create a spreadsheet to project the profit and
losses of his company.
Simulation: Computer simulation refers to the use of computers to execute a model to represent
the dynamic behavior of objects or systems in response to conditions that cannot be easily or
safely applied in real life. It uses a program called computer simulator to simulate. It could be
the effect of wind on a sky scrapper, heart surgery, train pilots, etc. etc. It is represented by a
computer program that gives information about the object, situation or system being examined.

GBHS DSCHANG Page 10


READERS ARE LEADERS
It is very useful in engineering, physics, biology, chemistry to get details about the operation of
the system.
Computer simulation is practically applicable in many contexts such as:
- Flight simulators to train pilots
- Design of complex systems such as aircraft and logistics systems
- Weather forecasting
- Forecasting of prices on financial markets
- Behavior of structures such as buildings and industrial parts under stress conditions
- Design of industrial processes such as chemical processing plants.
Advantages of computer modeling and simulation
• It is much cheaper to use a simulator to train pilots rather than using the real planes or ships.
• Some demonstrations or experiments are too dangerous to be conducted. A simulation is an
alternative.
• Computer simulations can serve as a time machine for exploring the future. For example, it
could take the biologists many years to study whether the rising tiger population in a forest
threatens other animals. A computer model of the forest would speed up the biological
processes, and the biologists can study their effects over several generations in a few minutes.
• In many cases, the experiments are required to repeat with different conditions. Replication on
a computer model is simple and requires just a matter of changing some input data and running
a new simulation.
• In some experimental simulations, users can control the speed of the simulated motion or
process. This facilitates users to see and understand the relationships.
Weather forecasting
Because the data on weather is so complex, it is fed into a computer to be analyzed. Faster
computers are being used to run more sophisticated forecast models analyzing more precise
kinds of weather data collected from a greater variety of sources. Mostly done with a super
computer.

COMPUTERS SYSTEMS IN AUTOMATION, CONTROL SYSTEMS, EMBEDDED


SYSTEMS AND ROBOTICS
Automation is the use of machines, control systems and information technologies to optimize
productivity in the production of goods and delivery of services.
A control system is a device, or set of devices to manage, command, direct or regulate the
behavior of other device(s) or system(s).

Embedded System
As seen above on page 06.

Robotics
The use of computers to control other mechanical devices through some sort of interface which
allows the computer to receive data from input sensors and to control output devices such as
motors. Robots are used to perform tasks done traditionally by human beings.
Examples and functions of Automation and Robotics
• Domestic automation: washing machines, microwaves, etc.
• Automatic navigation: aircraft ships, cars (GSM satellite navigation)
• Industrial robots are used to work on manufacturing lines and can work non-stop, 24 hours a

GBHS DSCHANG Page 11


READERS ARE LEADERS
day, 365 days a year. Can work in hazardous areas.

Monitoring and Control Systems.


A computer is used to monitor a system through the use of sensors (such as light, heat, smoke,
etc.) The computer can then operate devices to control the system (such as pumps, valves, etc.).
Monitoring hospital patient‘s checks heart rate, setting of an alarm if there is fire/heat. Nuclear
power station control monitors temperature and adjusts coolant. Traffic survey and control
checks the number of cars, alters traffic light timings.

Expert Systems and Artificial Intelligence


An Expert System is a computer application that solves complicated problems that would
otherwise require extensive human expertise.
Artificial Intelligence (AI) is the attempt to simulate the human brain and its thought processes
using computer hardware and software.
Expert systems use AI techniques to replace a human expert. All of the human‘s knowledge on
a subject is entered into the computer as a series of rules. E.g.
• Medical diagnosis data is fed into the system, and questions are answered. The expert system
rules then come up with the best diagnosis (usually with a % confidence level).
• Speech recognition checks voice patterns to determine what was spoken.

COMPUTING APPLICATIONS IN THE ARTS AND THE MEDIA ENTERTAINMENT


Music and Movie-making is a form of artwork and in addition to being associated with
entertainment.
In the arts and design, computers are used:
- For producing music (composing and editing) using editing software‘s like Goldwave,
Fleximusic and Cool Edit Pro.
- For producing movies (shooting and editing).
- For producing static or dynamic images (computer-generated imagery, CGI). Static
images could be pictures on newspapers or in books; while dynamic images could be
animations, simulations, etc… CGI can be categorized into several different types: 2D,
3D, 4D, 7D and animated graphics.
In entertainment computers are used;
- For producing music and movies.
- For playing-back music and playing-back movies.
- For recording sports events.
- For playing-back recorded sports events.
- For playing games e.g. online games, desktop games, etc.

Animation
Animation is the rapid display of a series of images in order to create an illusion of movement.
Stop motion animation (or frame-by-frame) is an animation technique where the artist
maneuvers real-world objects and photographs them one at a time. A computer is then used to
combine the photos in a series, thereby creating an illusion of movement. Cartoons are produced
through animation.

GBHS DSCHANG Page 12


READERS ARE LEADERS
Clay motion is a form of stop-motion animation in which each object is sculpted in clay or a
similarly pliable material such as plasticine.

Motion Capture
Motion capture (mocap) is the process of recording a live motion event and translating it into
actionable data that allows for a 3D recreation of the performance. In film making, motion
capture is used to film an actor‘s movements which are turned into 3D movements, and then
mapped to an avatar.

CHAPTER 3: SOCIAL, LEGAL, ETHICAL AND ECONOMIC IMPLICATIONS OF


THE USE OF COMPUTERS.

Competence
In addition to knowledge about applications, you should be able to demonstrate broad
knowledge of the following;
- Economic reasons for using computers and the effects of their use across a range of
application areas,
- They should be able to formulate a reasoned view of the potential effects of any
suggested application or development and show their critical abilities in balancing the
advantages and disadvantages of a computerized system,
- They should be able to discuss the ethical and moral obligations of the users and
managers of computerized information systems,
- Candidates should be able to discuss the impact of global communications upon the
concept of citizenship and the effects it has on cultural issues.

Introduction
It is important to note that in as much as the computer is a very vital tool for every daily use; it
can also be a very harmful tool if poorly used. For this reason, users must ensure that they
follow health measures and apply safety precautions as they use the computer.

Social and Economic Impacts of Computers


The widespread use of computers has affected people and organizations in many ways.
Information Technology has completely broken distance and time barriers, transforming the
world into a global village that is a community whereby communication on a world scale has
been reduce to communication on a village scale. Information Technology which is the
embodiment of computer technology, communication technology, and digital technology has
given rise to phenomena like information society, digital revolution, digital economy, and
information age.
- Information society: it is a society in which the acquisition, manipulation, and
distribution of information plays a central role in most sectors of life (e.g. social,
cultural, economic, and political). Such a society is usually integrated by complex
communication networks.
- Digital revolution: it is the marking feature of the information age.
- Digital economy is a term for all the economic processes, transactions, interactions, and
activities that are based on digital technologies mainly the computer. These activities
could be carried with or without the use of Internet connectivity.

GBHS DSCHANG Page 13


READERS ARE LEADERS
- Information age: it is the name given to the present era in which we live. This era
began when digital computers and related technologies were developed in the second-
half of the 20th century.
These computers or computer-related technologies take up new roles in various forms. Some
people say these technologies have made life easier and more convenient. Others say they have
made life more complex and stressful. Some of the impacts of computers include:

POSITVE IMPACTS
ICT has impacted the world positively in several ways. The following are some of the benefits
of ICT to mankind:
1. Fostering of globalization: ICT has allowed different regions of the world not only to
interact with one another but also to be interdependent on one another. These regions
share information quickly and efficiently in many different areas, for example,
governments, education, technology, commerce, medicine, and culture.
2. Cost effectiveness of businesses: the computerization of business processes has
rendered the business more cost effective.
3. Faster and cheaper communication: with the help of ICT, communication has also
become faster, cheaper, and more efficient.
4. Job creation: one of the greatest advantages of IT is the creation of new and
interesting jobs. Database administration, computer programmers, system analysts,
hardware developers, software developers, web designers, and computer technicians,
etc. etc.
5. Unlimited working hours: it is now possible with the help of ICT for companies all
round the world to open their doors all day making purchase from other parts of the
world easier and more convenient.
6. Faster and easier operation on data: a computer allows a user to manipulate data
easily and quickly for example downloading information from the Internet, sending
text and images over the Internet.
7. Broader market for sellers and buyers, faster and less-problematic bookings,
advancement of science and technology, improvement of security systems.
NEGATIVE IMPACTS
1. Unemployment and Reliability is not guaranteed i.e. some jobs are now done by
computer systems and insecurity like privacy concerns, phone call interceptions, e-
mail hacking, stealing of personal information, etc. etc.
2. Dominant culture: ICT has contributed to some cultures dominating others. The
United States for example is a country whose culture is known to influence cultures
in other countries. Languages too have become overshadowed with English
becoming the principal communication language for business and many other
things.
3. Health problems: extended use of computers may cause finger and eyesight
disorders such as repetitive strain injury (RSI) and carpal tunnel syndrome (CTS).
RSI refers to an injury to muscles and tendons caused by continuous repetitive use
of particular muscles especially by using a keyboard. CTS refers to a painful
disorder caused by compression of a nerve in the carpal tunnel; characterized by
discomfort and weakness in the hands and fingers and by sensations of burning or
numbness. Other examples of ICT-related health problems are: visual strain,
headache etc.
4. Lack of human abilities: computers are unable to reason, learn, or decide. They
cannot understand and don‘t have emotions. They cannot adapt to unexpected
circumstances. Consequently, they are incapable of doing some of the things that
human beings would normally do.

GBHS DSCHANG Page 14


READERS ARE LEADERS
5. Addiction: games, chat rooms, search engines, shopping sites that can keep users
occupied for hours and days have cause some people to forgo their basic daily
duties because of their strong commitment to these exciting Internet services.
6. Electronic waste (E-waste): computer and related devices usually generate e-waste.
E-waste is the collective name for all electronic devices that are no longer useful as
originally indented. E.g. computers, TV, DVD players, photocopiers are examples
of e-waste. These wastes can be recycled. It is the fastest growing segments of the
world‘s waste stream.
7. Digital divide: the use of IT widens the gap between the developed (rich) countries
and the developing (poor) countries. Many developing countries do not have the
expertise or the money to invest on IT and these countries consequently tend to
become poorer and poorer. Rich countries on the other hand become richer and
richer. Hence IT fosters digital divide.

A - Health and Safety.


1 - Health Measures
Studies have suggested that long periods of typing, poor computer setup, poor working habits
and stressful work conditions may cause health problems.

Ergonomics: Ergonomics is the science that studies how workers interact with their work
environment. Proper ergonomics means designing objects in the workplace that provides a
correct match between the human body, work-related tasks, and work tools such as chairs to
provide safety and comfort for the worker. Ergonomics is alternatively called Human
Engineering. Ergonomic principles helps reduce stress and eliminate many potential injuries
and disorders associated with the overuse of muscles, bad posture, and repeated tasks. This is
accomplished by designing tasks, work spaces, controls, displays, tools, lighting and equipment
to fit the employee‘s physical capabilities and limitations.
Once on the computer, the user should be able to identify certain signs and know what to do
immediately to avoid a health problem.

 The signs of these problems can occur in the hands, wrists, arms, shoulders, neck or back
and can include the following;
- Numbness, burning or tingling of the fingers
- Soreness, aching or tenderness
- Pain or swelling
- Tightness or stiffness
- Weakness or coldness
 Symptoms may be felt during typing, when using a mouse, or at other times when no work
with the hands is being performed especially at night when these symptoms might awaken
you.
 The main risks associated with using the computer include the following;
- Musculoskeletal Problems: These are general problems that range from general aches
and pain to more serious problems like upper limb disorders, back and neck pain and
discomfort, tension, stress and headaches.
- Eye Strain: This comprises problems related to seeing correctly like visual fatigue,
blurred or double vision, burning and watery eyes.
Problems and Possible Remedies for Visual Display Unit (VDU) Users
The VDU or the screen is known to be the main equipment that creates a lot of health problems
to its users. Below are some problems and their possible remedies.

GBHS DSCHANG Page 15


READERS ARE LEADERS
Problems Possible Remedies
1. Eyestrain caused by glare -Avoid setting up your VDU in a brightly lit area where light reflects
and reflection from the screen. on the screen.
- Do not look directly at windows or bright lights.
- Use an anti-glare screen filter.
2. Stress caused by boredom - Vary your activity.
and slow computer response
time.
3. Posture Fatigue. - Use adjustable chairs.
- Adopt a comfortable and relaxed keying position.
4. Screen Flicker. - Do regular servicing to correct errors.

[Link] working - Ensure that there is adequate space.


environment - Make provision for the circulation of fresh air because the electric
- Space. equipment may dry air.
-Ventilation, Light and Heat. - Use a sound proof.
- Noise.

2 - Safety Precautions
The following are guides to be respected when using your computer;
- Set up or connect your equipment according to the instructions provided by the supplier or
manufacturer. For example, always be sure that the computer is switched off and disconnected
from the main electrical supply once you have stopped working on.
- Make sure that your working room has sufficient light.
- Fit in your devices and CD-ROMs correctly because that which is wrongly fitted may
vibrate and get destroyed.
- It is important to look away from the screen from time to time and focus your eyes on a
distant object to avoid eye strain.
- Before you start working, do the following;
 Adjust the position of the screen, the keyboard, the mouse and the documents you
are working with so as to sit comfortably.
 Keep your upper body as relaxed as possible and don‘t over stretch your wrists and
fingers. As a general guide, your forearm should be roughly horizontal and your
elbows level with the keyboard or the mouse.
 If your feet don‘t reach the floor when you are sitting in a good position, try to use a
foot rest.
 Use a document holder when typing from a manuscript.
- Make alternating work tasks. That means that after a short while on the computer leave it
and do other things.
- Regularly stretch up to relax your body.
- Avoid gripping your mouse too tightly (hold your mouse lightly and click gently).
- Be familiar with keyboard short cuts for applications you regularly use to avoid over using
the mouse.
- Your chair should;
 Support the back,
 Allow chair height to be adjusted from a sitting position,
 Be 18 to 30 inches away from the screen when you are seated.
Your table or desk should;
 Provide sufficient leg room and preferably be height adjustable,
 Have enough room to support the computer equipment and space for documents,
 Be at least 900mm deep,

GBHS DSCHANG Page 16


READERS ARE LEADERS
 Have rounded corners and edges.
To avoid eyestrain take the following precautions;
 Exercise your eyes periodically focusing on objects at different distances,
 Blink regularly,
 Position the monitor to avoid glare,
 Keep your monitor clean,
 Service, repair or replace monitor that flicker.
To ensure about electrical safety, do not be tempted to add too many extension cables to your
existing electrical sockets.
B - Computer Security.
Computer security is the process of preventing and detecting the unauthorized use of computer
systems from accidental or intentional harm by unauthorized users. Prevention helps stop
unauthorized users from accessing any part of the computer system by controlling access to the
system, while detection helps determine whether or not someone attempted to break into the
system, if they were successful, and what they may have done. Computer security has three
main goals, confidentiality, integrity and availability, which can be conveniently summarized
by the acronym "CIA":
 Confidentiality ensures that information is not accessed by unauthorized persons.
 Integrity ensures that information is not altered by unauthorized persons in a way that is
not detectable by authorized users.
 Availability ensures that the system is running and reachable.
Different mechanisms are used to ensure the security of computer systems.
B.1. Authentication
Authentication is the process of determining if someone is who they declare to be. Three basic
authentication strategies are:
 something the user knows (password)
 something the user has (smartcard)
 something the user is (biometrics)
a. Passwords
When authentication is done through the use of a password, knowledge of the password is
assumed to guarantee that the user is authentic. Passwords can be guessed or "cracked" and so if
you are using a password to protect your system, the following guidelines will help make them
more secure:
o Keep your password secret.
o Change your password regularly.
o Make your password at least eight characters long.
o Do not use proper words of phrases - these can be found using a dictionary cracker.
o Use a mixture of upper and lower case letters and numbers.
o They should be different for each system that is used.
o The number of attempts to enter a correct password should be limited so as to frustrate
intruders or hackers.
b. Smart Card
A smart card is a small card that holds user authentication information. When the card is
inserted into a card reader, electrical fingers wipe against the card. The information in the card
is read and used to authenticate the person. Cards can be stolen and so are not as reliable as
biometrics.
c. Biometric
Biometrics is the science and technology of measuring and analyzing biological data. In
computer security, biometrics refers to the use of measurable biological characteristics such as
fingerprints, eye retinas, iris patterns, facial patterns, voice patterns or hand measurements, to
identify a person. It is the safest authentication technique.

GBHS DSCHANG Page 17


READERS ARE LEADERS
B.2. Encryption
Encryption is the process of transforming data or information using an algorithm into a form
unreadable by anyone except the intended recipient. The original message is known as plaintext,
the algorithm is cipher and the encrypted text is the cipher text. To read an encrypted data, one
must have access to a secret key or password that enables you to decrypt it. The original data is
known as plain text, the algorithm is cipher and the encrypted data is cipher text. The reverse
process is referred to as decryption.

B.3. Firewall
A firewall is a computer, program or a device designed to prevent unauthorized access to or
from a private network. Firewalls are implemented in either hardware or software form, or a
combination of both. They prevent unauthorized Internet users from accessing private networks
connected to the Internet. All messages entering or leaving the network must pass through the
firewall which examines each message and blocks those that do not meet the specified security
criteria. Some Operating Systems like Windows XP, 7 and Mac OS X, have built-in firewalls.
B.4. Intrusion Detection
Intrusion detection is the art and science of sensing when a system or network is being used
inappropriately or without authorization. An intrusion-detection system (IDS) monitors system
and network resources and activities and, using information gathered from these sources,
notifies the authorities when it identifies a possible intrusion.
B.5. Digital Signatures
A digital signature is basically a way to ensure that an electronic document is authentic.
Authentic means that you know who created the document, and you know that it has not been
altered in any way since that person created it. A digital signature is a computed digest of the
text that is encrypted and sent with the text message. The recipient decrypts the signature and
compares it with the received text. If they match, the message is authenticated and proved intact
from the sender.

PHYSICAL SECURITY
Physical security measures are tangible defenses that can protect your facility, equipment, and
information from theft, tampering, careless misuse, and natural disasters. In some ways,
physical security is the easiest and the most rewarding type of security. The following are some
hazard and basic measures to prevent or protect your system.
Thieves
Your computer should be in the room or office that has locks and alarms so only authorized
people can get access to it to prevent your storage media or the hole computer from thieve.
Fire and smoke
 Install smoke detectors near your equipment and check them periodically.
 Keep fire extinguishers in and near your and be sure that everyone knows they are there.
Climate
 Keep all rooms containing computers at reasonable temperatures (approximately 50-80
degrees Fahrenheit or 10-26 degrees Celsius) and keep the humidity level at 20-80
percent.
 Install gauges and alarms that warn you if the temperature or humidity is getting out of
range.
Water
 If your computer does get wet, let it dry thoroughly before you attempt to turn it on
again.
 Remember that the presence of water increases the likelihood of electrical shock. Use
greater caution in the case of flooding emergencies in equipment areas of a smoke alarm.
 Install a water sensor where appropriate. Simple ones are available for the price
Electricity
 Your computer will suffer if it gets too much or too little electricity.

GBHS DSCHANG Page 18


READERS ARE LEADERS
 For best results, install an uninterruptible power supply (UPS). It will absorb surges and
provide extra voltage during brownouts, and if power fails completely blackout, it will
provide power until you're able to shut down the system. Note that surge protection
won't work unless your electrical system is well grounded.

C – COMPUTER CRIME AND MEASURES TO COMBAT THEM.


A computer crime is any illegal act that involves the computer either as the target of the crime
or as a tool used in committing the crime. When the computer is the target of the criminal act,
the crime is said to be a computer-related crime (CRC). When the computer is a tool used to
commit the crime, the crime is referred to as a computer-assisted crime (CAC).
C.1. Types of Computer Crimes
 Identity Theft
Identity theft is the crime of impersonation. It is a form of fraud in which someone pretends to
be someone else by assuming that person's identity, typically in order to access resources or
obtain credit and other benefits in that person's name.
 Phishing
Phishing is the criminally fraudulent process of acquiring or attempting to acquire sensitive
information such as usernames, passwords and credit card details by masquerading as a
trustworthy entity in an electronic communication.
 Software piracy
This is the illegal (unauthorized) reproduction of copyrighted or patented software for personal
use, for sale or free distribution. It is the most widely practiced type of computer crime.
 Malware Attacks
Malware attacks include but are not limited to computer virus, worms, and Trojan horse,
spyware and logic bombs.
o Virus: it is a computer program that can copy itself and infect a computer where it
destroys files and disrupts the operation of the computer. A virus can spread from one computer
to another (in some form of executable code) when its host is taken to the target computer.
o Worm: it is a self-replicating malicious program which uses a computer network to send
copies of it to other computers (nodes) on the network and it may do so without any user
intervention. Unlike a virus, it does not need to attach itself to an existing program. Worms
cause harm to the network by consuming bandwidth whereas viruses corrupt or modify files on
a targeted computer.
o Trojan horse: it is malware that appears to perform a desirable function for the user
prior to run or install but instead facilitates unauthorized access of the user's computer system.
Once a Trojan horse has been installed on a target computer system, a hacker may have access
to the computer remotely and perform various operations, limited by user privileges on the
target computer system and the design of the Trojan horse.
o Spyware: is software that monitors a computer user‘s activity without their knowledge
and reports it to a central location. The purpose of spyware ranges from purportedly benign
(enforcing copyrights, displaying targeted advertisements) to very malicious (stealing passwords
and credit card numbers).The most common way to get spyware on your computer is to install it
yourself when you are tricked into installing free software.
o Logic bomb: also known as slag code, is a piece of computer code that executes a
malicious task such as clearing a hard drive or deleting specific files, when it is triggered by a
specific event. It is secretly inserted into the code of a computer's existing software, where it lies
dormant until that event occurs. This event may be a specific date and time or failure to input a
command at a certain time.
o Software Key loggers: Is software that record keystrokes entered by a user, usually to
secretly monitor and/or maliciously use this information. They can record instant messages,
email, passwords and any other information you type at any time using your keyboard. Software
key loggers may also be embedded in spyware, allowing your information to be transmitted to
an unknown third party over the Internet.

GBHS DSCHANG Page 19


READERS ARE LEADERS
 Denial or Degradation of Service (DoS) Attack: is an attack to a computer system that
puts it out of action by overloading it with data in a way that the system was never prepared to
handle. A DoS attack makes the system unavailable to its intended users. A distributed denial-
of-service (DDoS) attack is one in which a multitude of compromised systems attack a single
target, thereby causing denial of service for users of the targeted system.
 Social Engineering: it refers to a non-technical kind of intrusion that relies heavily on
human interaction and often involves tricking other people to break normal security procedures.
A person using social engineering to break into a computer network might try to gain the
confidence of an authorized user and get them to reveal information that compromises the
network's security. Social engineers often rely on the natural helpfulness of people as well as on
their weaknesses.
 Cyber stalking Cyber bullying: is a crime in which the attacker harasses a victim using
electronic communication, such as e-mail or instant messaging (IM), or messages posted to a
web site or a discussion group. Cyber stalking messages differ from ordinary spam in that a
cyber-stalker targets a specific victim with often threatening messages, while the spammer
targets a multitude of recipients with simply annoying messages.
 Cyber terrorism: Cyber terrorism can be defined as an act of terrorism committed
through the use of cyberspace or computer resources. As such, a simple propaganda in the
Internet, that there will be bomb attacks during the holidays can be considered cyber terrorism.
 Spamming: This is the act of sending unwanted bulk of e-mail for commercial purposes.
Other types of computer crime are: scamming, theft of computer equipment, pharming,
spoofing, social engineering and phreaking.
 Scamming: It the act of using Internet services or software with Internet access to
defraud victims or to otherwise take advantage of them. The scam is carried out by
compromising legitimate business e-mail accounts through social engineering or computer
intrusion techniques to conduct unauthorized transfer of funds.
 Hacking: It is an attempt to exploit a computer system or private network inside a
computer. Simply put, it is the unauthorized access to or control over computer network security
systems for illicit purpose. Using Marc Goodman‘s UPDATE acronym which means Update
regularly, Passwords use not be reuse, Download from authorized sources, Administrator‘
shouldn‘t be your default setting, Turn off when you‘re done and Encrypt to keep your stuff
unreadable.
Ethical hacking is identifying weakness in computer systems and/or computer networks and
coming with countermeasures that protect the weaknesses. Ethical hackers must abide by the
following rules; get written permission, protect privacy of the organization been hacked,
transparently report and inform identified weaknesses.
- White hat professionals hack to check their own security systems to make it more
hack-proof. They are part of the same organization.
- Black hat hackers hack to take control over the system for personal gains. They
can destroy, steal or even prevent authorized users from accessing the system.
- Grey hat hackers comprise curious people who have just about enough computer
language skills to enable them to hack a system to locate potential loopholes in the
network security system.

C.2. Measures to Combat Computer Crimes


 Install strong doors and locks to computer rooms to prevent computer equipment theft.
 Use access control mechanisms that will ensure confidentiality, integrity and
availability.
 Encrypt confidential data stored in computers or transmitted over communication
networks.
 Install anti-virus software and update them regularly.
 Install intrusion detection systems to help detect any unauthorized access to the system.

GBHS DSCHANG Page 20


READERS ARE LEADERS
 Install firewalls to prevent unauthorized access to local networks.

D – COMPUTER OCCUPATIONS
Computers and information technology (IT) touch nearly every aspect of modern life. IT can
help with such diverse tasks as driving motor vehicles and diagnosing diseases. It enables
seamless integration and communication between businesses anywhere in the world. To keep it
systems running, a large workforce is needed to maintain networks, create new software, and
ensure information security. In addition, the proliferation of smart phones has given rise to a
new ―app economy,‖ in which new employment opportunities are available for workers who
create the programs that run on mobile devices.

The invention and evolution of the computer resulted in millions of new types of computer
related jobs. From those who enter data into the computer to those who maintain the largest
computer systems, there continue to be a worldwide demand for workers who are trained to play
a role in the development and use of Information Technology.
With an ever expanding business needs, a wide variety of career opportunities are available in
computing and mainly being categorized under two heads: Hardware and Software.

A. HARDWARE
1. Computer Engineers: These are professionals who apply the theories and principles of
science and mathematics to design hardware, software, networks, and processes which can
be used to solve technical problems. They usually have training in electrical and electronic
engineering.
2. Network Engineer: The main responsibility of a network engineer is to design and
implement computer network. They focus on the design and planning rather than on the
day-to-day support.
3. Computer repair technician: This is a professional who is skilled in assembling,
repairing, and maintaining computers, printers, and other peripheral equipment‘s.
Otherwise called computer repairers they also help in the installation of software.
4. Hardware Engineer: Engineers that configure hardware of computers, improve layout
and design of devices for increase efficiency.

B. SOFTWARE
5. Software Engineers: Software engineers or software developers working in applications
development analyze users‘ needs and design, create, and modify general computer
applications software or specialized utility programmers.
6. Those involved with the systems software may research, design, and test operating system
software, compilers, network distribution software.
7. Computer Scientist: These are professionals who design computers and the software that
runs them. They also develop Information Technologies and principles for applying
computers to new uses.
8. Computer Programmer or Software Developer: These are computer scientist who
write, test, and maintain the detailed instructions called programs or software‘s that
computers must follow to perform their functions. There are behind all the software we
use today from Facebook to online banking programs and everything between them.
Programmers are of two broad types:
 Applications programmers: They usually focus on business, engineering, or science.
They write software to handle a specific job they may also revise existing packaged
software.
 Systems Programmers: The Computer Systems software such as Operating System,
Compilers etc. are maintained and controlled by them.
9. Database Administrator: These are scientist responsible for the development of an
organizations data making sure all the data is accurate, available and secure. Database

GBHS DSCHANG Page 21


READERS ARE LEADERS
Specialists design, install, update, modify, maintain, and repair computer
databases.
Duties may include:
• Providing technical support for existing databases.
• Modifying existing databases.
• Customizing commercial databases for specific needs.
• Planning and designing databases for new clients.
• Solving problems to meet the needs of clients.
• Programming databases for a wide variety of applications.
• Overseeing the installation of new databases.
• Training staff in client companies about the use of new or existing databases.
10. IT Consultant: These are those who will make a company‘s computer system run better
and efficiently. They are of very high demand.
11. Content Development: Content typically includes product descriptions, basic operations
and field applications, installation and configuration, alignment procedures, maintenance
and system performance information. Content developers write, edit, shape, and aggregate
information. They are responsible for producing high quality, comprehensive product and
system materials for documentation by interpreting technical data into written content that
can easily be used by technical personnel and end users with varying degrees of
knowledge.
12. E-Commerce: E-Commerce deals with doing business over the Internet and World Wide
Web. These professionals are responsible for exploring and developing the ever – growing
sales channels and the expanding customer base. The primary activities may be identifying
E-commerce fields, customers, marketing, providing online technical support and finally
administration,
resulting into improvement of online B2B transactions, improving the product sales on
Internet.
13. Web developer: A web developer is a programmer who is specialized in the development
web pages, web applications and network applications that are run over HTTP (Hypertext
Transfer Protocol) from a web server to a web browser. They are found working in large
corporations and government agencies, small and medium size companies or alone as
freelancers.
14. Mobile Application Developer: They main responsibility is to develop and create apps
for iOS and Android systems, etc.
15. System Analyst: Design IT solutions and existing systems to improve business efficiency
and productivity.
16. Cloud Architect: These are the overall organizers and developers of the cloud computing
space which is an untouchable space where data and information is held. It is among the
highest paid computer career.
17. E-Commerce: E-Commerce deals with doing business over the Internet and World Wide
Web. These professionals are responsible for exploring and developing the ever – growing
sales channels and the expanding customer base. The primary activities may be identifying
E-commerce fields, customers, marketing, providing online technical support and finally
administration,
resulting into improvement of online B2B transactions, improving the product sales on
Internet.
18. Information specialist: He is in charge of managing data and securing files, analyzing
data, communicating with stockholders and training other people in the job. They assist in
coordinating processing systems within the company and streamlining the company‘s
system along with developing quarterly reports.

GBHS DSCHANG Page 22


READERS ARE LEADERS
E- COMPUTER ETHICS AND LEGISLATION
1. Computer Ethics
Ethics refers to the principles of right and wrong that individuals, acting as free moral agents,
use to make choices that guide their own behavior. It places a value on human acts according to
whether they are good or bad.
Note: moral ethics does not depend on the majority, what is good is good even if nobody is
doing it and what is wrong is wrong even if everyone is doing it.

Definition
Computer ethics refers to standards of good conduct applied within the use of computers. It
defines principles for judging computing acts whether they are good or bad.
1.1. Fundamental principles of Ethics
The fundamental principles of ethics formulated by the Computer Ethics Institute (CEI) as the
“ten commandments” of computer ethics are:
1. Thou shall not use a computer to harm other people.
2. Thou shall not interfere with other people‘s computer work.
3. Thou shall not snoop around in other people‘s files.
4. Thou shall not use a computer to steal.
5. Thou shall not use a computer to bear false witness.
6. Thou shall not copy or use proprietary software for which you have not paid.
7. Thou shall not use other people‘s computer resources without authorization or proper
compensation.
8. Thou shall not appropriate other people‘s intellectual output.
9. Thou shall think about the social consequences of the program you write or the system
you design.
10. Thou shall use a computer in ways that show consideration and respect for your fellow
humans.

Codes of Ethics and Professional Conduct


A code of ethics and professional conduct sets the standards for what is expected of a
professional. They are promises by professions to regulate themselves in the general interest of
the society. Code of ethics for information technology professionals encourage them to behave
ethically and responsibly with the tools and information they have in their control. Codes of
ethics are promulgated by associations such as the British Computing Society (BCS), the
Association for Computing Machinery (ACM), the Institute of Electrical and Electronics
Engineer (IEEE) etc.

The BCS (British Computing Society) Code of Ethics


This code sets out the professional standards required by the society as a condition of
membership. It applies to members of grades, including students, and affiliates, and also non-
members who offer their expertise as part of the Society‘s professional Advice Register.

With this document, the term ‗relevant authority‘ is used to identify the person or organization
which has authority over your activity as an individual. If you are a practicing professional, this
is normally an employer or client. If you are a student, this is normally an academic institution.

GBHS DSCHANG Page 23


READERS ARE LEADERS
The code governs your personal conduct as an individual member of the BCS and not the nature
of business or ethics of the relevant authority. It will, therefore, be a matter of your exercising
your personal judgment in meeting the Code‘s requirements.
Any breach of the Code of Conduct brought to the attention of the society will be considered
under the Society‘s disciplinary procedures. You should also ensure that you notify the Society of
any significant violation of this Code by another BCS member.
THE PUBLIC INTEREST
You shall carry out work or study with due care and diligence in accordance with the relevant
authority‘s requirements and the interests of system users. If your professional judgment is
overruled, you shall indicate the likely risks and consequences.
DUTY TO RELEVANT AUTHORITY
You shall avoid any situation that may give rise to a conflict of interest between you and your
relevant authority. You shall make full and immediate disclosure to them if any conflict is likely
to occur or be seen by a third party as likely to occur.
DUTY TO THE PROFESSION
You shall uphold the reputation and good standing of the BCS in particular, and the profession
in general, and shall seek to improve professional standards through participation in their
development and enforcement.
You shall act with integrity in your relationships with all members of the BCS and with
members of other professions with whom you work in a professional capacity.
PROFESSIONAL COMPETENCE AND INTEGRITY
You shall seek to upgrade your professional knowledge and skill and shall maintain awareness
of technological developments procedures and standards which are relevant to your field, and
encourage your subordinates to do likewise.
You shall not claim any level of competence that you do not possess.

The ACM (Association for Computing Machinery) Code of Ethics


1. General Moral Imperatives
As an ACM member I will…
1.1 Contribute to society and human well-being.
1.2 Avoid harm to others.
1.3 Be honest and trustworthy.
1.4 Be fair and take action not to discriminate.
1.5 Honour copyrights and patents.
1.6 Give proper credit for intellectual property.
1.7 Respect rights to limit access to computing and communication systems.
1.8 Respect the privacy of others.
1.9 Honour confidentiality.

2. More Specific Professional Responsibilities.


As an ACM Computing Professional I will . . .
2.1. Strive to achieve the highest quality, effectiveness and dignity in both the process and
products of professional work.
2.2. Acquire and maintain professional competence.
2.3. Know and respect existing laws pertaining to professional work.
2.4. Accept and provide appropriate professional review.

GBHS DSCHANG Page 24


READERS ARE LEADERS
2.5. Give comprehensive and thorough evaluations of computer systems and their impacts,
including analysis of possible risks.
2.6. Honor contracts, agreements, and assigned responsibilities.
2.7. Improve public understanding of computing and its consequences.
2.8. Access computing and communications resources only when authorized to do so.

The IEEE (Institute of Electrical and Electronics Engineer) code of ethics


It states, we the members of the IEEE, in recognition of the importance of our technologies in
affecting the quality of life throughout the world, and in accepting a personal obligation to our
profession, its members and the communities we serve, do hereby commit ourselves to the
highest ethical and professional conduct and agree:
1. To accept responsibility in making decisions consistent with the safety, health and welfare of
the public, and to disclose promptly factors that might endanger the public or the environment;
2. To avoid real or perceived conflicts of interest whenever possible, and to disclose them to
affected parties when they do exist;
3. To be honest and realistic in stating claims or estimates based on available data;
4. To reject bribery in all its forms;
5. To improve the understanding of technology, its appropriate application, and potential
consequences;
6. To maintain and improve our technical competence and to undertake technological tasks for
others only if qualified by training or experience, or after full disclosure of pertinent limitations;
7. To seek, accept, and offer honest criticism of technical work, to acknowledge and correct
errors, and to credit properly the contributions of others;
8. To treat fairly all persons regardless of such factors as race, religion, gender, disability, age,
or national origin;
9. To avoid injuring others, their property, reputation, or employment by false or malicious
action;

2. Legislation: Legislation is the act of making and passing laws.


2.1. The Data Protection Act
It is aimed at protecting the rights of the individuals to privacy, corruption, lost, or compromise.
Some Data Protection Act rules are:
o If an organization holds data on individuals, it must be registered under the act.
o Data is a representation of facts or ideas in a formalized manner capable of being
communicated or manipulated by some process for it to be meaningful.
o Data subject is any person whose personal data is being collected, held or processed.
o Personal data should be processed fairly and lawfully.
o Personal data should not be disclosed in anyway other than lawfully and within the
registered purpose.
o Personal data should be adequate and relevant and not excessive for the required
purpose.
o Personal data should be kept accurate and kept up to date.
o Data must be processed in accordance with the right of the data subject.
o Appropriate security measures must be taken against unauthorized access.

GBHS DSCHANG Page 25


READERS ARE LEADERS
2.2. The Computer Misuse Act
The Act makes it an offence to access any computer to which you do not have an authorized
right to use. It introduces three criminal offences:
1. Unauthorized access to computer material.
2. Unauthorized access with intent to commit or facilitate commission of further offences.
3. Unauthorized modification of computer material.
2.3. Copyright, Design and Patent Act
This Act is designed to protect all types of intellectual property and ensure that authors or
creators of a piece of work receive both credit and compensation.
a. Copyright: is a statutory grant that protects original work. Something that is
copyrighted is not to be reproduced, published or copied without permission from the
copyright holder. Ideas are not protected by copyright; only the specific presentation of
the idea is copyrightable.
b. Design: a design is the appearance or construction of something. A design is not
immediately protected; it must be registered with the appropriate institution.
c. Patent: a patent is a grant to inventors that give them exclusive monopoly over their
invention. It gives them the right to stop others from producing, selling or using their
invention. Unlike copyrights, patents protect the ideas or design of the invention rather
than any tangible form of the invention.

2.4. Health and Safety Act


This act is designed to protect employees. The original Act and its many added regulations
cover the range of hazards an employee may face like handling hazardous material. Some of the
regulations that apply to the computing industry are:
a. Display Screen Equipment Regulations: it covers the precautions that must be taken
when an employee uses a visual display unit. The regulation covers items such as the
chair which must be adjustable, the desk which must be at the appropriate height, the
monitor which must be adjustable and the lighting which must be appropriate.
b. Moving and Handling Regulations: these regulations lay down the rules for safe
moving of heavy objects. All employees involved in such activities must receive proper
training on avoiding injury when moving heavy objects.
c. Control of Substances Hazardous to Health (COSHH): these regulations cover the
safe storage and use of hazardous materials. This includes items such as laser printer
toners and anyone involved in replacing such items must be made aware of the
potentially toxic nature of toners.

CHAPTER 4: FILE FORMAT


Competence:
- At the end of this chapter, candidates should be able to demonstrate an understanding of
different representations of data and how the presentations affect the uses and
applications of the data.
1. File Organization
File organization refers to the logical structuring of records in a file. In other words, it is the way
records are arranged in a file. When choosing a file organization, the criteria usually considered

GBHS DSCHANG Page 26


READERS ARE LEADERS
important are fast access to single record or collection of related records, storage efficiency, and
redundancy. There are four basic techniques of organizing files on a disk; serially, sequentially,
indexed or randomly organized.
a. Serial Files
Serial files are files in which records are stored in chronological order with no particular
sequence. As each record is received it is stored in the next available storage space. In order to
access a particular record, the file must be read record by record from the beginning of the file
until the required record is found. This type of access is called serial access. Serial access is
very slow which makes it impossible for serial files to be very useful if individual records have
to be looked up. They are used as temporary files to store transaction data (transaction files).
b. Sequential Files
A sequential file is a serial file in which records are stored in order by a record-key field. That
is, the records are sorted according to a given field that identifies each record in the file, in a
unique way. Sequential files are also accessed serially. However, a sequential file is particularly
useful when a whole file of data has to be processed as it is faster and more efficient than other
methods. Sequential files are ideal for master files and batch processing applications such as
payroll and billing systems in which almost all records are processed in a single run of the
application.
Serial and sequential files can be stored on both magnetic disk and magnetic tape. They are
particularly suited to tape which is a serial/sequential access medium.
c. Indexed Sequential Files
An indexed sequential file is a sequential file in which an index is added to support random
access. In this type of file, records are stored in blocks and the address of every block is stored
in an index. A block address may consist of the key of the first record in the block. Indexed
sequential files therefore combine the advantages of a sequential file with the possibility of
direct access. To access any record in the file, the index is searched to determine the block to
which the record belongs. The record is then searched for sequentially but only within the block
in which it is found.
d. Random or Direct Files
A random file is a file in which records are stored in random order. In a random file, the value
of the record key is mapped by a certain function (hash function) to an address within the file
where the record will be stored. The function transforms the value of record key into an index
that corresponds to a location in the file. This process is called hashing. Any record within this
type of file can be accessed randomly or directly through the mapping function, hence the name
random access or direct access.

- Serial: Here, records are placed on the disk one after the other with no regard for sequence.
- Sequential: Here there is a defined sequence according the record key.
- Indexed-sequential: Here, records are stored in sequence that allows individual records to
be located with the use of an index. Can be accessed sequentially, selective sequentially,
and randomly.
- Random: Here, records are placed on the disk in any order.
File Access
a) Serial: for accessing serial and sequential files.
b) Sequential: for accessing sequential and indexed sequential files.

GBHS DSCHANG Page 27


READERS ARE LEADERS
c) Selective sequential: for accessing indexed sequential
d) Random: for accessing random and indexed sequential files.
File Storage
The main types of file storage are:
a) Immediate access storage (IAS) e.g. RAMs.
b) Direct access storage (DAS) e.g. hard disk, USB Flash, Memory cards.
c) Serial access storage (SAS) e.g. magnetic tape.

FILE FORMATE AND DATA SECURITY


A computer file is a named collection of stored data as a single item. Computer systems use
extensions in files names to identify the file type. A file is independent on the medium on which
it is stored. A computer file is characterized by its name, optional extension name, size, type,
date modified, and structure. On Windows applications, extensions consist of a dot at the end of
a file and followed by a few letters to identify the type of file. E.g. .txt identifies a text file. Files
can be organized into hierarchies using folders, directories, or catalogues. A folder can contain
an arbitrary number of files and other folders called sub-folders which can still contain folders
and files. The first folder is called the master or root folder.
1. File Format and Extensions
A File format is the manner in which data is encoded or structured for storage in a computer
file. A particular file format is often indicated as part of a file's name by a file name extension.
A file extension is a string of characters that represent the optional second part of a computer
filename. Conventionally, the extension is separated from the file name by a dot and contains
three or four letters that indicate the format. A file name is a unique name that is given to a file
within its file directory. For example, [Link] is a file with filename ―lectures‖ and
extension ―.docx‖ indicating that the file is an MS Word 2007 document.
There are as many different file formats as there are different programs that create and process
those files.
a. Binary graphics (Images)
Bit-mapped Graphics: Bitmap graphics are sometimes referred to as ―digital,‖ ―raster,‖ or
―paint‖ graphics. Some popular programs that allow you to create and edit bitmap/paint graphics
are Adobe Photoshop, Jasc Paint Shop Pro, and Microsoft PictureIt! The images digital cameras
and scanners produce are bitmaps, as are most of the graphics you see on the World Wide Web.
o .jpeg or .jpg: Joint Photographic Experts Group compresses photographic images.
o .gif: Graphics Interchange Format, compresses image files.
o .tiff or .tif- Tagged Image File Format.
o .bmp: ―Bitmap‖ it does not compress.
Vector graphics: Vector graphics, also referred to as ―object-oriented‖ or ―draw‖ graphics, are
created using geometric objects—lines, ovals, rectangles, and curves. A few of the most popular
software programs used to create and edit vector images are Adobe Illustrator, CorelDraw, and
Macromedia FreeHand.
o .png: Portable Network Graphic, it uses the lossless bitmap image.
o .cdr: CorelDraw graphic.
o .eps: Encapsulated PostScript can combine text, graphics, and images.
o .cgm: Computer Graphics Metafile.

GBHS DSCHANG Page 28


READERS ARE LEADERS
b. Audio
o .mp3: MPEG Layer 3 it compresses about 1/10th the original size of the file.
o .wma- Windows Media Audio.
o .wav - Waveform audio file.
c. Video: Video file format concepts: Video format involve two distinct, and very different
technology concepts: containers (sometimes called wrapper) & codec (short for
coder/decoder). Codec are inside of a container because of this video formats can be
confusing.
Container
The container describes the structure of the file: where the various pieces are stored, how they
are interleaved, and which codecs are used by which pieces. It may specify an audio codecs as
well as video. It is used to package the video & its components (audio/metadata) and is
identified (usually) by a file extension such as .AVI, .MP4 or .MOV.
Codec
A codec is a way of encoding audio or video into a stream of bytes. It is method used to encode
the video and is the chief determiner of quality. Example of codec MPEG, DV (Digital Video),
WMV (Windows Media Video, DivX, Sorenson 3....
Codec and container
Think of container as the file itself. Think of the codec as its content. The important thing to
realize is that most good container formats can hold many codecs and in no way does the
container decide the quality or features of video itself that is up to the codec.
o .avi: Audio Video Interleave.
o .mpeg or .mpg - Motion Picture Experts Group.
o .3gpp - Third Generation Partnership Project.
o .mpeg4: Motion Picture Experts Group layer 4.
o Real Media: file format for streaming contents on the Internet.
d. Application Programs
o .doc: MS Word 1999-2003
o .docx: MS Word 2007+++
o .pdf - Portable Document Format
o .txt - ASCII Text file
o .xls (.xlsx)- Excel Worksheet file
o .wks, .wk2., wk3- Lotus 1-2-3 or MS Works Worksheet
o .ppt (.pptx)- PowerPoint presentation file
o .accdb - Access Database File
e. Hypermedia
o .html (.htm): Hypertext Markup Language
o .xml: Extensible Markup Language
o .sgml: Standard Generalized Markup Language
f. Others
o .exe, .sh, .bin, etc: Executable file (machine-language program)
o .dll: Dynamic Link Library
o System files: .sys, .dos, .dll, .bat, etc.
o Program source files : .pas, .c, .bas, .class, .c++, .cs, .vb, etc.
o Backup files: .bac, .bak, etc.
o Archive compressed files: .zip, .7z, .rar, .tar.z, .[Link], .jar, etc.

GBHS DSCHANG Page 29


READERS ARE LEADERS
o Disc image files: .iso, .cue, .bin, .nrg, etc.
o Photoshop: .pds, etc.

2. Data Security (File Protection)


To secure data, some measures need to be taken.
Data security refers to the process and procedures of keeping data protected from corruption
and unauthorized access in an information system. The following measures can be taken to
secure data;
a. Backup Files
Backup is the process of making copies of data which may be used to restore the original data
after a data loss event. Copies of data can be made and stored on storage devices like external
hard drives, CDs and DVDs. Backups have two distinct purposes; to recover data after its loss,
be it by data deletion or corruption and to recover data from an earlier time, according to a user-
defined data retention policy, typically configured within a backup application.
b. Archival Files
Data archiving is the process of moving data that is no longer actively used to a separate data
storage device for long-term retention. Data archive is often confused with data backup, which
are copies of data. Data archives protect older information that is not needed for everyday
operations but may occasionally need to be accessed while data backups are used to restore
frequently used data in case it is corrupt or destroyed. WinZip allows the creation and extraction
of an archive file. It also compresses the file.
c. Data Encryption
Encryption is the process of transforming data or information using an algorithm into a form
unreadable by anyone except the intended recipient. To read an encrypted data, one must have
access to a secret key or password that enables you to decrypt it. The original data is known as
plain text, the algorithm is cipher and the encrypted data is cipher text. The reverse process is
referred to as decryption.
d. Authentication
Authentication is the process of determining if someone is who they declare to be. This can be
done by the use of a user name and password, a smart card or biometrics. When authentication
is done through the use of a user name and password, knowledge of the password is assumed to
guarantee that the user is authentic. Passwords can be guessed or "cracked" and so if you are
using a password to protect your files, the following guidelines will help make them more
secure:
o Keep your password secret
o Change your password regularly.
o Make your password at least eight characters long.
o Do not use proper words of phrases - these can be found using a dictionary cracker.
o Use a mixture of upper and lower case letters and numbers.

Generally, biometrics is the science and technology of measuring and analyzing biological data.
In computer security, biometrics refers to the use of measurable biological characteristics such
as fingerprints, eye retinas, iris patterns, facial patterns, voice patterns or hand measurements or
hand geometry, to identify a person.
o Fingerprint: the analysis of an individual's unique fingerprints.
o Retina: the analysis of the capillary vessels located at the back of the eye.

GBHS DSCHANG Page 30


READERS ARE LEADERS
o Iris: the analysis of the colored ring that surrounds the eye's pupil.
o Face: the analysis of facial characteristics.
o Voice: the analysis of the tone, pitch, cadence and frequency of a person's voice.
o Hand geometry: the analysis of the shape of the hand and the length of the fingers.
e. Logs
An audit log is a record of all the actions carried out by a user stored together with their user
name. If a file is deleted, modified or copied, the person responsible can be identified by
examining the logs. Getting a computer system to keep logs is one way of deterring authorized
users from damaging or stealing data from the system.
A transaction log (also database log or binary log) is a history of actions executed by a database
management system to guarantee ACID properties over crashes or hardware failures. ACID is a
set of properties that guarantee that database transactions are processed reliably. These
properties are:
 Atomicity: requires that database modifications must follow an ―all or nothing‖ rule.
Each transaction is said to be atomic. If one part of the transaction fails, the entire transaction
fails and the database state is left unchanged. This guarantees that a transaction cannot be left in
an incomplete state.
 Consistency: ensures that any transaction will bring the database from one valid state to
another. Any data written to the database must be valid according to all defined rules.
 Isolation: refers to the requirement that no transaction should be able to interfere with
another transaction. No transactions that affect the same rows can run concurrently since
their sequence and hence their outcome would be unpredictable.
 Durability: means that once a transaction has been committed, it will remain so even in
the event of power loss, crashes or errors.
f. Antivirus (Virus Checking Software)
An antivirus is software that is used to prevent, detect and remove malware. Malware are
malicious software including but not limited to computer viruses, computer worms, Trojan
horses, spyware and adware. Malware are designed to cause damage or disruption to a computer
system. When an antivirus has been installed on a system, it is necessary to update it regularly.
Examples of antivirus software are Norton, Avast, Kaspersky, McAfee, Avira, AVG, Smadav,
etc.
g. Firewall
A firewall is a system designed to prevent unauthorized access to or from a private network.
Firewalls are implemented in either hardware or software form, or a combination of both. They
prevent unauthorized Internet users from accessing private networks connected to the Internet.
All messages entering or leaving the network must pass through the firewall which examines
each message and blocks those that do not meet the specified security criteria. Some Operating
Systems like Windows XP, 7 and Mac OS X, have built-in firewalls.
h. File Access Control
It is a process of authorizing users‘ or a group access to files by the use of permission.
Permission defines the type of access granted to a user or group. We have the read permission,
write permission, and execute permission.
i. Disaster Planning
Disaster Recovery (DR) is often viewed as an insurance policy. It is a planning measure that
companies put in place to ensure that their business can still run even if their critical ICT
systems fail. Disasters can be natural like fire, floods or man equipment failure, theft, virus etc.

GBHS DSCHANG Page 31


READERS ARE LEADERS
ICT disaster planning can be classified into three i.e. Preventive which is aim at preventing an
event from occurring. Detective which is aim at correcting or discovering unwanted events. And
Corrective which is aim at correcting or restoring the system after a disaster. To ensure good
disaster planning all these three measures regularly.

j. Read-Only Flag
It is a mechanism whereby when the flag is turned on for a file, the file can only be examined
but cannot be modified or deleted. This flag is used to hide confidential files and that user
should never modify or delete.

TYPES OF FILE SYSTEMS


A file system is an organized and catalogued structure of computer files on a data storage
medium. It defines how files named, stored, manipulated, and arranged for efficient access on
storage devices. File systems can be classified into disk file systems, network file system, and
special purpose file systems.
a) Disk File System: it is a file system designed for the storage of files on a data storage
device most commonly a disk drive. Common disk file systems are FAT (File Allocation
Table) with versions like FAT16 and FAT32 (16 and 32 being the number of bits use in
the address table to locate parts of the hard disk). NTFS (New Technology File System)
it is more secured and reliable than the FAT and uses more bits.
b) Network File System: use for sharing files across a computer network.
c) Special Purpose File System: these are file systems that are not a disk file or network
file. This includes systems where the files are arranged dynamically by software.

CHAPTER 5: SOFTWARE
Competence: By the end of this chapter, students will be able to…
- Define and distinguish between software‘s.
- Establishing differences between general purpose and custom made software types.
- Selecting and installing application packages for handling different user tasks.
- Establishing with examples, the difference between open source and closed source
software.
- Distinguishing between demo ware, shareware and freeware with examples of their
functionalities.
Introduction
Computer hardware is only as effective as the instructions the user give it and those instructions
are called software. Software not only directs the computer to manage its internal resources but
also enables the user to tailor a computer system to provide specific results.

Definition
Software by definition is the collection of computer programs, procedures, and documentations
that performs different tasks on a computer system. It actually tells the computer what to do and
how to do it. It is referred to as the intangible components of the computer system. Software
may enter the computer through one of the following three ways.
 It may be built into the computer circuit in the form of firmware,

GBHS DSCHANG Page 32


READERS ARE LEADERS
 It may be loaded into the computer from a secondary storage device such as CD-ROM,
USB stick or hard disk drives,
 It can also be typed into the computer with the aid of the keyboard and programming
tools.
Relation between hardware and software
Software refers to the computer programs that are loaded into the computer system and
hardware refers to all the visible devices which are assembled together to build computer
system. The blending of software and hardware gives life to a computer system. Even though
hardware is the physical part of a computer, it is nothing unless it has software to control it.
Hardware and software then share a special relationship. If hardware is the body of a computer
system, software is the brain. Both are complimentary to each other. Hardware is of no use
without software and software cannot be used without hardware period.

Qualities of good software


Some of the most essential attributes of good software include;
 Usability: this is the ease and convenience with which software can be used by human
being. This is affected by technology such as the Human-Computer Interface.
 Efficiency: this is the degree with which h software fulfills its purposes without waste of
resources.
 Portability: it is the ease with which software can be used in other computer systems
different from the current one.
 Reusability: this is the ease with which software can be used to design other software.
 Maintainability: this is the ease with which modifications can be made to satisfy new
requirements or to correct deficiency. Well-designed software should be flexible enough
to accommodate future changes that will be needed as new requirements come to light.
 Security: this is the ease with which software is able to protect its data against
unauthorized access and to withstand malicious interference on its operations.
 Reliability: this is the frequency and extends to which software fails to perform its
functions under normal operating circumstances.
 Understandability: it is the ease with which software can be understood by computer
users.
 Completeness: this is the characteristic whereby the software possesses all of its parts
each of them being fully developed.
 Correctness: this is the degree with which software meet its specified requirements.
 Robustness: this is the degree with which software resist to users manipulations errors.
Ways of acquiring computer software
Some of the common ways of acquiring software include:
 Buying the computer,
 Buying the software from a shop,
 Downloading the software from a website for free (freeware) or after paying some money
to the vendor.

GBHS DSCHANG Page 33


READERS ARE LEADERS
SOFTWARE

Programs that run on the computer

OPERATING SYSTEM APPLICATION SOFTWARE

Programs that manage the operations of Programs used to perform specific


a computer system task for end users

Examples; Examples;

- Microsoft Disk Operating System (MS - Word Processing (e.g. MS WORD,


DOS) Notepad
- Spreadsheet (MS Excel, Lotus 123)
- Microsoft Windows (2000, Me, XP, 7, - Desktop Publishing (MS Publisher,
8, 2013, etc. etc.) Adobe PageMaker)
- UNIX and LINUX - Database Management (MS Access)
- Presentation (MS PowerPoint)
- Android and iOS - Communication (Internet Explorer)
- Entertainment (Games & Music)

I. CLASSIFICATION OF SOFTWARE
Based on the kind of task they perform, software can be divided into two major groups; System
software and Application software. The diagram below gives a simplified hierarchical
organization of the main parts of software in a general purpose computer. At the highest level of
this hierarchy lies the application software whose services are carried out by the underlying
system software. The devices of the system software are then executed by the underlying
hardware components. Computers operate by executing software programs. This involves
passing the instructions from the application software through the system software to the
hardware that ultimately receives the instruction as machine code. Each instruction causes the
computer to carry out an operation such as data transmission, data processing, and data storage
or data control.
APPLICATION SOFTWARE
↓↑
SYSTEM SOFTWARE
↑↓
HARDWARE
Hierarchical Organization of Software and Hardware

A. SYSTEM SOFTWARE
System software is a type of computer software that controls the operation of a computer and
provides facilities that extend the general capabilities of the machine. They provide the basic

GBHS DSCHANG Page 34


READERS ARE LEADERS
functions for computer usage and help to run the computer hardware and system. System
software includes a combination of the following:
1) Operating system (OS)
An operating system is a collection of system programs that together controls the operation of a
computer system. Operating system along with hardware, application software‘s, and other
system software‘s and users constitute a computer system. It is the most important part of any
computer system for it coordinates all the activities of a computer system. More on the OS in
the next chapter.
Examples of popular OSs include Android, BSD, Linux (Knoppix,, Ubuntu, Dreamlinux,…),
OS X, QNX, Microsoft Windows 95, 2000, Vista, 7, 8, 10, 2013), iOS, Windows phone, z/OS.
All these except windows, windows phone and z/OS share roots in UNIX
.
2) Utility program
This is system software designed to help analyze, configure, optimize or maintain a computer. It
provides an addition to the capabilities provided by the OS. A single piece will be called a
utility or tool. Some well-known utility software includes;
 Antivirus programs
 Back up programs: they help to make copies of all information valuable to a computer or
information system and store it safe.
 Data recovery: as the name implies, data recovery programs are used to recover data.
Since disk drives or other hardware may fail, these utilities are essential to recover data in
such scenario.
 Data compression programs: they make data more compact reducing the space occupied
by the data.
 Disk management programs: these are programs involved in formatting and arranging disk
files in an orderly manner.
 Memory management: it handles locations in RAM where current data is loaded. It is also
responsible for creating space for new data input.
 The server: in the context of client-server architecture, a server is a computer program
running to serve the requests of other programs (the clients). The client may run on the
same system or through networks.

3) PROGRAMMING SOFTWARE
It is the type of system software that is used for creating other software. Another name for
programming software is Integrated Development Environment (IDE) which normally consists
of a source code editor, a translator (compiler or interpreter), a debugger, etc.
- Editor: it is a programming tool that is used for creating and modifying application
programs. It helps the computer user to enter, search, delete, replace, copy and insert text or
sections of a text in a desired position.
- Compiler: it is used to convert a complete program written in a high level language (such
as Pascal and C, C++) into a program in machine language.
- Interpreter: a program which translates the program statements into machine language one
line at a time as the program is running.
- Assembler: a programming tool that convert a program in assembly language into program
in machine language.
- Debugger: it is a program that is used for locating and correcting programming errors.

GBHS DSCHANG Page 35


READERS ARE LEADERS
- Linker: a linker or link editor is a program that takes one or more objects generated by the
computer and combines them to a single executable program.
- Loader: loader is a kind of system software which is responsible for loading and relocation
of the executable program in the main memory. The functions of a loader include assigning
load time space for storage that is transfer translated programs from the secondary storage
to the main memory.
- Server: this is a program that provides services to other programs on a network.

4) DEVICE DRIVERS
Device drivers are computer programs of the system software family allowing higher level
computer programs to communicate and interact with a hardware device. All hardware devices
have the device drivers that communicate with them through the computer bus to which the
hardware is connected e.g. scanners, modems, printers, monitors, etc. Device drivers always
have features that can be executed directly by an as application programs. Some specific
categories of device drivers are: Logical Device Drivers (LDD) and Physical Device Drivers
(PDD).

B. APPLICATION SOFTWARES
Although system software has the vital job of controlling and managing the computer, it is the
application software that lets you carry out the task for which the system was purchased. It
enables end users to accomplish certain specific tasks. This software‘s are called application
packages because they direct the processing required for a particular use or application which
users want to accomplish. A user can‘t run an application program on the computer except it is
self-booting. Thousands of application packages are available because there are thousands of
different jobs which end users want computers to do and so needs different application
packages. There exist two major categories of computer application software‘s: general-purpose
packages and specific-purpose packages and a special one called bespoke software‘s.

a) General-purpose packages: a general-purpose software sometimes known as off-the-


shelf is the sort of software that performs common information processing tasks for end users.
This type of software tries to be jack-of-all trades. It provides features that the majority of the
users will want e.g. formatting text, creating charts, organizing tables. So they try to be all
things for all people and have some features that some users will never use thus making storage
size of these applications fairly large.
There are several reasons for using general-purpose software:
- It is relatively cheap,
- It is easily available from most computer shops,
- It will have been thoroughly tested so there won‘ be any serious problems or bugs,
- There is always a lot of user support i.e. user guides, online help, and direction forums on
the internet.
Examples of general purpose application software’s
1. Word processing software: this group of software enables users to create, format, edit
and print electronic documents (letters, reports, articles,…) the most popular examples of this
type of software are MS-Word, WordPad and WordPerfect, Libreoffice writer.

GBHS DSCHANG Page 36


READERS ARE LEADERS
2. Desktop Publishing Software (DTP): DTP is the process of using PCs to precisely and
flexible position text and images in documents that can be printed. A particular important
feature of a DTP is that it enables users to see on the screen exactly how the document will
appear when printed. The following are some fundamental features that characterize DTP
programs:
 The ability to place text and graphic precisely and flexibly on a page.
 The ability to chain sections together for example newspaper columns.
 The ability to print data exactly as they appear on the monitor screen (WYSIWYG).
 The use of readymade pictures known as clip art.
 The ability to treat each element of a publication as a separate object.

3. Spreadsheet Software: spreadsheet is the name given to a table of items arranged in


rows and columns. In a spreadsheet, each item can have a predefined relationship to the other
items. A type of spreadsheet that uses a computer program to manipulate, analyze and display
items in rows and columns is called electronic spreadsheet. Electronic spreadsheets are used in
many sectors of our society today. They are used for:
 The determination of monthly profits by small business owners.
 The calculation of students grades by teachers and lecturers.
Electronic spreadsheets have a number of advantages:
 They can perform calculations using formulas.
 They can carry out auto-update of related numbers when data changes.
 They can display data in graphs and charts.
Some popular examples of electronic spreadsheets are MS Excel, Lotus 1-2-3, Quattro Pro,
and Apple Numbers.

4. Database Software’s: A database is a structured collection of data or it is a well


organized collection of data that are related in such a way that the data can be easily accessed,
searched or modified in different logical orders. A computer program that is used for the
efficient creation and management of databases is called database management system (DBMS)
or simply database software. Using a database, computer users can:
 Sort data according to their names, cities, or postal users‘ codes.
 Create forms to enter, update, or display data.
 Create reports that show only the data the user wants.
Organizations that mostly use DB are schools, banks, companies, universities, libraries.
DBMSs have the following capabilities:
 Control data.
 Enforce data integrity.
 Provide query languages for searching, sorting, reporting, and other decision activities.
 Provide multi-user access to data along with security features.
 Provides data dictionary that describes the structure of the database, related files, and
record information.
ADVANTAGES of DBMS
 Unauthorized access is restricted.
 Multiple user interfaces are provided.
 Backup and recovery facilities are provided.
 Improved data security.

GBHS DSCHANG Page 37


READERS ARE LEADERS
 Improved data access.
DISADVANTAGE
 Costly,
 Management complexity,
 Frequent update is required.
TYPES OF DB
Desktop applications like MS Access and File Maker Pro and server applications such as MS
SQL and Oracle and Posgres SQL.

5. Presentation Software: the software that is used to display information in the form of a
slide show is known as presentation software. This type of software includes three functions
namely, editing that allows insertion and formatting of text, methods to include graphics in the
text and a functionality of executing slides shows. Types of presentation software‘s are MS
Power Point, Open Office Impress, Adobe Flash, Google Docs.
ADVANTAGES
 It gives a very professional image.
 The message is consistent.
 It is easy to change.
 It increases the way to reach audience.
 It can be used to summarize information.

6. Graphics software: Graphic software is a piece of software used for creating, showing
and changing digital images. It allows you to draw your own diagrams and pictures even to
produce art presentation slides. Computer graphics is widespread use today on TVs, in
newspapers, in weather reports, in medical investigation and surgical procedures, art and in
industry. More specific applications include:
 Making movies.
 Desktop publishing.
 CAD-CAM (electronic circuits design, industrial engineering etc.).
 Cartography.
 Technical drawing. Etcetera…

Two types of computer graphics exits namely: bitmap graphics and vector graphics. Bitmaps
graphics also called Raster graphics are images or graphics that are made of patterns of dots or
pixels (pixels are picture elements) rather than scalable objects that is tiny dots of individual
color that make up what we see on the screen. Vector graphics are images that are made up of
many scalable objects such as lines, curves and shapes with editable attributes such as color.
Objects are defined by mathematical equations rather than pixels. Some of the most popular
vector graphics programs are CorelDraw and AutoCAD. The following are also considered
graphics applications; MS Paint, Desktop publishing, Animation software, 3D-Modeling and
CAD software.

7. Information Retrieval Software (IRS): information retrieval is the art and science of
searching for information in an information resource such as documents, database, and
networks. Programs that retrieve information relevant to a user query are referred to as

GBHS DSCHANG Page 38


READERS ARE LEADERS
information retrieval software. Popular IRS includes search engines, meta search engines,
subject directories, and web browsers.
- Search Engines: A search engine is an information retrieval system designed to help
find information stored on a computer system or computer network. Its searches documents for
specified keywords and returns a list of the documents where the keywords are found. E.g.
Google, Yahoo!, Baidu, and Alta Vista.
- Meta search Engine: A meta search engine is a search tool that sends user request
to several engines and/or databases and aggregates the results into a single list or displays them
according their source. E.g. Dogpile, SurfWax, IxQuick, and MetaCrawler.
- Subject Directory: A subject directory is a type of information retrieval tool that
constitutes a catalogue of websites organized under various category and topic areas. It is good
for the general searching on a given topic. E.g. Yahoo!, [Link], and Infomine.
- Web Browsers: A web browser is an application software or program designed to
enable users to access, retrieve, and view documents and other resources on the internet. There
are particularly useful as retrieval tools if we know the Uniform Resource Locator (URL) of our
search topic. E.g. Mozilla Firefox and MS Internet Explorer.

8. Integrated Software: Integrated software or software suite is the name given to a


collection of application programs that have related functionality, share a common user-
interface, and can exchange data with one another. Integrated software‘s usually includes word
processing, spreadsheets, database, graphics, and communication capabilities. Typical examples
of integrated software packages include: Microsoft Office, Lotus Works, ClarisWorks, and
AppleWorks.
ADVANTAGES
 Low cost.
 There is only setup program to install.
 The ability to share information between modules.
 The ease and consistency of the interface from one module to another.
 Sharing data among the applications is almost effortless.
 Only one manual to read.

DISADVANTAGES
 Integrated software cannot be removed (separated).
 Takes more space than an average software.
 One part cannot be upgraded as all the software is integrated.
 Always have a weak area that is, may have a brilliant word processing application but a
very weak spreadsheet program.

9. Game Software: Games software refers to computer programs that are designed for
entertainment purposes. A computer game is one that is played on a PC. PC games are created
by one or more game developers often in conjunction with other specialists such as game artists.
It can then be distributed on VCDs, DVDs, or over the Internet. PC games often require
specialized hardware in the user‘s computer in order to play. For example a specific generation
of graphics processing unit or an Internet connection for online plays. Some examples of
popular PC games include Mist, The Sims, and Unreal, Play Station (PS).

GBHS DSCHANG Page 39


READERS ARE LEADERS
10. Expert System (ES): An expert system is a special branch of AI that uses computer
applications to solve complicated problems that would otherwise require extensive human
expertise. Expert systems do not typically provide a definitive solution to a problem, but rather
provide probabilistic recommendations. Some expert systems are designed to take the place of
human experts, while others are designed to aid them. An expert system has a unique structure
different from traditional programs. It is divided into the following parts- the knowledge base,
the inference engine, user interface, and explanation facility.
 Knowledge-base: it is a store house for information to be collected, organized, shared,
searched, and utilized. It can be either machine readable or intended for human use.
 Inference engine: it is the software that provides the reasoning mechanism in an expert
system. With information from the knowledge-base, the inference engine provides the
reasoning ability that derive inference (conclusions) on which the expert system acts.
 User interface: it is the crucial part of an ES that allows the user to query the system
and obtain the solution.
 An explanation facility: it explains the working of the system: how the rules were
derived, applied, and sometimes the confidence levels that can be attached to the results.
TYPES; rule base ES, fuzzy ES (vague or imprecise), frame ES (a form of knowledge
representation in AI), neural ES (modeled on the arrangement of neurons in the brain), neuro-
fussy ES or hybrid ES.
- eXpert CONfigurer (XCON): it is a commercial expert system that configures VAX
computer for DEC and is the biggest and most mature rule-base expert system in
operation.
- PROSPECTOR: it aids geologists in their search for ore deposits. Its expertise is based on
geological rules which form models of ore deposits, and a database of known rocks and
minerals.
- And many others like MYCIN, DENDRAL, PXDES, CaDet used by chemistry experts.
USES: Expert system designed to facilitate tasks in the fields like: accounting, medicine,
process control, agriculture, law, education, power systems, environment, loan applications,
financial services and industrial production.
ADVANTAGES
 Increased distribution of expertise.
 More reliable than humans, incorporating expertise from many sources.
 Able to deduce rules that are not apparent even to experts. Often called problem-solving
programs rather the ES.
 Capable of being extended as the system is applied and knowledge grows.
 Broader job description of expertise.
DISADVANTAGES
 Lack common sense needed in some decision making.
 Cannot make creative responses as human expert would in unusual circumstances, i.e. rule
following is not the best approach for all situations.
 Cannot adapt to changing environments unless knowledge base is changed.
 Areas of expertise tend to be narrow and specific.

GBHS DSCHANG Page 40


READERS ARE LEADERS

Human expert ES
Perishable Permanent
Difficult to transfer Transferrable
Difficult to document Easy to document
Unpredictable Consistent
Expensive Cost effective system

11. Communication software: communication software is a category of programs that


temporarily connect remote computers to one another in order to exchange data and messages.
Services that are typically performed by communication software include:
 Sending and receiving files.
 Exchanging messages in a group.
 Conducting video conference.
 Making phone calls over the internet (VOIP).

b) SPECIAL PURPOSE SOFTWARE


Function-specific software is highly specialized software that is designed to handle specific
tasks. There are more limited in what they can do, but they usually perform much better than
general purpose program in specific tasks. E.g. web browsers, calculators, media players,
calendar programs etc.
 Communication software: used to send messages and e-mails e.g. MS Outlook, MS
Messenger.
 Desktop publishing: used to combine and control graphics and text in a single document.
E.g. Adobe PageMaker, MS Publisher.
 Web browser: computer program that enables internet users to access, navigate, and
search World Wide Web sites. It is also called browser. E.g. Mozilla Firefox, Internet
Explorer, Opera, Google chrome.
 Enterprise software: it deals with the needs of organization processes and data flow.
Customer relationship management or the financial processes in an organization are
carried out with the help of enterprise software. E.g. Sage Saari.
 Multimedia software: they allow users to create and play audio and video file. There are
capable of playing media files. Audio converters, audio players, burners, video encoders
and decoders are some forms of multimedia software. Examples include Real Player,
Windows Media Player, and VLC media player.

c) BESPOKE SOFTWARE
Although most organizations use general purpose software, some organizations will find that it
does not do exactly what they want or it does not work with their current system. In this case,

GBHS DSCHANG Page 41


READERS ARE LEADERS
they might decide to have the software system they need designed and developed specifically
for them. This is called tailor-made or bespoke software which is made for a specific user and
purpose.
ADVANTAGES
 The software will only have the feature that they specifically need in their business.
 The software will work exactly how they want it to work.
DISADVANTAGES
 It takes time to develop such a system and it is expensive.
 There will be little in the way of user support and online help. Examples software‘s for
the military, banks, hospital etc. etc.

CLASSIFICAION OF SOFTWARE BASED ON SOURCE CODE


Source code: They are the human-readable instructions written in a programming language
(High Level languages) following some syntax and semantics to be transferred into machine
instructions by a translator (compiler, interpreter or assembler) since computers don‘t
understand human language.
Base on source code, we distinguish two types of software‘s: Open Source and Closed Source
Software;
- Closed source software (CSS): Also called proprietary software, it is software with
restricting on using, coping, and modifying the source code as enforced by the proprietor.
Users don‘t have access to the source code. Well known examples of proprietary software
include Windows, Real Player, Adobe Photoshop, Mac OS,
- Open source software (OSS): It is the type of software that has no proprietary restriction
attached to it, particularly the restriction about the access to the source code. In other
words, Open source software is designed in such a way that computer users can freely
access and modify the human readable source code to suit their individual need and can
distribute the software to any user and for any purpose. It is also called non-proprietary
software. E.g. Linux, Open Office.
The five main differences to consider when going for a CSS or OSS are; price policy, security,
quality of support, source code availability and usability.

CLASSIFICATION OF SOFTWARE BASED ON LICENSE


The term license refers to legal documents or agreements giving someone permission to do and
use something. A software license comprises the permissions, rights, and restriction imposed on
a piece of software. A software Licensed key is a pattern of numbers and/or letters provided to
licensed users of a software program. Licensed keys are generated through a licensed generator
once the user has paid for the software. Under software license, the licensee is permitted to use
the licensed software in compliance with a specific term on the license. Based on license,
computer software may be divided into the following:

Public Domain Software GPL (General Public License): Public domain software is any
software that has no legal, copyright or editing restrictions associated with it. It is free and open-
source software that can be publicly modified, distributed or sold without any restrictions.
SQLite, I2P and CERN httpd are popular examples of public domain software.

Public domain software has no ownership and is available for use, modification and
commercialization by anyone. Typically, public domain software is intentionally or voluntarily

GBHS DSCHANG Page 42


READERS ARE LEADERS
uncopyrighted, unpatented and is unrestricted by its developer/author. It is different from free
software and freeware that does has copyrights and patents associated with it.
Although there are no licensing requirements with public domain software, The Unlicensed,
Creative Commons License and WTFPL are based on a similar approach.
The GPL grants the recipients of a computer program the following rights, or "freedoms":
 The freedom to run the program, for any purpose.
 The freedom to study how the program works, and modify it. (Access to the source code is a
precondition for this).
 The freedom to redistribute copies.
 The freedom to improve the program, and release the improvements to the public. (Access to
the source code is a precondition for this).

Demonstration software (shareware): It is proprietary software based but is free to the public
under certain conditions. Its use may be limited in time (usually one month) and/or some of its
functions can be deactivated. For full use, you must pay to acquire the license. It is also known
as ‗Try before you buy‘, demoware or trialware.

Free software (freeware): It is also proprietary software available free to the public but it is not
limited in time. However, its use is sometimes subject to conditions: do not use it for
commercial purposes or in the course of a business for example and should not be for sell.

Crippleware: The shareware version of a program whose most advanced and most desirable
features have been disabled with the intention of increasing users‘ apetite for the better version.
If the fee is paid, a code is acquired, which uncripple the program.

Nagware: Nagware (also known as annoyware) is a type of shareware that reminds or nags the
user to register it by paying a fee. It usually does this by popping up a message when the user
starts the program or, worse, intermittently while the user is using the application. These
messages can appear as windows obscuring part of the screen or message boxes that can quickly
be closed. Some nagware keeps the message up for a certain time period, forcing the user to
wait to continue to use the program.

Adware: Advertising-supported software is any software package which automatically plays,


displays, or downloads advertising material to a computer after the software is installed on it or
while the application is being used.

Liteware: This is the free version of a program, that does not contain those features that are
attractive to frequent or heavy user.

Vapoware: Vaporware (or vapourware) is software or hardware which is announced by a


developer well in advance of release, but which then fails to emerge, either with or without a
protracted development cycle.

Other type of software: Off-the-Shelf Software: Off-the-shelf software is standard software


bought off the shelf. It has predefined specifications that may or may not cater to any specific
user's requirements. When you buy it, you agree to its license agreement.

Retail Software: While shareware is provided as a trial version to users, retail software is sold
to end users.

GBHS DSCHANG Page 43


READERS ARE LEADERS
Firmware: Firmware is a combination of software (generally system software) permanently
stored in the memory (hardware). As the name suggests, it is a program or data that has been
written onto the read-only memory (ROM). For example, the BIOS (which is installed inside a
computer on a chip) checks different parts of the system before loading the operating system
into the memory.

Liveware: People who write programs operate and maintain the computers are collectively
known as liveware, humanware or peopleware; for example, programmers, system analysts and
hardware engineers.

Software piracy: This is the illegal (unauthorized) reproduction of copyrighted or patented


software for personal use, for sale or free distribution without the permission of the software
holder. It is the most widely practiced type of computer crime. Some common types of software
piracy include: counterfeit software, softlifting, hard disk loading, Internet software piracy.

Software Tools: Also called programming tool or software development tool is a computer
program that software developers use to create, debug, maintain or otherwise support programs
and applications. The term usually refers to relatively simple programs that can be combined
together to accomplish a task much as one might use multiple hand tools to fix physical object.
The most basic tools are a source code editor, debugger, and translators which are used
ubiquitously and continuously. All of these basic tools may be a part of a single large program
called an Integrated Development Environment (IDE) which combines the features of many
tools into one package. Example NetBeans, Eclipse, SharpDevelop, Lazarus, etc.
Linker: This is software that is used to combine object code modules (sub-programs) together
to make a complete program.

CHAPTER 6: COMPUTER ARCHITECTURE & STORAGE


Competence:
By the end of this chapter, the learner should be able to;
- Describing the Von Neumann architecture,
- Explaining stored program concept,
- Describe processor configuration and components,
- Identifying the roles of memory systems,
- Distinguishing between SIMM and DIMM,
- Describing a storage hierarchy based on size and speed,
- Establishing the differences between categories of storage devices,
- Differentiating between primary and secondary storage devices.
Introduction
Just as in buildings and constructions, each computer has a visible structure, referred to as its
architecture. The architecture of a building can be examined at various levels of detail, namely,
the number of storeys, the size of the rooms, and the details of door and window placement and
so on. One can look at a computers‘ architecture at similar levels of detail of basic hardware
elements, which in turn depends on the type of computer (personal computer, super computer,
etc.) required.

GBHS DSCHANG Page 44


READERS ARE LEADERS
Computer System
A computer can be viewed as a system which consists of a number of interrelated
components that work together with the aim of converting data into information. The physical
parts that make up a computer (the system unit (central processing unit), input, output and
storage unit) are known as hardware. Any hardware device connected to the computer or any
part of the computer outside the CPU and the working memory is known as a peripheral; for
example, keyboard, mouse and monitor.
There are four components required for the implementation of a computerized input-process-
output model:

1. The computer hardware, which provides the physical mechanisms to input and output
data, to manipulate and process data, and to electronically control the various input, output, and
storage components.
2. The software, both application and system, which provides instructions that tell the
hardware exactly what tasks are to be performed and in what order.
3. The data that is being manipulated and processed to form information. This data may be
numeric, it may be alphanumeric, it may be graphic, etc.
4. The communication component, which consists of hardware and software that transport
programs and data between interconnected computer systems.

A: COMPUTER ARCHITECTURE
Computer architecture is a specification detailing how a set of software and hardware
technology standards interact to form a computer system or platform. It also refers to how a
computer system is designed and what technologies it is compatible with. Architecture can
either be closed (incompatible) or opened (compatible).

Storage

Input Unit Main Output Unit


Memory

Control Unit,
ALU &
Registers

GENERAL STRUCTURE OF COMPUTER ARCHITECTURE

Computer architecture is defined technically as the science of selecting and interconnecting


hardware components to create computers that meet functional, performance and cost goals. It
can also be described as the logical structure (design) of the computer system. The computer
architecture forms the backbone for building successful computer systems. The architecture
largely precludes (makes impossible) a computer system's quality attributes such as
performance and reliability.

GBHS DSCHANG Page 45


READERS ARE LEADERS
Stored program concept in computer architecture
Stored-program concept is designed by Hungarian mathematician John Von Neumann. The Von
Neumann Architecture is a design model for a stored-program digital computer that uses a
processing unit and a single separate storage structure to hold both instructions and data.
A stored-program digital computer is one that keeps its programmed instructions as well as its
data in read-write, random access memory (RAM).
The idea behind stored-program concept was to design a computer that includes instruction set
architecture and can store in memory a set of instructions (a program) that details the
computation.
A stored-program design also lets programs modify themselves while running i.e. if the size of
the RAM is not enough to load a program, the totality of that program will not be loaded at once
but will be loaded gradually as the user uses the program.

There are many categories of computer architecture:

- System Design: This includes all hardware components in the system, including data
processors aside from the CPU, such as the graphics processing unit and direct memory access.
It also includes memory controllers, data paths and miscellaneous things like multiprocessing
and virtualization

- Instruction Set Architecture (ISA): This is the embedded programming language of


the CPU. It defines the CPU's functions and capabilities based on what programming it can
perform or process. This includes the word size, processor register types, memory addressing
modes, data formats and the instruction set that programmers use.

- Micro architecture: Otherwise known as computer organization, this type of


architecture defines the data paths, data processing and storage elements, as well as how they
should be implemented in the ISA.

Computer Architecture = Instruction Set Architecture + Computer Organization.


Instruction Set Architecture (ISA) is what the computer does (logical view) and Computer
Organization is how the ISA is implemented (physical view).

THE JOHN VON NEUMANN ARCHITECTURE


A very good example of computer architecture is the Von Neumann architecture proposed in
1945 and is still used by most types of computers today. The von Neumann architecture is a
design model for a stored-program digital computer that uses a processing unit and a single
separate storage structure to hold both instructions and data.
In his architectural model, a computer has 3 subsystems (i) a CPU, (ii) a main memory, and (iii)
an I/O system & also the system bus: that provides a data path between these parts. The main
memory holds the program as well as data and the computer is allowed to manipulate its own
program and instructions are executed sequentially (one at a time).
In the von-Neumann model a single path exists between the control until and main- memory,
this leads to the so-called "von Neumann bottleneck" since memory fetches are the slowest part
of an instruction they become the bottleneck in any computation.

GBHS DSCHANG Page 46


READERS ARE LEADERS

Design of the von Neumann architecture

• Role of computer‘s main memory M (RAM) is to store programs and data as they are being
processed by the CPU.
• RAM permits the CPU to read or change its contents via load or store instructions
respectively.
• M is backed with secondary memory that is hard disk drive or solid state drive.

An instruction set is a list of all the instructions, and all their variations, that a processor can
execute. Instructions include:
• Arithmetic such as add and subtract,
• Logic instructions such as and, or, and not,
• Data instructions such as move, input, output, load, and store,
• Control flow instructions such as goto, if ... goto, call, and return.

1. Central Processing Unit (CPU).


The central processing unit also known as processor, is the brain of the computer system that
processes data (input) and converts it into meaningful information (output). It is referred to as
the administrative section of the computer system that interprets the data and instructions,
coordinates the operations and supervises the instructions.

Characteristics of the CPU


The common characteristics of a CPU can affect it in many different ways to help your
computer: A microprocessor can be characterized by:

GBHS DSCHANG Page 47


READERS ARE LEADERS
Instruction Set: It is the set of instructions that the microprocessor executes.
Number of cores: The core fetches and decodes instructions. So if you add more than one it
will increase the speed of performance of the computer system.
Cache size: The larger the cache size on the CPU, the performance of that computer.
The clock speed: The System Clock is an electronic circuit that generates pulses. The number
of pulses generated by the clock per unit of time is its Clock speed and the faster is the
CPU. The speed of the CPU is measured in Hertz (Hz) with multiples such MEGAHERTZ
(MHZ) which corresponds to the millions of cycles per second (1 MHz = 1 million cycle per
second = number of instructions per second).

CPU examples
The most commonly used CPU in PCs is made by Intel. It has so many variations and the most
common now are; Dual core, core i3, i5, i7…

Main parts of the CPU: The CPU consists of three main subsystems: the arithmetic/logic
unit (ALU), the control unit (CU) and the registers. These three subsystems work together
to provide operational capabilities to the computer.
 Arithmetic Logic Unit (ALU)
This unit performs the arithmetic (add and subtract) and logical operations (AND, OR) on
the available data. The ALU comprises two units: an arithmetic unit and a logic unit.

Arithmetic Unit: The arithmetic unit contains the circuitry that is responsible for
performing the actual computing and carrying out the arithmetic calculations such as addition,
subtraction, multiplication and division. It can perform these operations at a very high speed.

Logic Unit: The logic unit enables the CPU to make logical operations based on the
instructions provided. The logic unit can compare numbers, letters or special characters and
can then take action based on the result of the comparison.

 Control Unit:
The control unit can be thought of as the heart of the CPU. It is made up of the following:
PC (Program Counter): stores the address of next instruction to fetch.
IR (Instruction Register): stores the instruction fetched from memory.
Instruction Decoder: Decodes instruction and activates necessary circuitry.
- Control unit instructs the other parts of the CPU (i.e. ALU and registers) and the
I/O devices on what to do and when to do.
- It determines what data are needed, where they are stored and where to store
the results of the operation as well as sends the control signals to the devices involved
in the execution of the instructions.

 Registers
These are the special-purpose, small, high-speed temporary memory units that holds some
instructions and data/information that the CPU is currently working on. There are various
types of registers present inside a CPU. The most basic and essential registers for any CPU are;

- The Program Counter (PC) is a special register that holds the address of the next
instruction to be fetched from Memory. The PC is incremented to ("point to") the
next instruction while an instruction is being fetched from main memory.

GBHS DSCHANG Page 48


READERS ARE LEADERS
- The Instruction Register (IR) is a special register that holds each instruction to be
executed after it has been fetched from main memory.
- The General Registers are available for the programmer to use in his/her programs.
Typically the programmer tries to maximize the use of these registers in order
to speed program execution.
- Accumulator (ACC): An accumulator is a general-purpose register used for storing
temporary results and results produced by arithmetic logic unit.
- Memory Address Register (MAR): The MAR register is used to store the address
of the location in memory that is to be accessed for reading or writing.
- Memory Buffer Register (MBR): A memory buffer register is used for storing data
either coming to the CPU or data being transferred by the CPU.
- Memory Data Register (MDR): A data register is used for storing the operands and
other data.
- Data Register: A register used in microcomputers to temporarily store data being
transmitted to or from a peripheral device.

The size or length of each register is determined by its function. For example, the memory
address register, which holds the address of the next location in memory to be accessed, must
have the same number of bits as the memory address. Instruction register holds the next
instruction to be executed and, therefore, should be of the same number of bits as the
instruction. (NB: The number and sizes of registers vary from processor to processor. The more
the register and size the faster the CPU).

The number of registers that a CPU has and the size of each (number of bits) help determine the
power and speed of a CPU. For example a 32-bit CPU is one in which each register is 32 bits
wide. Therefore, each CPU instruction can manipulate 32 bits of data. Some characteristics of
CPU registers are:

 Very fast (access times of a few nanoseconds)


 Low capacity (usually less than 200 bytes)
 Very limited expansion capabilities (a change in CPU architecture would be required)
 Expensive.

2. MAIN MEMORY UNIT


Logically, main memory is an integral component of the CPU, but physically it is a separate
part placed on the computer's motherboard. It stores program instructions or data for only as
long as the program pertain its operation. The primary memory is of two types: random
access memory (RAM) and read only memory (ROM).

Main memory can be considered to be organized as a matrix of bits. Each row represents a
memory location, typically this is equal to the word size of the architecture although it can be
a word multiple (e.g. 2 x Word size) or a partial word (e.g. half the word size). Each row also
has a natural number called its address which is used for selecting the row.

GBHS DSCHANG Page 49


READERS ARE LEADERS
 Width (W): How many bits is each memory cell.
 Address width (N): How many bits used to represent each address, determines the
maximum memory size = address space. If address width is N-bits, then address space
is 2N (0, 1,..., 2N-1).

PRIMARY MEMORY
The primary memory allows the computer to store data for immediate manipulation and to keep
track of what is currently being processed. There exist two main types of primary storage
device: Main memories such as RAM and ROM. ROM is a type of "built-in" memory that is
capable of holding data and having that data read from the chip, but not written to. Unlike
Random Access Memory (RAM), ROM is non-volatile which means it keeps its contents
regardless if it has power or not (with the help of a CMOS Battery). Every computer comes with
a small amount of ROM, which contains the boot firmware called BIOS (Basic Input Output
System).
NB: The term ROM is used to describe any type of memory or media that is read only. For
example, a CD-ROM.

RANDOM ACCESS MEMORY (RAM)


RAM is the place where the computer temporarily stores its operating system, application
programs and current data so that the processor can reach them quickly and easily. It is used to
hold both program codes (instructions) and data (numbers, strings etc.) on which the
computer is currently working. It is volatile in nature, which means the data/information it
contains remains only as long as the power is switched ON. Computer architectures also
impose an architectural constraint on the maximum allowable RAM. This constraint is
normally equal to 2Word Size memory locations.

Although slower than register memory, the contents of any location in RAM can still be
―read‖ or ―written‖ very quickly. The time to read or write is referred to as the access time
and is constant for all RAM locations.

NOTE: Random access memory is also called read/write memory because, unlike read-only
memory (ROM) that does not allow any write operation, random access memory allows CPU
to read as well as write data and instructions into it.

RAM can be further classified into two categories:


- SRAM (Static RAM) is the fastest form of RAM but also the most expensive. Due
to its cost it is not used as main memory but rather for cache memory.
- DRAM (Dynamic RAM) is not as fast as SRAM but is cheaper and is used for main
memory. DRAM needs to be refreshed every few milliseconds. The memory
system does this transparently. There are many implementations of DRAM; two
well-known ones are SDRAM and DDR SDRAM.
 SDRAM (Synchronous DRAM) is a form of DRAM that is synchronized with the
clock of the CPU‘s system bus, sometimes called the front-side bus (FSB).
 DDR SDRAM (Double-Data Rate DRAM) is an optimization of SDRAM that
allows data to be transferred on both the rising edge and falling edge of a clock signal
effectively doubling the amount of data that can be transferred in a period of time.

GBHS DSCHANG Page 50


READERS ARE LEADERS

READ ONLY MEMORY (ROM)


ROM is like RAM except that its contents cannot be overwritten and are not lost if power is
turned off i.e. ROM is non-volatile. The ROM stores the initial start-up instructions and
routines in the BIOS (basic input/output system). The instructions in the ROM are built into
the electronic circuits of the chip, which is called firmware. The ROM is also random access
in nature. Various types of ROM;
- PROM (Programmable ROM) is like ROM but allows end-users to write their own
programs and data. It requires special PROM writing equipment. Note: users can
only write-once to PROM.
- EPROM (Erasable PROM). With EPROM the user can erase (using strong ultra-
violet light) the contents of the chip and rewrite it with new contents typically
several thousand times.
- EEPROM (Electrically Erasable PROM). As the name implies the contents of
EEPROMs are erased electrically.

A cheaper version of EEPROM is the FLASH ROM where updates (erase-writes) can only
be performed on blocks of memory, not on individual bytes. The number of erase/write
cycles to a block is typically several hundred thousand before the block can no longer be
written.
- Masked ROM: It a custom programmed or mask programmed when manufactured
and cannot be altered thereafter. The cost for custom built mask for programming is too
expensive.

ASSIGNMENT
1. The third subsystem of Von Neumann architecture; INPUT/OUTPUT.
1.1 INPUT
- Definition,
- Types,
- The two main categories of outputs with their devices,
- Manual input devices,
- Pointing devices,
- Automated input devices like sensors and types of recognition systems and their
readers,
- Other types of input devices.

GBHS DSCHANG Page 51


READERS ARE LEADERS

1.2 OUTPUT
- Definition,
- Types of outputs,
- Types of output devices,
- Distinguish between soft copy output and hard copy output with respect to devices,
- Devices that act as both input and output at the same time.

2. MOTHERBOARD
- DEFINITION,
- TYPES,
- FORM FACTOR,
- MAIN COMPONENTS FOUND ON THE MOBO i.e. the CHIPSETS,
- PICTURE OF A MOBO SHOWING ALL ITS PARTS.

Interconnection of Units
Now, let us discuss the interconnection between the CPU (CU, ALU and registers), the main
memory unit, and the I/O devices, which constitute the entire computer system.

System Bus
It is a set of flat colored wires that enables connections between two or more
components/devices which is designed to transfer several/all bits of a word from source to
destination. The bus and the functional units are interconnected to enable data transport. A bus
can be unidirectional (transmission of data can be only in one direction) or bidirectional
(transmission of data can being both directions). A bus that connects to all the three modules/
components (CPU, memory and I/O devices) is called a system bus.

System bus

System bus is composed of:


 Address bus: It is used to specify a physical memory address. This can include
primary memory (E.g. RAM and ROM), secondary memory (e.g. hard disk drives) and
any other connected devices like monitors, printers, scanners, and keyboards which will all be
mapped to memory. The width of the address bus determines the amount of memory

GBHS DSCHANG Page 52


READERS ARE LEADERS

that can be addressed. It is a unidirectional bus. A 32-bit bus can address 4,294,967,296
(2 ^ 32) bytes of memory. This explains the 4 GB memory restriction on 32-bit operating
systems.

 Data bus: Data lines provide a path for moving data between the system modules.
These are collectively known as data bus. Normally, a data bus consists of 8, 16 or 32
separate lines. The number of lines present in a data bus is called the width of data bus. Data
bus width limits the maximum number of bits which can be transferred simultaneously
between two modules. Unlike the address bus, the data bus is bi- directional (it supports read
and write operations). The data bus is not limited to transferring data; it is also used to
transfer program instructions.

 Control bus: Control bus carries commands from and returns status signals to
the microprocessor. These lines are used for the transmission of commands and timing
signals which validate data and address between the systems modules. It is a unidirectional
bus.

Internal Processor Memories: These are memories placed within the CPU (processor) or is
attached to a special fast bus. Internal memory usually includes cache memory and registers
both of which can be directly accessed by the processor. This memory is used for temporary
storage of data and instructions on which the CPU is currently working. Processor memory is
the fastest among all the memories, but is most expensive also.

Cache memory
A cache memory is a piece of very fast
small memory made from high-speed
static RAM that reduces the time of
accessing data. It is very expensive and
generally incorporated in the processor
where valuable data and program
segments are kept. Major reason for
incorporating cache in the system is that
the CPU is much faster than the DRAM
and needs a place to store information
that can be accessed rapidly. The cache
facilitates the system to catch up with the
processor's speed. The cache fetches the
frequently used data from the DRAM and buffers (stores) it for further processor usage.
Cache can be further categorized into three levels;

i. Level 1 Cache (L1): Level 1 cache, also known as primary cache, is built into the
processor chip. It is a small fast memory area that works together with the Level 2
cache to provide the processor much faster access to important and often used data.

GBHS DSCHANG Page 53


READERS ARE LEADERS

ii. Level 2 Cache (L2): Level 2 cache, also known as secondary cache, is a collection
of static RAM chips that are built onto the motherboard. It is little larger and slower
than L1, but is faster than the main memory. L1 and L2 cache are used
together for optimal use of the processor.

iii. Level 3 Cache (L3): L3 cache memory is an enhanced form of memory present
on the motherboard of the computer. It is an extra cache built into the motherboard
between the processor and the main memory to speed up the processing operations.
Mostly found in some modern computers.

As long as most memory accesses are to cached memory locations, the average latency of
memory accesses will be closer to the cache latency than to the latency of main memory.
The advantage of cache memory is that the CPU does not have to use the motherboard‘s
system bus for data transfer. Whenever data must be passed through the system bus, the data
transfer speed slows to the motherboard‘s capability. The CPU can process data much faster
by avoiding the bottleneck created by the system bus.
Cache memory is sometimes described in levels of closeness and accessibility to the
microprocessor.

MEMORY/STORAGE REPRESENTATION
For measuring computer memory, a standard unit is required. Although the smallest unit of
data that a computer can deal with is a bit (binary digit), the computers generally do not
deal with a single bit. Instead, they deal with a group of eight bits, which is referred as 'byte'.
Various units used to measure computer memory are as follows:
 Bit: It is the smallest unit of data on a machine and a single bit can hold only one
of two values: 0 or 1. Bit is represented by lower case b.
 A nibble is a collection of 4 bits.
 Byte: A unit of eight bits is known as a byte. Hence, a byte is able to contain
any binary number between 00000000 and 11111111. It is represented by upper case
B.
 Kilobyte, Megabyte, Gigabyte and Terabyte.

NOTE: In modern computers, groupings of bytes (usually 2 or 4) called computer words can
represent larger 'chunks' of information.

GBHS DSCHANG Page 54


READERS ARE LEADERS

MEMORY MODULES
In computing a memory module is a grouping of memory chips (DRAM Chips) put onto a
printed circuit board on which memory integrated circuits are mounted which permits easy
installation and replacement in electronic systems such PCs, workstations, and servers.
Depending on how the chips are connected on the circuit board, a module is either a single or
dual inline memory module (SIMM or DIMM).

Single Inline Memory Module (SIMM): A SIMM is a type of memory module containing
RAM with its contacts redundant on both sides. It supports only 32-bits data paths.

Dual Inline Memory Module (DIMM): A DIMM comprises a series of dynamic RAM
integrated circuit mounted on a printed board. DIMM is the predominant memory module in
used nowadays because it supports a 64-bit or wider memory bus.

The primary difference between SIMM and the DIMM modules are as follows;
- SIMMs have opposing pins on either side of the board connecting or tying together
to form a single electrical contact.
- DIMMs have opposing pins on either side of the board that remain electrically
isolated to form two separate contacts.
- DIMMs are used in modern computers that support a 64-bit data path while SIMMs
supports only 32-bits.

Types of Memory/Storage
These are the fundamental types of memory in a computer system:
a) Primary storage device: The primary memory allows the computer to store data for
immediate manipulation and to keep track of what is currently being processed.
There are two main types of primary storage:
- Main memory (RAM and ROM) and
- Internal processor memories (Cache memory and registers).
b) Secondary Memory: This is also known as auxiliary memory. It differs from primary
storage in that it is not directly accessible by the CPU.
c) Tertiary Storage
Tertiary storage is very large storage which is separate from the computer. The most obvious
example of tertiary storage is an automated storage facility where mechanical arms retrieve
media and load it into large computers. Other tertiary storage may simply be off-grounds
locations which allow vital data in various mediums to be safe-guarded for security purposes-
fire, theft, etc.
d) Off-line Storage: Offline storage is storage media which can be inserted into the computer
and used but which can then be removed from the computer and kept elsewhere. Floppy
drives, CD drives, and DVD drives, external HD might also alternately be considered
secondary storage because their drives are usually installed in the computer but the key here is
the media the data is stored on.

GBHS DSCHANG Page 55


READERS ARE LEADERS

Memory/Storage characteristics
Computer memories can be differentiated by evaluating certain core characteristics. These
core characteristics are volatility, mutability, accessibility, and addressability.
1. Volatility
 Volatile memory: A memory device is said to be volatile if its content is
erased/whipped off as soon as the device is switched off from power supply and
having the content immediately updated with any changes in value for example the
RAM.
 Non-volatile memory: A memory is said to be non-volatile if it will retain the
stored information even if it is not constantly supplied with electric power. It is
suitable for long-term storage of information for example; ROM, HDD, USB
sticks, etc.
2. Mutability: Read/write storage or mutable storage allows information to be
overwritten at any time.
 Read only storage retains the information stored at the time of manufacture. E.g.
the ROM
 Write once storage i.e. Write Once Read Many (WORM) allows the information
to be written only once at some point after manufacture. These are called
immutable storage. Examples include CD-ROM and CD-R.
 Slow write, fast read storage: Read/Write storage, which allows information to be
overwritten multiple times, but with the write operation being much slower than the
read operation. Examples include CD-RW and flash memory.
3. Accessibility or Access Mode: Access mode refers to the way the data are accessed
from the memory.
 Random access: Any location in storage can be accessed at any moment in
approximately the same amount of time. Such characteristic is well suited for
primary and secondary storage.
 Sequential access: The accessing of pieces of information will be in a serial
order, one after the other; therefore the time to access a particular piece of
information depends upon which piece of information was last accessed. Such
characteristic is typical of off-line storage.
 Direct access: In some cases, the data are accessed neither in a random nor in a
sequential fashion, but using a combination of both the modes. This type of semi
random mode exists in the magnetic disk.
4. Addressability: Memory can be address by location, by file or by content.
Other characteristics of computer memory involve; Access time, storage capacity and cost.

Memory hierarchy
A "memory hierarchy" in computer storage distinguishes each level in the "hierarchy" by
response time. Since response time, complexity, and capacity are related, the levels may also
be distinguished by the controlling technology. The figure below illustrates the memory
hierarchy.

GBHS DSCHANG Page 56


READERS ARE LEADERS

B: STORAGE
Introduction
Computer storage, also known as computer data storage or secondary storage refers to
computer components and recording media that retain digital data used for computing for
some interval of time. Computer data storage provides one of the core functions of the
modern computer, that of information retention. Many different forms of storage based on
various natural phenomena have been invented. So far, no practical universal storage medium
exists, and all forms of storage have some drawbacks. Therefore, a computer system usually
contains several kinds of storage, each with an individual purpose. This part discusses the
computer storage devices and their various facets such as their types, how they work, what
purpose do they solve, and so on.

Generalities
Computer memory and storage are usually used interchangeably which is not correct.
Computer memory is any physical device capable of storing information temporarily
(RAM) while computer storage is a physical device capable of storing information
permanently (HDD, SSD, USB stick, External HD, CD/DVD) or virtually using the latest
storage medium called CLOUD STORAGE.

Storage technologies
Most commonly used data storage technologies are semiconductor, magnetic, optical,
magneto-optical and cloud storage. While paper still sees some limited usage. Some other
fundamental storage technologies have also been used in the past or are proposed for
development.
 Semiconductor storage media: Semiconductor memory uses semiconductor-based
integrated circuits to store information. A semiconductor memory chip may contain
millions of tiny transistors or capacitors. Both volatile and non-volatile forms of
semiconductor memory exist.
 Magnetic storage media: Magnetic storage uses different patterns of magnetization
on a magnetically coated surface to store information. In modern computers, magnetic
storage will take these forms: Magnetic disk (Floppy disk, Hard disk drive) and
Magnetic tape data storage.

GBHS DSCHANG Page 57


READERS ARE LEADERS

 Optical storage media: The typical optical disc, stores information in deformities on
the surface of a circular disc and reads this information by illuminating the surface
with a laser diode and observing the reflection.
 Magneto-optical disc storage media: Magneto-optical disc storage is optical disc
storage where the magnetic state on a ferromagnetic surface stores information. The
information is read optically and written by combining magnetic and optical methods.
 Cloud storage media: This is a new storage media where information is stored on-
line, access on-line with the help of Internet connection and from any computer or
computer related device.

SECONDARY STORAGE DEVICES


This is also known as auxiliary memory. It differs from primary storage in that it is not
directly accessible by the CPU. The secondary memory provides backup storage for
instructions (computer programs) and data. The instructions and data stored on secondary
storage devices are permanent in nature. They can only be removed if the user wants it so or
the device is destroyed.

Magnetic Tape: It is a recording medium consisting of a thin tape with a coating of a fine
magnetic material, used for recording analogue or digital data. Data is stored in frames across
the width of the tape. The frames are grouped into blocks or records which are separated from
another blocks by gaps. Magnetic tape is a serial access medium, similar to an audio cassette,
and so data (like the songs on a music tape) cannot be quickly located. However large
amounts of information can be stored within magnetic tape. This characteristic has prompted
its use in the regular backing up of hard disks.

Advantages and disadvantage of Magnetic Tapes


Advantages of magnetic tape Disadvantages of magnetic tape
Probably the cheapest form of storage per Serial access so can be quite slow to
megabyte of storage access data

GBHS DSCHANG Page 58


READERS ARE LEADERS

Can store large amounts of data – up to 1 Need a special piece of equipment to


Terabyte per tape cartridge record and read the data on the tape
The data may be corrupted if the tape is
Can be set up to do the back up overnight
placed near a strong magnetic field e.g.
or over the weekend
a large speaker or magnet
They are portable because they are
The data on such devices are difficult to
compact in size, light weight and
recover even if a minor bit error occurs
removable.
They are not flexible as compared to
Flexible. other media types when file updating
requires record insertion or deletion.

Magnetic Disk: The magnetic disks are the most widely used and popular medium for direct
access secondary storage. They offer high storage capacity and reliability and have capability
to access the stored data directly. A magnetic disk comprises a thin piece of plastic/metal
circular plate/platter, which is coated with a magnetic oxide layer. The data are represented as
magnetized spots on the disk. Data are recorded on the disk in the form of tiny invisible
magnetized and non-magnetized spots (representing 1s and 0s) on the coated surfaces of the
disk.

Storage Organization of a Magnetic Disk.


A disk‘s surface is divided into a number of invisible concentric circles called tracks. The
tracks are numbered consecutively from outermost to innermost starting from zero. The
number of tracks on a disk may be as few as 40 on small, low-capacity disks, to several
thousand on large, high-capacity disks. Each track of a disk is subdivided into sectors: There
are 8 or more sectors per track. A sector typically contains 512 bytes. Disk drives are
designed to read/write only whole sectors at a time. The track sectors are grouped into a
collection known as cluster. It refers to the basic allocation unit for storage on a disk,
consisting of one or more track sectors. The number of track sectors that make up one cluster
depends on the type and size of the media. The term 'cluster' also refers to the minimum
amount of disk space used by a single file. Even if the file occupies only part of a cluster, the
entire cluster is allocated to the file and marked as used space.

Disk formatting: It is the process of preparing a new disk by the computer system in which
the disk is to be used. There exist two type of formatting:
a) Low-level disk formatting
- Disk drive‘s read/write head lays down a magnetic pattern on the disk‘s surface.
- Enables the disk drive to organize and store the data in the data organization defined for the
disk drive of the computer.
b) OS-level disk formatting
- Creates the File Allocation Table (FAT) that is a table with the sector and track locations of
data.

GBHS DSCHANG Page 59


READERS ARE LEADERS

Storage capacity of a disk system = Number of recording surfaces


x Number of tracks per surface
x Number of sectors per track
x Number of bytes per sector.
Advantages of Magnetic Disks.
More suitable than magnetic tapes for a wider range of applications because they
support direct access of data.
Random access property enables them to be used simultaneously by multiple users as
a shared device.
Suitable for both on-line and off-line storage of data.
The cost per bit of storage is low for magnetic disks.
An additional cost benefit is that magnetic disks can be erased and reused many times.
Floppy disks and zip disks are compact and light in weight. Hence they are easy to
handle and store.
Very large amount of data can be stored in a small storage space.
Data transfer rate for a magnetic disk system is normally higher than a tape system.

Limitations of Magnetic Disks.


A disk crash or drive failure often results in loss of entire stored data. It is not easy to
recover the lost data.
Some types of magnetic disks are not so easily portable like magnetic tapes.
The cost of magnetic disks is low, but the cost of magnetic tapes is even lower.
Must be stored in a dust-free environment.
They possess slow data access speed as compared to the magnetic tapes.

Types of Magnetic Disk


All magnetic disks come in the form of round platters. These disks are available in different
sizes, shapes and designs. Some are attached to the read/write head assembly, whereas some
are available in the form of removable disks. Broadly, magnetic disks can be classified into
three types: floppy disk (diskette), hard disk and zip disk.

Optical Disk: An optical disk is a storage medium from which data is read and to which it is
written by lasers. A typical optical disc stores information in deformities on the surface of a
circular disc and reads this information by illuminating the surface with a laser diode and
observing the reflection. The optical disk storage system consists of a rotating disk coated
with a thin layer of metal (aluminum, gold or silver) that acts as a reflective surface and a
laser beam which is used as a read/write head for recording the data onto the disk.

There are basically three classes of optical disks:


 CD-ROM: Like audio CDs, CD-ROMs come with data already encoded onto them. The
data is permanent and can be read any number of times, but CD-ROMs cannot be modified.
 WORM: Stands for write-once, read-many. With a WORM disk drive, you can write data
onto a WORM disk, but only once. After that, the WORM disk behaves just like a CDROM.
 Erasable: Optical disks that can be erased and loaded with new data, just like magnetic
disks. These are often referred to as EO (Erasable Optical) disks.

Types of Optical Disks


a) Compact Disk (CD): CD is the most popular and the least expensive type of optical disk. It
was originally intended only for storing music (in the form of digital audio) and can record
about 80 minutes of uninterrupted playing time. Compact disks are available in various

GBHS DSCHANG Page 60


READERS ARE LEADERS

formats: CD-ROM (compact disk-read-only memory), CD-R (compact disk-recordable) and


CD-RW (compact disk-rewritable) disks.
- A CD-ROM disk comes with pre-recorded data by the manufactures and can be read but
cannot be altered.
- CD-R is a type of WORM (write once-read many) disk that allows you to record your own
data. Once written, the data on the CD-R can be read but cannot be altered.
- A CD-RW disk is rewritable version of CD-R, which means, it allows writing, erasing and
rewriting of the data several times.
The data recorded on all CD formats can be read using the CD-ROM drive; however, to write
data on CD-R and CD-RW disks, one needs a special peripheral device known as CD-writer
(or CD-burner)
b) Digital Versatile Disk (DVD)
DVD, initially called digital video disk or digital versatile disk, is a high-capacity data storage
medium.

NOTE: Like CDs, DVDs are also available in different formats: DVD-ROM, DVD-R and
DVD-RW.

c) Blu-ray Disk
A Blu-ray Disc is a high density optical disc storage medium, which is used for the storage of
all high-definition digital formats like audio, video, play-station games and so on. They have
the same physical appearance as a DVD. The name ―BLU-RAY‖ is actually a combination of
the color ―blue‖ and ―ray‖. Here blue refers to the blue color of the laser that is used for its
reading and ray refers to the optical ray.
Like CDs and DVDs, Blu-ray disks are also available in different formats:
BD-ROM: It comes with prerecorded content that can only be read.
BD-R: It is a WORM type of disk on which you can record data only once.
BD-RW: It is similar to BD-R disk, but the difference is that it is rewritable. This
means that the data can be erased and recorded a number of times on the same disk.
BD-RE: It is also a rewritable disk, but is used only for high-definition audio/video
and television recording.

Blu-Ray Disc (BD) vs. DVD

• Both of them have the same physical appearance. [Thickness = 1.2 mm]
• The single layer Blu-ray disc can store up to 27 GB data. A single layer DVD can hold only
4.7 GB of data.
• A DVD needs two substrates and they should be bonded. But a Blu-ray disc requires only
one substrate.
• The production cost of Blu-ray is lesser than that of a DVD because there is no need for
bonding of substrates.
• The Blu-Ray disc uses violet-blue laser with improved lens specifications, while a DVD
uses red laser.

Magneto-Optical Disk.
As implied by the name, these disks use a hybrid of magnetic and optical technologies. A
magneto-optical disk writes magnetically (with thermal assist) and reads optically using the
GBHS DSCHANG Page 61
READERS ARE LEADERS

laser beam. A magneto-optical disk drive is so designed that an inserted disk will be exposed
to a magnet on the label side and to the light (laser beam) on the opposite side. The most
common are; memory sticks (memory cards), USB keys/pen drives and USB external hard
drives.

Assignment: Do a brief research on the storage media “cloud storage” and add to the other
assignment above.
Plan
- Introduction,
- Definition,
- Pros and Cons,
- Access mode,
- Compare with the other storage mediums.

Solid State Drives (SSD): A solid-state drive is a storage device that uses integrated circuit
assemblies as memory to store data persistently, typically using flash memory chips.
Being familiar with USB memory sticks - SSD can be thought of as an oversized and more
sophisticated version of the humble USB memory stick. Like memory stick storage, there are
no moving parts to an SSD. Rather, information is stored in microchips. Conversely, a hard
disk drive uses a mechanical arm with a read/write head to move around and read information
from the right location on a storage platter. This difference is what makes SSD speed so much
faster. An SSD does not have a mechanical arm to read and write data, it instead relies on an
embedded processor called a controller to perform operations related to reading and writing
data. The controller is a very important factor in determining the SSD read write speed.
As an analogy, what‘s quicker? Having to walk across the room to retrieve a book to get
information or simply magically having that book open in front of you when you need it?
That‘s how an HDD compares to an SSD; it simply requires more physical labor (mechanical
movement) to get information.

Serial Advanced Technology Attachment (SATA) is a computer bus that connects host bus
adapters to mass storage devices such as HDD, optical drives, and SSD. Newer version is
external SATA (eSATA which is an extension that enables it to be attached externally).
SATA is the successor of Parallel ATA (PATA).

SSD versus HHD Comparison


Now it‘s time to do some comparison and determine which might be best for your individual
needs – SSD or HDD? The best way to compare is to use a table with a side by side
comparison of items in which a tick indicates an advantage over the other.
Attribute SSD (Solid State Drive) HDD (Hard Disk Drive)
Power Draw / Battery Less power draw, More power draw, averages 6
Life averages 2 – 3 watts, – 7 watts and therefore uses
resulting in 30+ minute more battery
battery boost √
Cost Expensive, roughly $0.20 Only around $0.03 per
per gigabyte (based on gigabyte, very cheap (buying
buying a 1TB drive) a 4TB model) √

GBHS DSCHANG Page 62


READERS ARE LEADERS

Capacity Typically not larger than Typically around 500GB


1TB for notebook size and 2TB maximum for
drives; 4TB max for notebook size drives; 10TB
desktops max for desktops √
Operating System Boot Around 10-13 seconds Around 30-40 seconds
Time average bootup time √ average bootup time
Noise There are no moving Audible clicks and spinning
parts and as such no sound can be heard

Vibration No vibration as there are The spinning of the platters
no moving parts √ can sometimes result in
vibration
Heat Produced Lower power draw and HDD doesn‘t produce much
no moving parts so little heat, but it will have a
heat is produced √ measurable amount more
heat than an SSD due to
moving parts and higher
power draw
Failure Rate Mean time between Mean time between failure
failure rate of 2.0 million rate of 1.5 million hours
hours √
File Copy / Write Speed Generally above 200 The range can be anywhere
MB/s and up to 550 MB/s from 50 – 120MB/s
for cutting edge drives √
Encryption Full Disk Encryption Full Disk Encryption
(FDE) Supported on (FDE) Supported on some
some models √ models √
File Opening Speed Up to 30% faster than Slower than SSD
HDD √
Magnetism Affected? An SSD is safe from Magnets can erase data
any effects of magnetism √

If we tally up the checkmarks, the SSD gets 9 and HDD gets 3. Does that mean that an SSD is
three times better than an HDD? Not at all. As we mentioned earlier, it all depends on
individual needs. The comparison here is just to lay out the pros and cons for both options. To
aid you even more, here are some rules to follow when you decide which drive is best for you:

A HDD might be the right choice if;


- You need lots of storage capacity up to 10TB,
- Don‘t want to speed much money,
- Don‘t care too much about how fast a computer boots up or opens programs.

A SSD might be the right choice if;


- You are willing to pay for faster performance,

GBHS DSCHANG Page 63


READERS ARE LEADERS

- Don‘t mind limited storage capacity or can work around that (though consumer
SSD now go up to 4TB and enterprise run as high as 60TB).

Mass Storage Devices: To get a vast amount of storage capacity in a computer system, a
different kind of storage system is used. In such type of system, multiple units of similar kinds
of storage media are associated together to form a chain of mass storage devices. These
storage media may include multiple magnetic tape reels or cartridges, multiple arrays of
magnetic disks or multiple CD-ROMs as storage devices. However, they have huge amount of
storage capacity and possess minimum cost per bit storage. Mass storage devices are cost-
effective option to the online tapes and disks storage in situations where large storage capacity
is required and where prompt data access is not essential. When used as offline storage, they
are referred as an archival storage.

Broadly speaking, mass storage devices are categorized into three types:
• Redundant Array of Inexpensive/Independent Disks/Drives (RAID): It is a data storage
virtualization technology. The basic idea of RAID is to combine multiple physical hard disks
into an array of disk drives to obtain high performance, large capacity and reliability and
reduce data redundancy. These arrays of drives appear to the host computer as a single logical
drive.
It employs an error protection scheme called ―parity‖ a widely used method in information
technology to provide fault tolerance in a given set of data. There is Nested RAID also c called
HYBRID RAID which combines two or more RAID levels to gain more strength. RAID has
at least 7 levels.

• Automated Tape Library: Also called a tape silo, tape robot or tape jukebox is a storage
device that contains one or more tape drives, a number of slots to hold tape cartridges, a
barcode reader to identify tape cartridges and an automated method for loading tapes (a
robot). Tape libraries can contain millions of tapes and can store immense amounts of data
ranging from 20TeraBytes to 2.1ExaBytes (multiple thousands times that of a HD). Because
of their slow sequential access and huge capacity, they are primarily used for backups and as
the final stage of digital archiving.

• CD-ROM Jukebox: The JUKEBOX is a sound program that enables you to play nonstop
music in the easiest way - either as back ground music but also specific by play-, artist- and
genre lists. No matter if you are in the middle of creating a new play list, deleting or moving a
song, it will never happen that your stereo remains silent. Therefore, the structure of the
JUKEBOX is very simple and also ideal for touch screen usage.

The CD-ROM Jukebox coupler provides the following features:


- Management of CD-ROMs in Jukebox.
- Automatic transfer of audio used for transmission.
- Automatic access to audio for audition/edition.
- Access to multiple media sources for restoring position.
- Management of priority between the different tasks.

The coupler includes a man machine interface to perform the following features:

GBHS DSCHANG Page 64


READERS ARE LEADERS

 Load a CD-ROM,
 Eject a CD-ROM,
 Change location of a CD-ROM,
 Load/unload a player with a CD-ROM,
 Search a file in the Jukebox.

FUNCTIONING OF THE PROCESSOR


Competence:
- Explain how a CPU functions,
- Understand the different streams of the CPU,
- Distinguishing between the processor architectures,
- Establishing the advantages of each processor architecture,
- Selecting machine for use based on processor,
- Explaining the machine cycle,
- Contrasting Polling and Interrupts.

Introduction
A processor is a logic circuit that responds to and processes the basic instructions that drive
the computer. It is seen as the main and most (BRAIN) crucial integrated circuitry (IC) chip in
a computer as it is responsible for interpreting most of the computers demands. The CPU four
primary operations are to fetch, decode, execute and write back.
- Fetch is the operation which receives the instructions from program memory i.e. the
RAM.
- Decode is where the instruction is converted to understand which other parts of the
CPU are needed to continue the operation. This is performed in the instruction
decoder.
- Execute is where the operation is performed. Each part of the CPU that is needed is
activated to carry out the instructions.
A CPU is typically a small device with pins on it facing down in a MOBO. Most CPUs today
are multi-core which means that the chip or IC contains two or more processors for enhanced
performance, reduced power consumption and more efficient simultaneous processing of
multiple tasks. Most CPUs have two-four cores; however, this number can increase up to
thirty two cores. If a CPU can only process a single set of instructions at a time, then it is
considered as a single-core processor. If a CPU can process two sets of instructions at a time,
it is called a dual-core processor; four sets would be considered a quad-core. The more cores,
the more instructions at a time a computer can handle. Some processors are multi-threading
which uses virtualized processor cores.

Types of Processor According To Flynn's Taxonomy


Flynn‘s taxonomy is a classification of computer architecture proposed by Michael J. Flynn. It
has been used as a tool in the design of modern processors and their functionalities.
 SISD: (single instruction stream, single data stream). Conventional computer
architecture with 1 processor; instructions are done sequentially i.e. one at a time. It is
a single computer which exploits no parallelism in either the instruction or data
streams. Single control unit fetches single instruction stream from memory. The
control unit then generates appropriate control signals to direct single processing

GBHS DSCHANG Page 65


READERS ARE LEADERS

element to operate on single data stream i.e. one operation at a time. Old PCs,
mainframe computers or Macintosh is of this type.

 SIMD: (single instruction stream, multiple data streams). A single instruction


processing unit called a controller and multiple data processing units. It means that
all parallel units share the same instruction but they carry it out on different data
elements. Instructions can be executed sequentially such as by pipelining or in
paralled by multiple functional units.
The Thinking Machines CM-1 and MassPar MP-1 were examples of such
architecture.
 MISD: (multiple instruction streams, single data stream). This category is which
multiple instructions operate on one data stream and must agree on the result. It is an
uncommon architecture which is generally used for fault tolerance. E.g. the space
shuttle flight control computer.

 MIMD: (multiple instruction streams, multiple data stream). Here multiple


autonomous processors simultaneously execute different instructions on different
data. MISD architecture include multi-core superscalar processors and distributed
systems using either one shared memory or a distributed memory space. This is the
widest and most successful category of parallel computers. It means parallel units
have separate instructions so each of them can do something different at any given
time; one may be adding, another multiplying, yet another evaluating a branch
condition, and so on. Nowadays, Dell, IBM, and HP servers are of this type.

Types of Microprocessor According to instructions set architecture


Processors differ from one another by their instruction sets. If the same program can run on
two different processors, they are said to be compatible. For example, programs written for
IBM computers may not run on Apple computers because these two architectures (different
processors) are not compatible. Based upon the instruction set, there are two types of
architectures; Complex Instruction Set Computer (CISC) and Reduced Instruction Set
Computer (RISC).
GBHS DSCHANG Page 66
READERS ARE LEADERS

 CISC Architecture
It is an ISA which has fewer instructions per program than a RISC i.e. it minimize the number
of instructions per program ignoring the number of cycles per instruction. It emphasis on
building complex instructions directly into the hardware. Its architecture is designed to
decrease the memory cost because more storage is needed in large programs resulting in
higher memory cost. To resolve this, the number of instructions per program can be reduced
by embedding the number of operations in a single instruction.

To make compiler development easier, complex instruction set computer (CISC) was
developed. The sole motive of manufacturers of CISC-based processor was to manufacture
processors with more extensive and complex instruction set. Example, instead of making a
compiler to write long machine instructions for calculating a square root, a CISC processor
would incorporate a hardwired circuitry for performing the square root in a single step.
Writing instructions for a CISC processor is comparatively easy because a single instruction
is sufficient to utilize the built-in ability. Most of the PCs today include a CISC processor.

 RISC Architecture
Reduced instruction set computer (RISC) is a processor architecture that utilizes a small,
highly optimized set of instructions. The concept behind RISC architecture is that a small
number of instructions are faster in execution as compared to a single long instruction. To
implement this, RISC architecture simplifies the instruction set of the processor, which helps
in reducing the execution time. Optimization of each instruction in the processor is done
through a technique known as pipelining. RISC is mostly used by super computers.

Comparing CISC and RISC Architectures


Basic CISC RISC
Instruction Set Complex instructions Simple instructions
Program Code Size Smaller Lengthier

Processor Size Increased hardwired Reduced hardwired circuitry lead


circuitry to reduce processor size
Memory Usage leadsmemory
Less to increased processor
intensive More memory intensive
size
Power More power Less power
Consumption
Heating More heat Less heat
Length Fixed length instructions Variable length instructions

CPU examples
The most commonly used CPU in PCs is made by Intel. Since IBM chose the Intel 8088
chip for the original IBM PC, most PC clones have used one of the Intel series of CPUs:
→ 8088 - used in IBM PC,
→ 80286 - used in IBM PC AT,
→ 80386 - used in first PC clone from Compaq,
GBHS DSCHANG Page 67
READERS ARE LEADERS

→ 80486 - you heard phrases like ―I have a 486 PC‖,


→ Pentium I, Pentium II, Pentium III, and Pentium IV - Most desktop PCs in 2004
used the Pentium IV chip.
A computer always have only one processor chip that can have one, two, four, six, eight or
twelve cores. Currently an 18-core processor is the best available with PCs. A core is the part
of the chip that does the processing work i.e. each core is a CPU. A computer chip or
simple chip or IC (Integrated Circuit) is a semiconductor material embedded with
integrated circuitry that comprises the processing and memory units of modern digital
computers.

→ Dual core (2 cores),


→ The Intel’s core i models): Intel have numbers that mean so much to its CPU models.

IntelR CoreTM i7 – 6700 K.


- IntelR CoreTM is the brand.
- I7 is the brand modifier.
- 6 is the generation indicator.
- 700 are the SKU Numeric digits.
- K is the product line Suffix.

IntelR CoreTM i7 – 6920 H Q


- IntelR CoreTM is the brand.
- I7 is the brand modifier.
- 6 is the generation indicator.
- 920 are the SKU Numeric digits.
- H is the letter Suffix.
- Q is the product line Suffix.

SKU = Stock Keeping Unit: It is a unique


value that represents a distinct salable item
(product or service) and all its attributes.

GBHS DSCHANG Page 68


READERS ARE LEADERS

The model number is typically followed by one or a combination of the following letters;
 U: Ultra low power. Used for laptops processors. It draws less power and better for
the battery.
 Y: Low power. Found in older generation laptops and mobile processors.
 T: Power optimized. For desktop processors.
 Q: Quad-Core. The Q rating is only for processors with four physical cores.
 H: High performance Graphics. The chipset has one of Intel‘s better graphics units in
it.
 G: Includes Discrete Graphics. Typically found on laptops meaning there is a
dedicated GPU with the processor.
 K: Unlocked. This means you can over clock the processor above its rating.
NB: More on this at [Link]

→ Core i3 (2 cores), i5 (some have 2 cores and some have 4 cores), i7 (10 cores), i9 (12
cores).
1. A dual core is a processor with two processors or execution cores in the same IC. Each
processor has its own cache and controller which enables it to function as efficiently as a
single processor.
2. Quad core is a chip with four independent units called cores that read and execute CPU
instructions.
3. Clock speed is the rate at which a processor can complete a processing cycle i.e. number
of cycles (pulses) per second generated by an oscillator that sets the tempo for the
processor. Typically measured in Megahertz (millions of pulses per second) or Gigahertz
(billions of pulses per second). However, it is important to note that a 1.8GHz CPU is
not necessarily twice as fast as a 900MHz CPU. This is because different CPUs use
different architectures. For example one CPU may require more clock cycles to
complete a multiplication instruction than another processor. If the 1.8GHz CPU can
complete a multiplication instruction in 4 cycles, while a 900MHz CPU takes 6 cycles,
the 1.8GHz CPU will perform the operation more than twice as fast as the 900MHz
processor.

You might think that a more cores will make your processor fast, but that is not the case. More
cores consume power and produce more heat. More cores are faster only if a program can split
tasks between the cores. The clock speed and architecture are crucial factors to speed. Not all
programs are developed to split tasks between cores.

Another feature worth looking at in Intel‘s model is hyper-threading technology – It is a


technology that boosts the speed where a single physical core acts as two virtual cores thus
performing multiple tasks simultaneously without activating the second physical core (which
would require more power from the system). If both processors are active and using this
technology, four virtual cores will compute faster. However, physical cores are faster than
virtual cores so a quad core will perform faster than a dual core with hyper-threading
technology. Core i5 does not support hyper-threading technology.

The Instruction Cycle


An instruction cycle (sometimes called fetch-decode-execute cycle, or FDX) is the basic
operation cycle of a computer which a CPU follows from boot-up until the computer has shut
down in order to process instructions. It is the process by which a computer retrieves a program
GBHS DSCHANG Page 69
READERS ARE LEADERS
instruction from its memory, determines what actions the instruction requires, and carries out
those actions.

A simple instruction cycle consists of the following steps:


1. Fetch: obtaining a program instruction or data item from the memory.
2. Decode: translating the instruction into commands the computer can
execute.
3. Execute: carrying out the commands.
4. Stores: store the information in the memory.

How does this all work together?


Program Execution:
– PC is set to the address where the first program instruction is stored in memory.
– Repeat
Fetch instruction,
Decode instruction,
Execute instruction,
Until HALT instruction or fatal error.

The Fetch Cycle


During this cycle, the instruction which is to be executed next is fetched from the memory to
the processor by the control unit. The steps performed during the fetch cycle are as follows:
1. PC --> MAR: This address is transferred from PC to MAR.
2. Fetch signal: The instruction is read from the memory.
3. PC + 1 --> PC: Then, the PC is incremented by 1 (PC = PC + 1) and instruction so
obtained is transferred to the IR.
4. In the IR, the unique bit patterns that make up machine language are extracted and
sent to the decoder.

The Decode Cycle


The decode cycle is responsible for recognizing the operation that the bit pattern represents and
activating the correct circuitry to perform that operation by the control unit. The steps
performed during the decode cycle are as follows:
1. The operation code (op-code) of the instruction is first read and then interpreted in
the machine language.

GBHS DSCHANG Page 70


READERS ARE LEADERS
2. The data required by the instruction (operand) are then transferred to the data register
(DR).

The Execute Cycle


Once the instruction has been decoded, the operation specified by the op-code is performed
on user-provided data in ALU. The execution cycle involves following steps:
1. The data is fetched into ALU from the memory location pointed by memory address
register.
2. The operation specified by the decoded op-code is performed on the data in ALU.

INTERRUPT AND POOLING


 Interrupt
An interrupt is an event external to the currently executing process that causes a change
in the normal flow of instruction execution; usually generated by hardware devices. Hardware
interrupts are used by devices to communicate that they require attention from the operating
system. A software-generated interrupt caused either by an error or by a specific request from
a user program is called trap.
In most computer systems, interrupts are handled as quickly as possible. When an interrupt is
received, any current activity is stopped and an interrupt handler (interrupt controller) is
executed. There exist two type of interrupt: maskable and non-maskable interrupts

An interrupt is said to be masked when it has been disabled or when the CPU has been
instructed to ignore it. A non-maskable interrupt (NMI) cannot be ignored and is generally
used only for critical hardware errors.

 Polling
Polling or Polled operation refers to actively sampling the status of an external device by a
client program as a synchronous activity. Polling has the disadvantage that if there are too
many devices to check, the time required to poll them can exceed the time available to
service the I/O device.

CHAPTER 7: OPERATING SYSTEMS

Competence:
By the end of this lesson, the learner should be able to…
 Identifying OS types, their evolution, and interfaces,
 Determining the functions of OS,
 Distinguishing between pre-emptive and non-pre-emptive scheduling strategies,
 Describing scheduling algorithms,
 Explaining the concept of processor sharing,
 Explaining the concept of deadlock,
 Identifying some command line environments and using commands to create and
manage files and folders,
 Using commands to configure networks, formatting a storage,
 Creating a batch file,
 Identifying the properties of some stand-alone and server OS,
GBHS DSCHANG Page 71
READERS ARE LEADERS
 Setting up OS to connect to a wired or wireless network,
 Setting up OS to avoid unauthorized access into system.

Introduction
An operating system (OS) is a collection of software that manages computer hardware
resources and provides common services for computer programs. The operating system is a vital
component of the system software in a computer system.
An operating system (OS) is software which performs all the basic tasks like file management,
memory management, process management, handling input and output, and controlling
peripheral devices such as disk drives and printers.
Some popular Operating Systems include Linux Operating System, Windows Operating
System, VMS, OS/400, AIX, z/OS, iOS, etc.

Definition
An operating system is a program that acts as an interface between computer user and the
computer hardware and controls the execution of all kinds of programs.
Operating system along with hardware, application and other system software, and users
constitute a computer system. It is the most important part of any computer system.
At the simplest level, an operating system does two things.
1. It manages the hardware and software resources of the system. These resources
include such things as the processor, memory, disk space and more.
2. It acts as an interface between the user and the physical machine that is it provides a
stable, consistent way for applications to deal with the hardware without having to
know all the details of the hardware.

Evolution of Operating Systems


Historically operating systems have been tightly related to the computer architecture.
Operating systems have evolved through a number of distinct phases or generations which
corresponds roughly to the decades.

The 1940's - First Generations (Serial Processing): The earliest electronic digital computers
had no operating systems. Machines of the time were so primitive that programs were often
entered one bit at time on rows of mechanical switches (plug boards). Programming languages
were unknown (not even assembly languages).
GBHS DSCHANG Page 72
READERS ARE LEADERS
The 1950's - Second Generation: By the early 1950's, The General Motors Research
Laboratories implemented the first operating systems in early 1950's for their IBM 701. The
system of the 50's generally ran one job at a time. These were called single-stream batch
processing systems because programs and data were submitted in groups or batches.

The 1960's - Third Generation The systems of the 1960's were also batch processing
systems, but they were able to take better advantage of the computer's resources by running
several jobs at once. So operating systems designers developed the concept of
multiprogramming in which several jobs are in main memory at once; a processor is switched
from job to job as needed to keep several jobs advancing while keeping the peripheral devices in
use. Other features present in this generation was time-sharing technique, a variant of
multiprogramming technique, in which each user has an on-line (i.e., directly connected)
terminal and SPOOLING (Simultaneous Peripheral Operation On Line). Development of
Minicomputer and UNIX (Uniplexed Information and Computing Service).

Fourth Generation: Microprocessor technology evolved to the point that it became possible
to build desktop computers as powerful as the mainframes of the 1970s. Two operating systems
have dominated the personal computer scene: MS-DOS and WINDOWS (with user friendly
interface) written by Microsoft, Inc. for the IBM PC and other machines using the Intel 8088
CPU and its successors, and UNIX, which is dominant on the large personal computers using
the Motorola 6899 CPU family. NOS and distributed OS also came up.

Following are some of important functions of an Operating System.


1. Memory management
Memory management refers to management of Primary Memory or Main Memory. Main
memory is a large array of words or bytes where each word or byte has its own address. Main
memory provides a fast storage that can be accessed directly by the CPU. For a program to be
executed, it must in the main memory. An Operating System does the following activities for
memory management;
 Keeps tracks of primary memory, i.e., what part of it are in use by whom, what parts are not in
use.
 In multiprogramming, the OS decides which process will get memory when and how much.
 Allocates the memory when a process requests it to do so.
 De-allocates the memory when a process no longer needs it or has been terminated.
2. Process management
In multiprogramming environment, the OS decides which process gets the processor when and
for how much time. This function is called process scheduling. An Operating System does the
following activities for processor management:
 Keeps tracks of processor and status of process. The program responsible for this task is
known as traffic controller.
 Allocates the processor (CPU) to a process.
 De-allocates processor when a process is no longer required.

Process
A process is basically a program in execution. The execution of a process must progress in a
sequential fashion. A process is defined as an entity which represents the basic unit of work to
GBHS DSCHANG Page 73
READERS ARE LEADERS
be implemented in the system. When a program is loaded into the memory and it becomes a
process, it can be divided into four sections ─ stack, heap, text and data.

Process life cycle


When a process executes, it passes through different states. These stages may differ in different
operating system, and the names of these states are also not standardized. In general, a process
can have one of the following five states at a time; start, ready, running, waiting or terminate.

3. Device management
An Operating System manages device communication via their respective drivers. It does the
following activities for device management;
 Keeps tracks of all devices. The program responsible for this task is known as the I/O
controller.
 Decides which process gets the device when and for how much time.
 Allocates the device in the most efficient way.
 De-allocates devices.
4. File management
A file system is normally organized into directories for easy navigation and usage. These
directories may contain files and other directions. An Operating System does the following
activities for file management;
 Keeps track of information, location, uses, status etc. The collective facilities are often known
as file system.
 Decides who gets the resources.
 Allocates the resources.
 De-allocates the resources.
5. Other important activities of an OS
Following are some of the important activities that an Operating System performs:
 Security: By means of password and similar other techniques, it prevents unauthorized access
to programs and data.
 Control over system performance: Recording delays between request for a service and
response from the system.
 Job accounting: Keeping track of time and resources used by various jobs and users.
 Error detecting aids: Production of dumps, traces, error messages, and other debugging and
error detecting aids.

GBHS DSCHANG Page 74


READERS ARE LEADERS
 Coordination between other software and users: Coordination and assignment of
compilers, interpreters, assemblers and other software to the various users of the computer
systems.

Types of OSs
Operating systems are there from the very first computer generation and they keep evolving
with time. In this section, we will discuss some of the important types of
operating systems which are most commonly used.
 Batch OS
The users of a batch operating system do not interact with the computer directly. Each user
prepares his job on an off-line device like punch cards and submits to the computer operator. To
speed up processing, jobs with similar needs are batched together and run as a group. The
programmers leave their programs with the operator and the operator then sorts the programs
with similar requirements into batches.
The problems with Batch Systems are as follows:
 Lack of interaction between the user and the job.
 CPU is often idle, because the speed of the mechanical I/O devices is slower than the CPU.
 Difficult to provide the desired priority.
 The OS keeps a number of jobs in memory and executes them without any manual
information.
 Jobs are processed in the order of submission, i.e., first come first served fashion.
 When a job completes its execution, its memory is released and the output for the job gets
copied into an output spool for later printing or processing.

 Time sharing OS
Time-sharing is a technique which enables many people, located at various terminals, to
use a particular computer system at the same time. Time-sharing or multitasking is a
logical extension of multiprogramming. Processor's time which is shared among multiple
users simultaneously is termed as time-sharing.
The main difference between Multiprogrammed Batch Systems and Time-Sharing Systems
is that in case of Multiprogrammed batch systems, the objective is to maximize processor
use whereas in Time-Sharing Systems, the objective is to minimize response time.
That is, if n users are present, then each user can get a time quantum. When the user submits the
command, the response time is in few seconds at most.
The operating system uses CPU scheduling and multiprogramming to provide each user with a
small portion of a time. Computer systems that were designed primarily as batch systems have
been modified to time-sharing systems.
Advantages of Timesharing operating systems are as follows:
 Provides the advantage of quick response.
 Avoids duplication of software.
 Reduces CPU idle time.
Disadvantages of Time-sharing operating systems are as follows:
 Problem of reliability.
 Question of security and integrity of user programs and data.

GBHS DSCHANG Page 75


READERS ARE LEADERS
 Problem of data communication.

 Distributed OSs
Distributed systems use multiple central processors to serve multiple real-time applications and
multiple users. Data processing jobs are distributed among the processors accordingly.
The processors communicate with one another through various communication lines (such as
high-speed buses or telephone lines). These are referred as loosely coupled systems or
distributed systems. Processors in a distributed system may vary in size and function. These
processors are referred as sites, nodes, computers, and so on.
The advantages of distributed systems are as follows:
 With resource sharing facility, a user at one site may be able to use the resources available at
another.
 Speedup the exchange of data with one another via electronic mail.
 If one site fails in a distributed system, the remaining sites can potentially continue operating.
 Better service to the customers.
 Reduction of the load on the host computer.
 Reduction of delays in data processing.

 Network OS
A Network Operating System runs on a server and provides the server the capability to manage
data, users, groups, security, applications, and other networking functions. The primary purpose
of the network operating system is to allow shared file and printer access among multiple
computers in a network, typically a local area network (LAN), and a private network or to other
networks.
Examples of network operating systems include Microsoft Windows Server 2003, Microsoft
Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD.
The advantages of network operating systems are as follows:
 Centralized servers are highly stable.
 Security is server managed.
 Upgrades to new technologies and hardware can be easily integrated into the system.
 Remote access to servers is possible from different locations and types of systems.
The disadvantages of network operating systems are as follows:
 High cost of buying and running a server.
 Dependency on a central location for most operations.
 Regular maintenance and updates are required.

 Real Time Operating System (RTOS)


A real-time system is defined as a data processing system in which the time interval required to
process and respond to inputs is so small that it controls the environment. The time taken by the
system to respond to an input and display of required updated information is termed as the
response time. So in this method, the response time is very less as compared to online
processing.
Real-time systems are used when there are rigid time requirements on the operation of a
processor or the flow of data and real-time systems can be used as a control device in a

GBHS DSCHANG Page 76


READERS ARE LEADERS
dedicated application. A real-time operating system must have well-defined, fixed time
constraints, otherwise the system will fail. For example, scientific experiments, medical
imaging systems, industrial control systems, weapon systems, robots, air traffic control systems,
reservations, communication, etc.
There are two types of real-time operating systems.
Hard real-time systems
Hard real-time systems guarantee that critical tasks complete on time. In hard real-time systems,
secondary storage is limited or missing and the data is stored in ROM. In these systems, virtual
memory is almost never found.
Soft real-time systems
Soft real-time systems are less restrictive. A critical real-time task gets priority over other tasks
and retains the priority until it completes. Soft real-time systems have limited utility than hard
real-time systems. For example, multimedia, virtual realities, Advanced Scientific Projects like
undersea exploration and planetary rovers, etc.

 Time sharing OS
Multitasking or Time sharing refers to where multiple jobs are executed by the CPU
simultaneously by switching between them. Switches occur so frequently that the users may
interact with each program while it is running. An OS does the following activities related to
multitasking:
 The user gives instructions to the operating system or to a program directly, and receives an
immediate response.
 The OS handles multitasking in the way that it can handle multiple operations / executes
multiple programs at a time.
 Each user has at least one separate program in memory.
Multiprogramming
Sharing the processor when two or more programs reside in memory at the same time is referred
as multiprogramming. Multiprogramming assumes a single shared processor.
Multiprogramming increases CPU utilization by organizing jobs so that the CPU always has
one to execute.
An OS does the following activities related to multiprogramming;
 The operating system keeps several jobs in memory at a time.
 This set of jobs is a subset of the jobs kept in the job pool.
 The operating system picks and begins to execute one of the jobs in the memory.
 Multiprogramming operating systems monitor the state of all active programs and system
resources using memory management programs to ensure that the CPU is never idle, unless
there are no jobs to process.

 Embedded OS
An embedded operating system refers to the operating system that is self-contained in the device
and resident in the read-only memory (ROM). E.g. clothes, vehicles, watches, eye glasses, etc.
etc.
 Single user, single task OS

GBHS DSCHANG Page 77


READERS ARE LEADERS
As the name implies, this operating system is designed to manage the computer so that one user
can effectively do one thing at a time. The Palm OS for Palm handheld computers is a
good example of a modern single-user, single-task operating system.

 Single user, multi task OS


This is the type of operating system most people use on their desktop and laptop computers
today. Microsoft's Windows and Apple's Mac OS platforms are both examples of operating
systems that will let a single user have several programs in operation at the same time.

 Multi user OS
A multi-user operating system allows many different users to take advantage of the
computer's resources simultaneously. Unix, VMS and mainframe operating systems, such as
MVS, are examples of multi-user operating systems.

 Multi-processing OS
Multiprogramming OS have two or more processors for a single running process. Processing
takes place in parallel and is also called parallel processing. Each processor works on different
parts of the same task, or, on two or more different tasks. Linux, UNIX and Windows 7 are
examples of multiprocessing OS.

Operating System Services


OS provides an environment for execution of programs. It provides certain services to programs
and to the users of those programs.
OS Interfaces: Almost all operating systems have a user interface (UI). A UI provides the
means for the user to communicate with the computer. It is characterized by a cursor, prompts,
icons, menus, etc. and allows the user to get something done using the computer. UIs should be
user friendly and have the following:
- Consistency: each part of the software should behave in the same way as the other.
- Colors for the user interface should be carefully chosen.
- Should have an option of turning on and off the sound.
- Assistance: help facilities should be included to assist users.
This interface can take several forms.
1. Command Line Interface(CLI)
With a command line interface the user interacts with the computer by typing commands. An
interaction with a computer using a command line interface usually follows these two steps:
- The user types a command e.g. "dir".
- The computer carries out the command and displays its results.
Examples of systems which use a command line interface are: MS-DOS, BBC Micro.

GBHS DSCHANG Page 78


READERS ARE LEADERS

2. Menu-Driven Interface
With a menu driven interface the user interacts with the computer by selecting options from a
menu. A typical program will have many menus which the user can access. Menus can be either
full screen or pull down. Pull-down menus are accessed by selecting the menu from a menu bar.
Pop-up menus are activated by pressing a button on the mouse.

3. Graphical User Interface (GUI)


With a Graphical User Interface (GUI) the user interacts with the computer by using a
pointing device such as a mouse or trackball. The most popular form of GUI is a Windows,
Icon, Menu and Pointer (WIMP) system. The important features of a WIMP system are:
1. Window: An area of the screen which is used to display a particular program or piece of
work. Many windows can be displayed on the screen at the same time.
2. Icon: An informative picture / symbol displayed on the screen which the user chooses to
select an action.
3. Menu: A list of options which the user can pick from. Menus can be pull-down (selected
from a menu bar at the top of the screen) or pop-up (selected by pressing a mouse button).
4. Pointer: A symbol such as an arrow which is moved by a pointing device and can be used to
select objects.
When you use a program such as a word processor that has a WIMP interface it is often the
case that the document you are creating looks exactly the same on the screen as it will when it
is printed out. If this is the case then the program is described as being WYSIWYG. This
stands for “What You See Is What You Get”

GBHS DSCHANG Page 79


READERS ARE LEADERS

Operating System Concepts


OS Kernel: The lowest level of any operating system is its kernel. This is the first layer of
software loaded into memory when a system boots or starts up. The kernel provides access to
various common core services to all other system and application programs. These services
include, but are not limited to: disk access, memory management, task scheduling, and access to
other hardware devices.

Operating System Modes


Many CPU modes can be implemented by an Operating System: But in general, a CPU can
be either in kernel mode or User mode.
In kernel mode, also called master mode, supervisor mode, privileged mode, supervisor
state, etc, the CPU has instructions to manage memory and how it can be accessed, plus the
ability to access peripheral devices like disks and network cards. The CPU can also switch itself
from one running program to another. It is an unrestricted mode.
In user mode or shell mode, access to memory is limited to only some memory locations,
and access to peripheral devices is denied. The ability to keep or relinquish the CPU is removed,
and the CPU can be taken away from a program at any time. Now, all programs will be run in
user mode, and this prevents them from accessing the data in other programs, as well as
preventing the disk etc.
System call
In computing, a system call is how a program requests a service from an operating system's
kernel that it does not normally have permission to run. System calls provide the interface
between a process and the operating system.

Interrupt
An interrupt in an interruption in the normal execution of the program. When the CPU is
interrupt, then it stops its current activities like execution of the program. And transfer the

GBHS DSCHANG Page 80


READERS ARE LEADERS
control to interrupting device to check the interrupt. The three types of interrupts are
software interrupts or trap (syscall) - invoked by software.
external interrupts - invoked by external devices.
exceptions - invoked by the processor when errors occur.

Interrupt Handling
The code that is installed at the target address for interrupts is called an interrupt handler.
The first thing that it has to do is save the state of the currently executing process. Then it calls a
subprogram to deal with the specific type of interrupt. When that subprogram returns, the
interrupt handler restores the state of the process that was executing when the interrupt occurred.

Process scheduling
In a multiprogrammed system, at any given time, several processes will be competing for the
CPU time. Thus, a choice has to be made which process to allocate the CPU next. This
procedure of determining the next process to be executed on the CPU is called process
scheduling and the module of operating system that makes this decision is called a scheduler.
The scheduler uses some scheduling procedure to carry out the selection of a process for
execution. The efficiency of each algorithm is judged according to the average waiting time
and the average turnaround time.
Burst time or Execution time: It is the amount of time a process uses the CPU for a single
time.
Waiting time - amount of time a process has been waiting in the ready queue (waitingTime =
startTime – arrivalTime)
Turnaround time - It‘s the total time taken by the process between starting and the
completion. (turnaroundTime = burstTime + waitingTime = finishTime- arrivalTime)

Service time or Turnaround time

Preemptive and Non-preemptive Scheduling


Preemptive scheduling allows a process to be interrupted in the midst of its execution, taking
the CPU away and allocating it to another process. Non-preemptive scheduling ensures that a
process relinquishes control of the CPU only when it finishes with its current CPU burst. CPU-
scheduling decisions may take place under the following four circumstances:
1. When a process switches from the running state to the waiting state (for example, as the
result of an I/O request,).
2. When a process switches from the running state to the ready state (for example, when an
interrupt occurs).

GBHS DSCHANG Page 81


READERS ARE LEADERS
3. When a process switches from the waiting state to the ready state (for example, at
completion of I/O, on a semaphore, or for some other reason).
4. When a process terminates.
For situations 1 and 4, there is no choice in terms of scheduling. A new process (if one exists
in the ready queue) must be selected for execution.
There is a choice however, for situations 2 and 3. When scheduling takes place only under
circumstances 1 and 4, we say that the scheduling scheme is non-preemptive or cooperative;
otherwise, it is pre-emptive.

Scheduling Algorithms
There are six popular process scheduling algorithms which we are going to discuss:
 First-Come, First-Served (FCFS) Scheduling
 Jobs are executed on first come, first served basis.
 It is a non-preemptive scheduling algorithm.
 Easy to understand and implement and its implementation is based on FIFO queue.
 Poor in performance, as average wait time is high.
 Shortest-Job-Next (SJN) Scheduling
 This is also known as shortest job first, or SJF.
 This is a non-preemptive scheduling algorithm.
 Best approach to minimize waiting time.
 Easy to implement in Batch systems where required CPU time is known in advance.
 Impossible to implement in interactive systems where the required CPU time is not known.
 The processer should know in advance how much time a process will take.
 Shortest Remaining Time
 Shortest remaining time (SRT) is the preemptive version of the SJN algorithm.
 The processor is allocated to the job closest to completion but it can be preempted by a newer
ready job with shorter time to completion.
 Impossible to implement in interactive systems where required CPU time is not known.
 It is often used in batch environments where short jobs need to be given preference.
 Round Robin (RR) Scheduling
 Round Robin is a preemptive process scheduling algorithm.
 Each process is provided a fix time to execute; it is called a quantum.
 Once a process is executed for a given time period, it is preempted and other process executes
for a given time period.
 Context switching is used to save states of preempted processes.
 Multiple-Level Queues Scheduling
Multiple-level queues are not an independent scheduling algorithm. They make use of other
existing algorithms to group and schedule jobs with common characteristics.
 Multiple queues are maintained for processes with common characteristics.
 Each queue can have its own scheduling algorithms.
 Priorities are assigned to each queue.
For example, CPU-bound jobs can be scheduled in one queue and all I/O-bound jobs in another
queue. The Process Scheduler then alternately selects jobs from each queue and assigns them to
the CPU based on the algorithm assigned to the queue.

GBHS DSCHANG Page 82


READERS ARE LEADERS
 Priority based scheduling
 Priority scheduling is a non-preemptive algorithm and one of the most common
scheduling algorithms in batch systems.
 Each process is assigned a priority. Process with highest priority is to be executed first and so
on.
 Processes with same priority are executed on first come first served basis.
 Priority can be decided based on memory requirements, time requirements or any other
resource requirement.

DEADLOCK: A thread is deadlocked when it‘s waiting for an event that can never occur
– I‘m waiting for you to clear the intersection, so I can proceed but you can‘t move until he
moves, and he can‘t move until she moves, and she can‘t move until I move.
– Thread A is in critical section 1, waiting for access to critical section 2; thread B is in critical
section 2, waiting for access to critical section 1
In a multiprogramming system, processes request resources. If those resources are being used
by other processes then the process enters a waiting state. However, if other processes are also
in a waiting state, we have deadlock. The formal definition of deadlock is as follows:
Definition: A set of processes is in a deadlock state if every process in the set is waiting for an
event (release) that can only be caused by some other process in the same set.

Example
Process-1 requests the printer, gets it
Process-2 requests the tape unit, gets it Process-1 and
Process-1 requests the tape unit, waits Process-2 are
Process-2 requests the printer, waits deadlocked!

NECESSARY CONDITIONS
ALL of these four must happen simultaneously for a deadlock to occur:
Mutual exclusion
One or more than one resource must be held by a process in a non-sharable (exclusive) mode.
That is resources like printers and tape drives require exclusive access by a single process.
Hold and Wait
A process holds a resource while waiting for another resource. Here, processes must be
prevented from holding one or more resources while simultaneously waiting for one or more
others.
No Preemption

GBHS DSCHANG Page 83


READERS ARE LEADERS
There is only voluntary release of a resource - nobody else can make a process give up a
resource.
Circular Wait
Process A waits for Process B waits for Process C.... waits for Process A. this can be avoided if
resources are numbered and require that processes request resources only in strictly increasing
or decreasing other.

Handling Deadlock: The above points focus on preventing deadlocks. But what to do once
deadlock has occurred.
The following three strategies can be used to remove deadlock:
• Preemption: That is take a resource from one process and give to another.
• Rollback: Here the system can periodically make a record of the state of each process and
when deadlock occurs, roll everything back to the last checkpoint and restart but allocating
resources differently so that deadlock does not occur.
• Kill one or more processes.

There is also a variant of deadlock called LIVELOCK whereby two or more processes
continuously change their state in response to changes in the other process(es) without doing
any useful work. This is similar to deadlock in that no progress is made but differs in that
neither process is blocked or waiting for anything.

Executing commands using the command line


A Command is a set of instructions used to perform a specific work interpreted by the OS
interpreter to a machine language. Command line operating systems essentially have the
command driven interface. Users have to type in commands following the correct syntax to
achieve desired task. DOS (Disk Operating System) is a typical example of a command line
operating system. Other versions of DOS include PC-DOS, MS DOS, DR-DOS and apple DOS.
Interestingly these operating systems were designed to perform a single task for a single user
since only one command prompt (for instance C:\ > DOS) is available at a time.

The DOS commands


There are two main types of DOS commands: internal and external. Internal commands are
contained within [Link] file and are loaded into RAM, (Random Access Memory)
when you first turn on your computer or during the boot sequence. As a result of this, a limited
amount of memory available to DOS is committed to holding internal commands. External
commands stay on disk, diskette or flash drive until they are needed because they are not used
frequently or possibly because they are large and take up a lot of space.
When you want your computer to do something, you give it commands, usually by typing
instructions from the keyboard. The format and language used in the commands depend on the
type of operating system you are using. With DOS, as with any operating system, there is a
finite set of internal and external commands that can be installed and used. This depends to a
large extent on the version of DOS installed in your computer.
To us the DOS OS, it is by opening to DOS prompt called Command Prompt (C:\>) from the
Start Menu → All Programs → Accessories → Command Prompt. Every command in DOS
must be entered in a precise order which is referred to as syntax. The command line is case non-

GBHS DSCHANG Page 84


READERS ARE LEADERS
sensitive. In DOS the syntax is [Command name, space, switch, drive, colon, path,]. E.g. the
command prompt; C:\>, (where C is any existing drive letter) we have C:\>dir /o A:\ documents.

- Command name (dir): this is the name of the DOS command being used;
- Space (): press the space bar from the keyboard;
- Switch (/o): used to modify the behavior of a command;
- Drive (A): this might be a lower case or upper case character from A to Z according to
your drive designation;
NB: letters A and B are reserved for floppy drives and the rest for other drives;
- Colon (:): type the colon from the keyboard;
- Path (\document): this is a directory within the drive that you want the command to
follow. It is preceded by a backward slash if the directory is a root drive.

Directory: It is a list of files which is itself a file stored in the computer‘s memory so that users
can reference it as it is required. Also called a catalog of files. Types of directories include root
directory, current directory and parent directory.

- Root directory: It is that directory which is automatically created when the disk is
formatted e.g. A:\, B:\ (for floppy disk drive) and C:\, D:\ etc. (for HDD).
- Parent directory: It is that directory which is one level up of the current directory. E.g.
C:\GBHS\US>
- Current directory: It is that directory in which you are currently working.

Formatting a storage device using the command line


Formatting a HD or SSD is the same as buying a new hard drive since the process erases all the
data in one fell swoop. When you format your hard drive, you can clean internal as well as
external storage media. Before proceeding further, make sure you backup all available data
to prevent data loss. Follow the steps below to format a drive.
1. Open Command Prompt As Administrator
Search for command prompt, right click and run as Administrator.
2. Use Diskpart
Once command line is open, type 'diskpart' and press Enter.
3. Type List Disk
The above command will open a Diskpart window. In this window, type 'list disk' and press
Enter. It will list all the available drives.
4. Select the Drive to Format
Now type 'select disk (disk number)' as shown above. Specify the drive number which needs
to be formatted.
5. Clean the Disk
In this step, type 'clean'. This command will permanent delete all files and folders, and
successfully clean up the disk.
6. Create Partition Primary
To make the drive again accessible, type 'create partition primary'.
7. Format the Drive
Now format the drive with FAT or NTFS file system. Type 'format fs=ntfs' and press Enter.
8. Assign a Drive Letter
To assign a drive letter, you can type 'assign'.

GBHS DSCHANG Page 85


READERS ARE LEADERS

Standalone operating systems and Server operating systems


A standalone operating system is an operating system that works on devices such as
notebook, desktop computer or a laptop. A stand-alone operating system provides an entire
working framework. DOS, Windows 95, Mac OS, and Windows 2000 professional are some
examples for standalone operating systems.

A server operating system is an operating system specifically designed to run on servers


which are specialized computers that operate within a client/server architecture to serve the
requests of client computers on the network. It is the software layer on top of which other
software programs, or applications can run on the server hardware. Server operating systems
help enable and facilitate typical server roles such as Web server, mail server, file server,
database server, application server and print server. From server hardware sales data, reports
shows that 28% of servers run Linux compared to 50% of servers running Windows. Other
popular server operating systems include Unix and z/OS.

Most Popular Server Operating Systems include; Windows Server, Mac OS X Server, and
variants of Linux such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server.
The main difference between stand-alone operating system and network operating system is that
a standalone operating system is an operating system that works on a desktop computer or some
other portable device while a network operating system is an operating system that runs on a
special device called a server.

CHAPTER 8: LOGIC GATES AND BOOLEAN ALGEBRA


LOGIC GATES
Competence:
- Be able to identify the different gates that make up digital electronics and perform
Boolean functions.
INTRODUCTION
The modern day digital (integrated) circuits provide the means to extend digital application to
industrial control and computers. These digital circuits use logic gates. The gates which are
switching circuits control the movement of machines to perform their required task. Each one of
the basic logic gates is a piece of hardware or an electronic circuit that can be used to implement
some basic logic circuits and is composed of the following; diodes, transistors, and resistors.
Digital logic systems are based on binary (two level) number system (1 or 0, high or low, on or
off and true or false). The term logic is used to describe the set of the basic electronic
components which when combined with each other are able to perform complex logical and
arithmetic operations.
A. LOGIC GATES
Definitions
- A logic gate is an electronic circuit which treats logic functions and has no memory.

GBHS DSCHANG Page 86


READERS ARE LEADERS
- Truth Table: It is a table which specifies the relationship between the true values of
different positions of logic elements. It is thus a table which indicates for every
combination of input variables the value of output variable. A truth table shows the
output for all possible values of the input variables. To construct a truth table, we
evaluate the Boolean expression for all possible combinations of values for the input
variables. The number of possible combinations is always equal to where is the
number of input variables.
Example 1: Construct a truth table for the expression
3 input variables different combinations

Exercise: Construct the truth tables for the following;


i) ̅ ̅
ii) ̅ ̅ [
iii) ̅
LOGIC OPERATIONS
An operation is an action that is performed on data, for example, ―8+1‖ is an arithmetic
operation on two numbers. ―8‖ and ―1‖ are called operands while ―+‖ is the operator. The result
of the operation is ―9‖. When we talk of a logical operation (or Boolean operation) we mean an
operation that follows the rules of Boolean algebra. Such an operation analyzes one or more
inputs and then generates a particular output based on a set of rules.

There exist basically three logical operations and gates: AND, OR and NOT
- AND operation and AND gate.
In an AND operation, a result of ONE occurs when all the inputs variables are ONE. The AND
gate is compose of two or more inputs and a single output and performs logical multiplication.
The multiplication sign stands for the AND operation. The standard symbol for the AND gate
and its truth table is shown below. A and B are input variables while Y is the output variable.
Y=A.B or Y=AB reads as Y equals A AND B. This is the case for two input variables.

GBHS DSCHANG Page 87


READERS ARE LEADERS
Symbol Truth Table

Do the case for THREE input variables and TT.


AND Gate circuits

- OR operation and OR gate.


According to the OR operation, a result of ONE is obtained when any of the input variable is
ONE. In addition, the OR operation produces a result of ZERO only when all the input variables
are ZERO. The OR gate is composed of two or more inputs and a single output and performs
logical addition. The sign (+) stands for the OR operation and not for ordinary addition. OR
gate, Truth Table and Circuits as shown below.
Symbol Truth Table

OR Gate circuit

Do cases for THREE input variables and TT.

GBHS DSCHANG Page 88


READERS ARE LEADERS
- NOT operation and NOT gate.
A third important logical element is the NOT gate or inverting gate or complementing gate. An
inverter does pretty much what it says. If the input is 0 or low, the output is 1 or high.
Conversely, if the input is 1 or high, the output is 0 or low.
A NOT gate is a one-input one-output logic gate whose output is always the complement of the
input. NOT operation on a logic variable X is denoted as X or X‘, if X is the input to a NOT
gate, then its output Y is given by Y =X‘ and reads as Y equals NOT X. Thus, if X = 0, Y = 1
and if X = 1, Y = 0 .The symbol for an inverter is shown below

REVIEW:
 Boolean multiplication is equivalent to the AND logic function, as well as series switch
contacts.
 Boolean addition is equivalent to the OR logic function, as well as parallel switch
contacts.
 Boolean complementation is equivalent to the NOT logic function, as well as normally-
closed relay contacts.

COMBINATION OF LOGIC GATES


Using combinations of logic gates, complex operations can be perform. Although there is no
limit to the number of gates that can be arranged together in a single device, nevertheless, in
practice, there is a limit to the number of gates that can be packed into a given physical space.
Some basic combination gates are: NAND gate, NOR gate, Exclusive-OR (XOR) and
Exclusive-NOR (XNOR) gate.
I- NAND Gate: The NAND gate is compose of two or more input variables and a
single output variable. It is a very popular logic gate because it may be used as a universal
function that is, it may be employed to construct an inverter, an AND gate, an OR gate or any
combination of these functions. The term NAND gate is formed by the combination of NOT-
AND and implies an AND function with an inverted output. The logical operation of the NAND
gate is such that the output is LOW (0) only when all the inputs are HIGH (1) else the output is
HIGH (1).

GBHS DSCHANG Page 89


READERS ARE LEADERS

Actually, the way to start thinking about a NAND gate is to think of it as an AND gate with an
inverter on the output.

II- NOR Gate: The NOR gate which is composed of two or more inputs variable and
a single output variable also has a universal property. The term NOR is formed by the
combination of NOT-OR and implies an OR function with an inverted output. The logical
operation of the NOR gate is such that the output is HIGH (1) only when all the input variables
are LOW (0) else the output is LOW (0).

III- Exclusive-OR (XOR) and Exclusive-NOR (XNOR): These gates are usually
formed from the combination of the other logic gates. However because of their functional
importance, these gates are treated as basic gates with their own unique symbols. The exclusive-
OR is an INEQUALITY function and the output is HIGH (1) when the inputs variables are not
equal to each other. Conversely, the exclusive-NOR is an EQUALITY function and the output
is HIGH (1) when the inputs are equal to each other. The output of XOR is as follows:

XOR Gate

GBHS DSCHANG Page 90


READERS ARE LEADERS

The exclusive-OR gate and the exclusive-NOR gate are denoted by Θ and ʘ respectively. In
addition, these gates perform the following Boolean functions.

EXAMPLES TO BE DONE IN CLASS DURING LECTURES

EXERCISES: To be done at home.


1- Simplify the following expressions and check your answer by drawing up truth tables.

2- Use logic gates to represent these expressions and draw up their corresponding truth
tables.

3- Write down the Boolean expressions for the following logic circuits.
GBHS DSCHANG Page 91
READERS ARE LEADERS

4- Design circuits for the following using NAND gates and then NOR gates.

B. BOOLEAN ALGEBRA
Boolean algebra is a mathematical system, developed by the English mathematician, George
Boole, which is used for the formulation of the logical statements with symbols so that the
problems can be solved in a definite manner of ordinary algebra. In short, Boolean algebra is the
mathematics of digital systems. Since Boolean algebra deals with the binary number system, the
variables used in the Boolean equations have only two possible values (0 or 1). Thus, for
performing the logical algebraic operations, that is, 'addition' and 'multiplication', Boolean
algebra follows certain rules.

Rules of Boolean Algebra


These rules are shown in the table below.

GBHS DSCHANG Page 92


READERS ARE LEADERS

These rules can be check be the use of Truth Table.

Laws of Boolean Algebra


The following are different laws of Boolean Algebra;

o Complement law
̅ | ̅

o Idempotence law
|

o Absorption law
GBHS DSCHANG Page 93
READERS ARE LEADERS
|

o Involution law
̿

o Identity law
|

o Redundancy law
|

Logic circuits Boolean functions


A Logic circuit to a number of gates joined together to produce a specific output from give
inputs. For example, let‘s consider the following circuit: It contains three inputs A, B and C

A Boolean function is an expression formed with binary variables and logical operators (OR,
AND, NOT and equal sign). In essence, a truth table is a list, which defines a Bo olean function.
For example, X = A · B + A · C. Let us consider the truth table of the given value as shown

X = ABC + ABC + ABC


= A (BC + BC + BC)
=A [(BC + B(C + C)]
=A (BC + B)
=A (B + C)
=AB +AC

CHAPTER 9: INFORMATION SYSTEMS


Competence:
- Know how information systems function and the need for an IS in an organization.
Introduction
Systems are created to solve problems. Systems development can generally be thought of as
having two major components: Systems analysis and Systems design. System design is the
process of planning a new business system or one to replace or complement an existing system.
But before this planning can be done, we must thoroughly understand the old system and
GBHS DSCHANG Page 94
READERS ARE LEADERS
determine how computers can best be used to make its operation more effective. System
analysis, then, is the process of gathering and interpreting facts, diagnosing problems, and
using the information to recommend improvements to the system.

DATA PROCESSING CYCLE: The term ―data processing‖ (or by abuse information
processing) usually refers to the manipulation off raw information (called data) to produce
useful information. Information processing cycle refers to the sequence of events which
includes four principal stage; Input, processing and output

Input: Data input refers to the various manual and automated ways by which data enter the
computer. This stage involves collection of data from the outside or also from within the
system. The input stage can be further broken down into data acquisition, data entry and data
validation.
- Data acquisition refers to the collection of the raw data from the outside so that it can be put
into an Information system.
- Data entry is the process of putting the acquired data into the IS. Example: typing students
details into a database
- Data validation refers to the process of checking the data to ensure it is error free. It uses
routines also called validation routines or check routines that check for correctness,
meaningfulness and security of data that are input to the system. Format check: e.g. date has to
be in the format DD/MM/YY
Data type check: e.g. the letter „O‟ should not be typed instead of the integer 0.
Range check: The month should lie between 1 and 12.
Limit check: the age should not be negative.
Presence check: e.g. any customer must have a telephone number.
Consistency check: e.g. if title = ―Mrs.‖, then the gender = ―F‖.

Processing: In this stage the computer processes the minutest details entered. It is the fact of
manipulating data to produce information.
Common processing methods;
Batch Processing: This is a method where the information to be organized is sorted into
groups to allow for efficient and sequential processing.
Online Processing: This is a method that utilizes Internet connections and equipment
directly attached to a computer. It is used mainly for information recording and research.
Real-Time Processing: This technique has the ability to respond almost immediately to various
signals in order to acquire and process information.
GBHS DSCHANG Page 95
READERS ARE LEADERS
Distributed Processing: This method is commonly utilized by remote workstations
connected to one big central workstation or server. ATMs are good examples of this data
processing method.

Output: In this stage, the processed information is now transmitted to the user. Output is
the act of sending out information by a data processing system such as the computer.

Other stages: Other stages include:


- Storage: After the data has been processed, along with the output to the user, the
data is also stored.
- Retrieval: This is the reverse of storage.
- Communication: This is the process of sending data or information to another places.

Data Verification: This is the process whereby the process is checked for accuracy and
inconsistencies after data migration. Data verification is used to prevent errors occurring
when data is copied from one medium to another.

Verification methods include;


- Proof reading (visual check): checked for errors by looking through the data.
E.g. proof-reading a typed document.
- Double keying: This is a check to see whether the data has been keyed in correctly.
The data is keyed twice, and the computer will only accept the data for processing in the two
versions are identical.
- Parity: Used to check for transmission errors over network or between memory
and disk. An extra bit is added to each binary number before it is transmitted. Even
parity system makes sure that each number has an even number of ―1‖ bits. After
transmission each number is checked to see if it still has an even number of ―1‖
bits. If not, then the computer will conclude that the corruption of data has occurred.

Archiving: Archiving means taking the data off the main storage (e.g. hard drive) and
storing it offline (not immediately available) usually on tape in the way it will not take up
important hard disk space.

Deleting: This is the process of erasing or wiping our recorder data (usually from a recorded
unit).

INFORMATION SYSTEM
A system can be defined as a combination of resources or functional units working together to
accomplish a given task.

Basic element of a system


The basic elements of the system may be listed as:
→ Resources: Resources can be hardware, software and liveware.
→ Procedures: Every system functions under a set of rules that govern the system
to accomplish the defined goal of the system. This set of rules defines the procedures
for the system.
→ Data/Information

GBHS DSCHANG Page 96


READERS ARE LEADERS
→ Processes: The systems have some processes that make use of the resources to
achieve the set goal under the defined procedures.

Characteristics of a system
Systems also exhibit certain features and characteristics, some of which are:
→ Objective: Every system has a predefined goal or objective towards which it works.
A system cannot exist without a defined objective.
→ Standards: It is the acceptable level of performance for any system. Systems should
be designed to meet standards.
→ Environment: Every system whether it is natural or manm ade co-exists with an
environment. It is very important for a system to adapt itself to its environment.
→ Feedback: Feedback is an important element of systems. The output of a system
needs to be observed and feedback from the output taken so as to improve the system
and make it achieve the laid standards.
→ Boundaries and interfaces: Every system has defined boundaries within which it
operates. Beyond these limits the system has to interact with the other systems.

Types of Systems
→ Manual Systems: These are systems that are basically mechanical in nature and do
not require or use any automation. Such systems existed predominantly in the past and
were not very reliable or fast.
Advantages
- Errors are generally easy to correct.
- Easy to audit.
- Easy to build.
Limitations
- Higher cost.
- Long access time and hard to make changes.
- Takes up a lot of space and Lack of security.
- Prone to damage and being misplaced.

→ Information Systems (IS): Any system that makes use of automation and especially
harnessed by people, procedures, software, hardware and digital data is called an
information system (IS).
→ Natural systems: These are systems that occur in nature and together they form the
ecosystem that make up our natural environment. E.g. circulation of water in our
ocean, weather and climate systems, energy cycle, food chain. Without nature‘s system
no life on earth because people depends on natural systems for survival.
→ Human systems: These are systems that are created by people to fill individual and
collective needs and wants. E.g. human settlements, transportation routes,
communication systems, economics, energy, infrastructure.
→ Artificial systems: These are systems that do not exist in nature. They are of human
creation to serve human purposes. E.g. cars, cotton farm, computer program. These
systems, even biological ones exist only to serve humans a predefined purpose.

GBHS DSCHANG Page 97


READERS ARE LEADERS
→ Others include: Social systems, explicit systems, implicit systems, descriptive
systems, operational systems, purposeful or non-purposeful, static and dynamic, open
and closed, abstract or concrete, deterministic or stochastic.

What is an Information System?


An Information System (IS) is defined as an organized collection of technical and human
resources for the processing, storing and distribution of an organization‘s information. An IS
using a computer is called a Computer Based Information System (CBIS).

Components of IS
The 5 components that must come together in order to produce a Computer-Based
Information system are:

Hardware: The term hardware refers to machinery. This category includes the computer
itself, which is often referred to as the central processing unit (CPU), and all of its support
equipment‘s.
Software: The term software refers to computer programs and the manuals (if any) that
support them.
Data: These are facts that are used by programs to produce useful information.
Procedures: Procedures are the policies that govern the operation of a computer system.
"Procedures are to people what software is to hardware" is a common analogy that is used to
illustrate the role of procedures in a CBIS.
People: Often the most over-looked element of the CBIS is the people, probably the
component that most influence the success or failure of information systems.

Importance of an IS in an organization
To gain the maximum benefits from your company's information system, you have to exploit all
its capacities. Importance of IS within an organization are numerous:
Communication: Part of management is gathering and distributing information, and
information systems can make this process more efficient by allowing managers to
communicate rapidly.
Operations: How you manage your company's operations depends on the information
you have. Information systems can offer more complete and more recent information,
allowing you to operate your company more efficiently.
Decisions: The company information system can help you make better decisions by
delivering all the information you need and by modeling the results of your decisions.
Records: Your Company needs records of its activities for financial and regulatory
purposes as well as for finding the causes of problems and taking corrective action.

Types of Information System


Information systems differ in their business needs. Also depending upon different levels in
organization information systems differ. Three major information systems are:
1. Transaction processing.
2. Management information system.
3. Decision support system.

GBHS DSCHANG Page 98


READERS ARE LEADERS
4. Executive Information System.

GBHS DSCHANG Page 99


READERS ARE LEADERS

Executive Information System (EIS)


This is a computer based system intended to help and support the information and decision
making needs of senior executives of a company or organization. It provides easy access to
internal and external information needed to achieve the strategic goals of the organization. It
is commonly considered as a specialized form of DSS.

Functions of a EIS in terms of data processing requirements


Inputs Processing Outputs
External Data Summarizing Summary reports
Internal Files Simulation Forecasts
Pre-defined models "Drilling Down" Graphs / Plots

Decision support system (DSS)


A decision support system is a computer application that helps users analyze problems and
make business decisions more confidently. It uses data routinely collected in organizations
and special analysis tools to provide information support to complex decisions. To store all
the necessary decision-making data, DSSs or EISs often use extremely large databases,
called data warehouses. A data warehouse stores and manages the data required to analyze
historical and current business circumstances. DSS manipulates and build upon the
information from a MIS and/or TPS to generate insights and new information.

GBHS DSCHANG Page 100


READERS ARE LEADERS

Functions of a DSS in terms of data processing requirements


Inputs Processing Outputs
Modeling
Internal Transactions Simulation Summary reports
Internal Files Analysis Forecasts
External Information? Summarizing Graphs / Plots

Management Information system (MIS)


The MIS is defined as a system which provides information support for decision
making in the organization. They use the results of transaction processing and some other
information also. It is an information system that generates accurate, timely and organized
information so managers and other users can make decisions, solve problems, supervise
activities, and track progress. An important element of MIS system is database. MIS are built
on the data provided by the TPS.
Functions of a MIS in terms of data processing requirements
Inputs Processing Outputs
Internal Transactions Sorting Summary reports
Internal Files Merging Action reports

Structure data Summarizing Detailed report

Transaction Processing System (TPS)


A transaction processing system (TPS) is an information system that captures and
processes data generated during an organization‘s day-to-day transactions. A transaction is
any activity of an organization including a business activity such as a deposit, payment,
order or reservation. As computers became more powerful, system developers built online
transaction processing systems. With online transaction processing (OLTP) the computer
processes transactions as they are entered.
Inputs Processing Outputs
Transactions Validation Lists
events Sorting Detail reports
Listing Action reports
Merging Summary reports
Updating
Calculating

GBHS DSCHANG Page 101


READERS ARE LEADERS

Other types of information systems


a) Office Automation System (OAS): These are systems that use varied computer
machinery and software to digitally create, collect, store, manipulate and relay office
information needed for accomplishing basic tasks in an organization. All office
functions like dictation, typing, filing, copying, fax, telex, microfilm and records
management, telephone and telephone switch board operations are included.
b) Expert system (ES)
c) Integrated Information Systems (IIS): With today‘s sophisticated hardware,
software and communications, it is often difficult to classify a system as belonging
uniquely to one of the information system types discussed. Although expert systems
still operate primarily as separate systems, organizations increasingly are consolidating
their information needs into a single, integrated information system.

Organizational structure
An organizational structure defines how activities such as task allocation, coordination and
supervision are directed towards the achievement of organizational aims. It can also be
considered as the viewing glass or perspective through which individuals see their
organization and its environment. Organizational structure determines how the roles, power
and responsibilities are assigned, controlled, and coordinated, and how information
flows between the different levels of management. A structure depends on the organization's
objectives and strategy.

In a centralized structure, the top layer of management has most of the decision
making power and has tight control over departments and divisions.

In a decentralized structure, the decision making power is distributed and the


departments and divisions may have different degrees of independence.

Why should you develop a structure for your organization?


Structure gives m e m b e r s c l e a r gu i d e l i n e s f o r h o w t o pro c e ed . A clearly-
established structure gives the group a means to maintain order and resolve disagreements.
Structure binds members together. It gives meaning and identity to the people who join
the group, as well as to the group itself.

Structure in any organization is inevitable - an organization, by definition,


implies a structure.

Organizational Chart
An organizational chart illustrates the organizational structure. It is visual representation of
how a firm intends authority, responsibility, and information to flow within its formal
organizational structure. It usually depicts different management functions (accounting,

GBHS DSCHANG Page 102


READERS ARE LEADERS

finance, human resources, marketing, production, R&D, etc.) and their subdivisions as
boxes linked with lines along which decision making power travels downwards and
answerability travels upwards.

INTRODUCTION TO SYSTEM ANALYSIS AND DESIGN


System Analysis and Design (SAD) is the process of defining the architecture, components,
modules, interfaces and data for a system to achieve a specific goal or satisfy specific
requirements. System development can generally be thought of having two major
components: systems analysis and systems design.
→ In System Analysis more emphasis is given to understanding the details of
an existing system or a proposed one and then deciding whether the proposed system
is desirable or not and whether the existing system needs improvements.
→ System design is the process of planning a new business system or one to replace
or complement an existing system. Analysis specifies what the system should do.
Design states how to accomplish the objective.

GBHS DSCHANG Page 103


READERS ARE LEADERS

System analysis
System analysis is the process of investigating a system, identifying problems, and using the
information to recommend improvements to the system.
What is the purpose of the analysis phase? The present system is studied in depth, and new
requirements are specified. We are NOT concerned with the new design here, only in
determining the requirements for the new system.
Who is a system analyst?
He is the person responsible for the development of an information system. Systems analysts
design and modify systems by turning user requirements into a set of functional
specifications which are the blueprint of the system. Some responsibilities of a system analyst
are;
- Identify, understand and plan for organizational and human impacts of planned
systems, and ensure that new technical requirements are properly integrated with
existing processes and skill sets.
- Plan a system flow from the ground up.
- Interact with internal users and customers to learn and document requirements that
are then used to produce business requirements documents.
- Write technical requirements from a critical phase.
- Interact with designers to understand software limitations.
- Help programmers during system development, ex: provide use cases, flowcharts or
even database design.
- Perform system testing.
- Deploy the completed system.

GBHS DSCHANG Page 104


READERS ARE LEADERS

- Document requirements or contribute to user manuals.

System design: It is the process of planning a new business system or one to replace or
complement an existing system. In the systems design phase, a new or alternative information
system is designed. It consists of three tasks:

Designing Alternative Systems


In almost all instances, more than one design can be developed to meet the
information needs.
Each alternative must be checked for feasibility including:
- Economic feasibility: Will the costs of the new system be justified by the
benefits? How long will it take to pay for itself?
- Technical feasibility: Are reliable hardware, software, and training available to make
the system work, and if not, can it be obtained?
- Operational feasibility: Can the system actually be made to operate in the
organization, or will people – employees, managers, clients – resist it?
Selecting the Best System
Management must consider four key questions when selecting the best (optimal) system
Will the system fit in the organization‘s overall information system?
Will the system be flexible enough so it can be modified in the future?
Can it be made secure against unauthorized use?
Are the benefits worth the costs?
Consider some criteria like reusability and portability
Reuse: Using components of one product to facilitate development of a different
product with different functionality.
A product is portable if it is significantly easier to modify it to run on another system
configuration (compiler, hardware, operating system) than recode it from scratch.
Writing the systems design report
The systems design report is prepared for higher management and describes alternate
designs. It presents the costs and benefits and outlines the effect of alternate designs on the
organization. It concludes by recommending one of the systems

Common analysis tools


Decision tables
Decision tables are used to model complicated programming logic. They can make it easy to
see that all possible combinations of conditions have been considered; when conditions are
missed, it is easy to see to see this.

GBHS DSCHANG Page 105


READERS ARE LEADERS

System flowchart
System flowchart is the graphical representation of the flow of data in the system, and
represents the work process of the system. Various symbols are used in the flowchart to
designate specific actions. We will use the following symbols:

Example: A system flowchart describing a program.

Here, the program Pay010 has keyboard input, and produces output on the monitor and
printer.

Data flow diagrams


The Data Flow Diagram (DFD) is a graphical representation of the flow of data of a process
or system through an information system. It enables you to represent the processes in
your information system from the viewpoint of data. Data flow diagrams are used by
systems analysts to design information-processing systems but also as a way to model
whole organizations. A DFD has no control flow, there are no decision rules and no loops.
There exist two methods to represent DFD: Gane & Sarson method and Yourdon method.
Example: A context-level data flow diagram for an airline reservation system.

GBHS DSCHANG Page 106


READERS ARE LEADERS

Field works
- Visiting institutions and making appraisals of there IS.
- Visiting institutions using systems for general and specific purposes.

CHAPTER 10: DATA TYPES AND DATA STRUCTURES


Competence:
- Be able to assign the right type of data and data structure in a program for effective
functioning.
Introduction
The primary purpose of most computer programs is to store and retrieve data rather than to
perform calculations. There are many different ways to organize data for storage and
retrieval, and each type of organization is well suited to solving certain kinds of problems and
poorly suited to solving problems of other kinds. Consequently, the way in which a
program's data is organized may have a profound effect on the program's running time
and memory requirements.
A programming language is proposed to help programmer to process certain kinds of
data and to provide useful output. A program usually contains different types of data
types (integer, float, character etc.). C language is so rich with data types. A programmer
has to employ proper data type as per his requirements.

A. DATA TYPES
It is the name given to a set of values and some operations which can be performed on that set
of values. For the computer to prepare memory locations for data in a program, it needs to
know the type of data so that it can reserve the correct amount space. A computer understands
the following types of data integer, real, character, Boolean, string.

GBHS DSCHANG Page 107


READERS ARE LEADERS

1. Integer: These are positive or negative whole numbers including zero. It is used to store
data which will never have a decimal value. Example, 8, 57, -67, -121. An integer can
represent the number of students in a class, temperature (how cool or hot), etc.,
operations that may be applied to integers include: addition, subtraction, multiplication,
division, and modulo.

2. Real: These are numbers that contains a fractional part. They constitute all possible
numbers with the exception of imaginary numbers (e.g. the square root of -1). There are
two kinds: fixed point numbers like 6.778 and floating point numbers like 2.5*105.
3. Character: A character stores a single digit or letter. A character usually occupies one
byte.

4. Boolean: A Boolean refers to any expression or variable that can have only a true or
false value i.e. can take only one of two possible values at a time.

5. String or Alphanumeric String: A string is any sequence of characters. Examples


include Nested15, billionaire, millionaire; Strings are used to represent thinks like
names of people or places, dates of birth, product labels, etc.

B. DATA STRUCTURE
It is a specialized format or pattern for organizing and storing data in the computer. Any data
structure is designed to organize data to suit a specific purpose so that it can be accessed and
worked with in appropriate ways. A well designed data structure allows a variety of critical
operations to be performed using as few resources (e.g. time and memory space) as possible.
1. Array: It is a set of data item of the same type. The individual data items in an array are
called array elements. Each array element has a unique identifying index which is use
for accessing that particular element in the set. Sets of elements such as the set of
examination marks for a class may be conveniently arranged into a sequence and
referred to by indices e.g. MARK = (77 92 46 65 42). Any array element may be
accessed separately by stating its position in the array. Hence Mark(1) is 77, Mark(4) is
6. The position numbers given in brackets are called indices. Arrays can have more than
one dimension. A one-dimensional array is called a vector while a two –dimensional
array is called a matrix.
Example 21 45 65 32 75 98 15 34 11 20
Tab is an array
We refer to the individual values as members (or elements) of the array. There is only
one identifier name assigned to the array. The position of an element in an array is called
index and is written in bracket. If Tab is an array, Tab[i] represents the element at the ith
position. Tab[4] = 32, Tab[7] = 15.

GBHS DSCHANG Page 108


READERS ARE LEADERS

2. String: It is a sequence of consecutive characters that are manipulated as a group. A


character string differs from a name in that it does not represent anything – a name
stands for an entity. A character string is often specified by enclosing the characters in
single or double quotes. For example Kumbo would be a name but ‗Buea‘ and
―Bamenda‖ would be character strings. The length of a character string is usually the
number of characters in it. Concatenation is an operation that adds one string onto the
end of another string i.e. ―class‖ and ―room‖ would then be ―classroom‖. The length can
either be fixed (have a fixed number of characters places available for the data storage)
or variable length strings (provide the data with just the number of spaces it needs.
String8 = PACKED ARRAY[1…8] OF CHAR
3. Records: A record is a collection of related data elements (called fields) that are treated
as a single unit. Records are easily compared with arrays but differ from arrays in such a
way that the individual data items in a record may differ in type whereas all the data
items in an array have the same type. E.g.
Candidate:= record
Candidate_number : integer
Candidate_name: string
Candidate_mark : real
End record
In the constellation, the word Candidate is the record while the terms Candidate_number,
Candidate_name, Candidate_mark are all record fields.
4. Linked list: It is a collection of items with an inherent order i.e. consist of a number of
nodes each containing one element and one or more links to other nodes. E.g. the
sentence ―Musa is a student‖ can take the following list:
Musa

is

student

In this constellation, we regard each word in the sentence as a data item (datum) which is
linked to the next datum by a pointer. Datum plus pointer make one element or node of the
list. The last pointer is known as the terminator.

GBHS DSCHANG Page 109


READERS ARE LEADERS

5. Tree: A tree is a type of data structure in which each is attached to one or more
elements directly beneath it. Each element of this hierarchical data structure is called a
node and consists of a datum and at least two pointers. The node at the top of a tree is
called the root. A node with no children is called a leaf. The connection between nodes
is called branches. A special type of tree in which each node has only two branches
below is referred to as a Binary Tree. A special type of Binary Tree in which the value
of each node is greater than the values of its leaves is called a heap.
6. Pointers: A pointer is a programming language data structure whose value refers
directly to or points to another value stored elsewhere in the computer memory using its
address.
7. Other types of data structures
- Queues: it uses the principle of FIFO whereby elements are removed in the same order
they were entered.
- Stacks: it uses the LIFO principle.
- Deques, Tables, Files (a file is made up of one or two tables)

CHAPTER 11: COMPUTER NETWORKS AND DATA COMMUNICATION


Competence:
- Explain the term network and types.
- Describe the various network topologies and hardware.
- Explain the difference between server-based and peer-to-peer networks.
- Understand network protocols as used in IP addressing.
I. Computer Networks
The term network refers to group of objects, people, concepts, which are connected or linked
to one another. A computer network is a collection of computers, printers, and other devices
that are connected together so they can communicate and share resources. The smallest
network can be as simple as two computers linked together. The resources shared include
software, files, folders, printers, disk drives and anything else that exists on a computer. Any
computer or device on a network is called a node or host.
Networking is the term that describes the processes involved in designing, implementing,
upgrading, and managing and otherwise working with networks and network technologies
with its main objectives to share resources.
A computer that is not connected or linked to another computer is referred to as a stand-alone
computer. Such a computer needs its own printer, hard disk drives and its own application
programs.
For a device to be connected in a network, it must be connected through a cable, telephone
lines, radio waves, satellites, or infrared light beams and it must have a Network Interface
Card (NIC), must have a Network Operating System (NOS) and usually has at least one
GBHS DSCHANG Page 110
READERS ARE LEADERS

connecting device like hub or router that ties the computer on the network together and must
have a software that supports the movement of information in and out the computer.
1. Types Of Computer Networks
Depending on the geographical area covered, networks can be classified as local area
networks, wide area networks, metropolitan area networks, personal area networks etc.
1.1. Local Area Network
A local area network (LAN) is a network that is used for communicating among computer
devices usually within an office building, school campus, or home. It enables the sharing of
resources such as files or hardware devices that may be needed by multiple users in an
organization. A LAN is limited in size, spanning a few hundred meters, and not more than a
kilometer. It is fast, with speeds from 10 Mbps to 10 Gbps. An example of LAN is the
network in the computer lab and Multimedia Resource Centre.
1.2. Metropolitan Area Network
A metropolitan area network (MAN) is a large computer network that usually spans a city or a
large campus. It is optimized for a larger geographical area than a LAN, ranging from several
blocks of buildings to entire cities. A MAN typically covers an area of between 5 and 50 km
diameter. An example of a MAN is a cable TV network.
1.3. Wide Area Network
A wide area network (WAN) covers a large geographic area such as a country, a continent or
even the whole world. It is a distributed collection of LANs. That is, it connects two or more
LANs together. This is done using devices such as bridges, routers or gateways, which enable
them to share data. The largest and most well-known example of a WAN is the Internet.
1.4. Personal Area Network
A personal area network (PAN) is a network that is used for communication among
computers and computer devices in close proximity of around a few meters within a room. A
PAN usually includes laptops, mobile phones, personal digital assistants, digital cameras and
headsets. It can be used for communication between the devices themselves or for connection
to a larger network such as the Internet. The most popular is the Wireless PAN (WPAN), a
Wireless-Fidelity/Bluetooth connection between two laptop computers or phones.
1.5. Wireless - Local Area Network
A wireless - local area network (WLAN) is a LAN based on wireless network technology.
WLANs use radio signals as the medium for communication. Wireless network cards are
required to be installed in the systems for accessing any wireless network around.
2. Network Components
2.1. Network Operating System
A network operating system (NOS) is an operating system that supports networking. It
provides the ability to share resources like printers, file system, database, applications, and the
ability to manage a network name directory, security, and other housekeeping aspects of a
network. Examples of NOS are Artisoft's LAN tastic, Novell's NetWare and Microsoft's LAN

GBHS DSCHANG Page 111


READERS ARE LEADERS

Manager. Some multi-purpose operating systems come with capabilities that enable them to
be described as network operating systems. Examples are Windows NT, XP, Vista, 7 and 8.
2.2. Network Interface/Adapter Card
A network interface card (NIC) provides the physical interface (link) between the computer
and the communication medium. A NIC manages the communication and network protocol
for the PC. It prepares data, sends data and controls the flow of data. It plugs into the system
board and provides ports for connection to the network. There are two kinds of NIC: wired
NIC for wired networks and wireless NIC (WNIC) for wireless networks.
Network Hardware’s
2.3. Hub
A hub is a device that works as central connecting point for multiple computers in a network.
It has ports to which the computers in the network are connected. Data sent to the hub is
broadcasted to all the ports but, only the destination computer receives it. There are three
kinds of hubs:
 Passive hubs which only split the transmission signal so it can be sent to all the ports
 Active hubs (also called Multiport Repeaters) which regenerate data bits to maintain a
strong signal over extended cable lengths
 Intelligent hubs (also called Concentrators) usually have their own microprocessor chips
and network operating systems. They can be managed remotely on the network.
2.4. Switch
A switch is used at the same place as a hub but the difference between the two is that a switch
has a switching table within it. A switching table stores the Media Access Control (MAC)
address of every computer connected to the switch and sends the data only to the requested
address, unlike the hub which broadcasts the data to all the ports. Switches can therefore be
considered as an advanced form of hubs.

2.5. Repeater
A repeater is a device used to expand the boundaries of a wired or wireless LAN. With
physical media, data transmissions can only span a limited distance before the quality of the
signal degrades. Repeaters are used to preserve signal integrity and extend the distance over
which data can safely travel by regenerating the signals they receive. Active hubs are
considered as repeaters (multiport repeaters).
2.6. Bridge
A bridge, also called a layer 2 switch, is a device used to create a connection between two
separate computer networks or to divide one network into segments. Creating multiple
segments in a local network reduces the network traffic making the network to be faster and
more efficient.

GBHS DSCHANG Page 112


READERS ARE LEADERS

2.7. Router
A router is a device that joins several networks together and is responsible for routing data
from one network to another. It keeps track of the IP addresses of the computers on the
networks connected to its network interface cards and directs data packets appropriately. It is
more powerful than a bridge because instead of just choosing network segments based on
previous traffic, a router can look up the best route for a packet to take. Routers can be
computers with operating systems and special network software, or they can be other
dedicated devices built by network manufacturers. The Internet relies heavily on routers.
2.8. Modem
MODEM (MOdulator-DEModulator) is a device that encodes data for transmission over a
particular medium, such as telephone line, coaxial cable, fiber optics, or microwaves. It
converts digital signals from a computer to analog signals or waveform for transmission over
a medium (modulation) and converts analog signals from the medium to digital signals
understandable by the computer (demodulation). It can be external, internal i.e. mounted
inside the computer, or built-in i.e. integrated in the motherboard.
Common types of modems are:
o Dial-up Modem
o Cable Modem
o Domain Subscriber Line Modem (Asymmetric DSL & Symmetric DSL)
o Sat modem
2.9. Multiplexer
A multiplexer abbreviated (MUX) is a device that takes input signals from different sources
and transmits them over a single transmission line. This process is known as multiplexing.
There are different types of multiplexing:
 Frequency-division multiplexing (FDM), in which the carrier bandwidth is divided into
sub channels of different frequency widths, each carrying a signal at the same time in
parallel.
 Time-division multiplexing (TDM), in which the multiple signals are carried over the
same channel in alternating time slots.
 Code-division multiplexing (CDM), in which the multiple signals are carried over the
same channel but every signal is coded differently.
Orange and MTN use a combination of FDM and TDM called GSM while Camtel uses CDM.
2.10. Cables
A cable is use to physically connect nodes together. There are three common types of cables:
coaxial cable, twisted pair cable and fiber optical cables.
a. Coaxial Cable
Coaxial cable consists of an inner core and an outer flexible braided shield, both of
conductive material separated by an insulator. The braided shield prevents the cable from

GBHS DSCHANG Page 113


READERS ARE LEADERS

picking up or emitting electrical noise. There are two types of coaxial cables: thin net and
thick net.
b. Twisted Pair
Twisted-pair cable is the most common type of cabling used in LAN networks today. It
consists of a pair or pairs of insulated wires twisted together. Cable twisting helps reduce
noise pickup from outside sources and crosstalk on multi-pair cables. There are two types of
twisted pair cables: shielded twisted pairs (STP) and unshielded twisted pairs (UTP).
c. Fiber Optic Cable
Fiber optic cables use optical fibers that carry digital data signals in the form of modulated
light pulses. An optic fiber consists of an extremely thin cylinder of glass, called the core,
surrounded by a concentric layer of glass, known as the cladding. Each cable has two fibers -
one to transmit and one to receive.
There are two types of fiber optic cables:
 Single Mode Fiber (SMF) uses a single ray of light to carry transmissions over long
distances.
 Multi-Mode Fiber (MMF) uses multiple rays of light simultaneously with each ray of
light running at a different reflection angle to carry transmissions over short distances.
2.11. Gateway
A gateway is a device that connects two different computer networks using direct and
systematic translations between protocols. A gateway translates outgoing network traffic to
the protocol needed by the destination network. The term gateway is also sometimes loosely
used to describe any device that acts as the entry or exit point for a network.
2.12. Interworking
It is a technique of linking different networks by using intermediary devices such as routers or
gateways.

Assignment: Give the difference between Extranet and Intranet.

3. Network Topologies
It is the arrangement of nodes in a communications network. There are two types of network
topologies. Physical network topology which refers is the physical layout or arrangement of
the components of a network. Logical network topology which refers to the way data
circulates or travels along communication lines in a network. The following are physical
Network topologies.

3.1. Bus Topology


In bus topology, all computers are connected to a single cable (trunk or backbone) known as
bus, by a transceiver either directly or by using a short drop cable. Bus transmits in both
directions such that any transmission can be received by all stations. All ends of the cable

GBHS DSCHANG Page 114


READERS ARE LEADERS

must be terminated, that is plugged into a device such as a computer or terminator, to avoid
signals from bouncing back.

a. Advantages
- Easy and inexpensive to set up as little cabling is required.
- Easy to include additional stations without disrupting the network.
- Failure of one node does not affect network.
b. Disadvantages
- High rate of data collision.
- Fails if there is any damage to the bus.
- Any break in the bus is difficult to identify.

3.2. Star Topology


In a star topology, all the computers are connected to a central device which could be a
computer (server), a hub or a switch. Any communications between computers in this
topology must pass through the central node. As such, the central node controls all the
activities of the network.

a. Advantages
- Breakdown of anode does not affect the network.
- No disruption of the network when connecting or removing devices.
- It is easy to detect faults.
- Good security because no workstation can interact with another without going through
the server first.
b. Disadvantage
- Failure of the central node affects the entire network .
- It is costly due to the amount of cables required to connect the devices.

3.3. Ring Topology

GBHS DSCHANG Page 115


READERS ARE LEADERS

In ring topology, all the nodes are connected in the form of a closed loop such that each node
is connected to two others. It uses an empty data packet called a token and a special protocol
called token ring. Packets travel around the ring in a clockwise direction. To transmit, a node
requires an empty token.

a. Advantage
- No collision as data travels in one direction.
b. Disadvantage
- If a node in the network fails, the entire network fails.
- Network is disrupted when additional stations are added.

Other types of topologies are:


3.4. Mesh Topology: In a true mesh topology, every node is connected to every other
node in the network.

3.5. Tree Topology: Tree Topology integrates the characteristics of Star and Bus
Topology. In Tree Topology, the number of Star networks is connected using Bus.

3.6. Hybrid Topology: Hybrid, as the name suggests, is mixture of two or more than
two different things. Similarly in this type of topology we integrate two or more different
topologies to form a resultant topology which has good points (as well as weaknesses) of all
the constituent basic topologies rather than having characteristics of one specific topology.

GBHS DSCHANG Page 116


READERS ARE LEADERS

4. Network Standards
4.1. Token Ring Network
Token ring (IEEE 802.5 standard) is a network technology developed by IBM in which
computers are connected together in a ring. Token ring‘s media-access method is called token
passing. A special message, called token, circulates along the ring from one computer to
another and each computer can transmit only while it is holding the token. Information flows
in one direction along the ring from source to destination and back to source. When a station
wishes to transmit, it waits for the empty token to pass by. It seizes it and inserts data into it
and then releases it to the medium. The token circulates until it gets to the destination
computer that picks it and retrieves the data. After retrieving the data, it regenerates the token
and sends it back to the medium.

4.2. Ethernet Network


Ethernet (IEEE 802.3 standard) is the most common and widely used technology to establish
any computer network. An Ethernet network is formed by physically connecting the
individual computer units to each other in a bus topology or a star topology. Ethernet‘s media
access policy is CSMA/CD (Carrier Sense Multiple Access with Collision Detection).
 CS: means that a station listens to the medium and transmits only if medium is idle
 MA: means that any station can use (access) the medium
 CD: means that each station stops transmitting immediately it senses a collision
When a collision is detected, the two stations involved will retransmit after a random time
wait created by a back off algorithm.

4.3. Fiber Distributed Data Interface (FDDI)


FDDI is a network technology that uses fiber-optic cables in a ring topology with dual rings
on which information can travel in opposite directions. The media access method for FDDI is
token passing. The primary ring is used for data transmission, and the secondary ring remains
idle. Because of this double ring topology, if a station fails or a cable becomes damaged, the
dual ring is automatically wrapped around itself, forming a single ring. This prevents
downtime as a result of a failed machine or faulty wiring.

4.4. Wireless Network Standards


Wireless networks are established without physical wiring techniques involved. They use
radio and infrared signals and are based around one of these technologies: Bluetooth, Wi-Fi,
WiMax, terrestrial microwaves and satellite.
a. Bluetooth: is a low power, short-range wireless technology largely used to
interconnect computing devices into a personal area network. It is based on IEEE standard
802.15 which gives specifications for Wireless Personal Area Network (WPAN).

GBHS DSCHANG Page 117


READERS ARE LEADERS

b. Wi-Fi: stands for Wireless Fidelity. It is based on a set of wireless networking


technologies known as 802.11. These include 802.11b, 802.11a, 802.11g and 802.11n. The
range of Wi-Fi network transmission is about 30-40m indoors and up to about 100moutdoors.
c. WiMax: stands for Worldwide Interoperability for Microwave Access. It is based
on IEEE standard 802.16 and facilitates high speed wireless network links to both fixed and
mobile devices. The range of a WiMax wireless connection is around 3-10km.

5. Logical topologies also known as Network Architectures (configuration)


5.1. Client-Server Architecture
Client/server is a network architecture in which a more powerful computer called server is
dedicated to serving less powerful computers called clients. Servers hold shared resources like
files, programs and the network operating system. They provide access to network resources
to all the users of the network. There are many different kinds of servers, and one server can
provide several functions. For example, there are file servers, print servers, mail servers,
database servers and Web servers, to name a few. Users run applications on client
workstations which rely on servers for resources such as files, devices and even processing
power.
Internet services are organized according to client/server architecture. Client programs such as
Web browsers and file transfer programs create connections to servers, such as Web and FTP
servers. The clients make requests of the server, and the server responds to the requests by
providing the service requested by the client.

5.2. Peer-to-peer Architecture


Peer-to-peer (P2P) is a network configuration in which all the workstations (computer) have
equal capabilities and responsibilities. Each workstation acts both as a server and a client.
This means that any computer on the network can provide services to any other computer.
Peer-2-peer is usually implemented where strict security is not necessary. P2P networks are
generally simpler and less expensive, but they usually do not offer the same performance
under heavy loads.

REMARK A Hybrid network combines client/server and peer-to-peer architectures. It is the


most commonly used network architecture.
Different between Intranet and Extranet: these are networks that are used within
organizations.
Intranet: An intranet is a private network based on TCP/IP protocols belonging to an
organization usually a corporation and is only accessible to the organizations members,
employees, or others with authorization. Mostly protected using firewall software or firewall
device. They are now the fastest-growing segment of the Internet because they are much less

GBHS DSCHANG Page 118


READERS ARE LEADERS

expensive to build and manage than private networks based on proprietary protocols e.g.
companies, military, secret services like MI5 and CIA, etc.

Extranet: An extranet is a controlled private network allowing customers, partners, vendors,


suppliers, and other businesses to gain information without granting access to the organization
entire network. It is often a private part of a website e.g. banks, etc. it is expensive to
implement and maintained.

Benefits of a Computer Network


a. File sharing
Networks allow files located on one system to be accessed remotely.
b. High Speed Resource Sharing
Networks allow resources like modems, printers, programs, and scanners to be shared
amongst multiple users.
c. Communication
Computer networks have improved the way people communicate. People all over the world
can communicate and collaborate in a matter of minutes thanks to networks. In organizations,
computer networks serve as the backbone of daily communication
d. Save costs
Shared resources mean reduction in hardware costs. Shared files mean reduction in memory
requirements which indirectly means reduction in file storage expenses.
e. Increased Storage Capacity
A stand alone computer might fall short of storage memory, but when many computers are on
a network, the memory of different computers can be used in such a case.
f. Teleconferencing or Videoconferencing
This is a communication technology that integrates video and voice to connect remote users
with each other as if they were in the same room. Each user needs a computer, webcam,
microphone, and broadband internet connection to participate. This enables organizations to
save travelling cost for employees.
g. Backups: Files can be backed up more easily when they are all on a central file server
rather than when they are scattered across a number of independent workstations.

5.3. Limitations of a Computer Network


a. Security concerns
If a computer is a standalone computer, physical access becomes necessary for any kind of
data theft. However, if a computer is on a network, a hacker or intruders can get unauthorized
access by using different tools.
b. Malware attacks

GBHS DSCHANG Page 119


READERS ARE LEADERS

Computers connected to a network are susceptible to malware attacks. If one system gets
infected by a virus, there is a possible for the other systems getting infected too
 The initial set up cost is high (needs NIC, NOS, Software, etc.)
 Increased risk of data corruption since many users use the system.
 Networks are always expensive to maintain so needs experts services.

II. Data Communication System


Objectives
- Describe data communication.
- Explain modes of data communication.
- Explain asynchronous method of data transmission.
Data communication refers to the exchange of data between two devices via some form of
communication channel. In data communication the following basic terms are frequently
used:
o Data: a collection of facts in raw form that becomes information after processing.
o Signal: an electric or electromagnetic encoding of data.
o Signaling: propagation of signals across a communication channel.
o Transmission: sending of data from one place to another by means of signals.

Data Transfer Rate


It is the rate of that a certain amount of data is transferred over a given period of time. It can
be in KB, MB, GB, TB, etc. The same applies to the time taken i.e. mille-seconds, seconds,
minutes, etc. mathematical relationship can be expressed as shown below.
Data Transfer Rate = Quantity of data transferred/Time taken
It can be in KB/s

1. Basic Elements Of a Communication System


There are five basic components in a communication system.
 Data Source: creates data for transmission
 Transmitter: encodes data for transmission
 Communication channel: connecting medium between communicating devices
 Receiver: decodes transmitted data back to original
 Destination: the final destination of the transmission
Example: John calls Peter on phone.
The data source is John, the transmitter is John‘s phone, the communication channel is the
telephone cable or microwave, the receiver is Peter‘s phone and the destination is Peter.

Communication Software’s: To communicate over a network you need some


communication software. Since there are a number of different communication tasks, there
GBHS DSCHANG Page 120
READERS ARE LEADERS

are different kinds of software to manage each task. There are NOS, Dialing software, File
transfer software, Terminal emulation programs, Data encryption programs, and Instant
messaging programs.

2. Data Transmission Concepts


2.1. Analog and Digital Signals
Data is transmitted from one point to another by means of electrical signals that may be in
analog or digital form.
a. Analog Signals
An analog signal is one in which information is represented as a continuous variation of some
physical property or quantity. Analog signals are continuous waves that carry information by
varying the frequency or amplitude of the wave.
 When the amplitude of the signal is varied the technique is called amplitude
modulation (AM)
 When the frequency of the signals is varied, the technique is called frequency
modulation (FM).
Human speech is an example of an analog signal. Telephone lines use analog signals because
they were originally designed for speech.

b. Digital Signals
A digital signal is one in which information is represented as a sequence of binary values 0
and [Link] two values represent two conditions, on or off, corresponding to two known
levels of voltage or current.
Digital signals do not continuously vary as analog signals. Signals are transmitted within the
computer as digital signals. Systems that use digital technology are known as baseband
systems.

GBHS DSCHANG Page 121


READERS ARE LEADERS

2.2. Baseband and Broadband Systems


a. Baseband System
A baseband system is a single-channel system that supports a single transmission at any given
time. In a baseband system, data is sent as a digital signal through the media as a single
channel that uses the entire bandwidth of the media. Baseband communication is bi-
directional, which means that the same channel can be used to send and receive signals. In
Baseband, frequency-division multiplexing is not possible.
b. Broadband System
A broadband system is a multichannel system that supports multiple transmissions via
multiple frequency channels. In a broadband system, data is sent in the form of an analog
signal where each transmission is assigned to a portion of the bandwidth. Broadband
communication is unidirectional, so in order to send and receive, two pathways are needed.
This can be accomplished either by assigning a frequency for sending and assigning a
frequency for receiving along the same cable or by using two cables, one for sending and one
for receiving.
2.3. Transmission Modes
This simply refers to the direction of flow of information between two communicating
devices. It could be simplex, half duplex or full duplex.
a. Simplex Mode
In simplex mode, signals are transmitted in only one direction. The flow of information is
unidirectional from transmitter to receiver always. Examples are television broadcasting,
computer to the printer connection and CPU to monitor communication.
b. Half duplex Mode
In half duplex mode, signals can be transmitted in both directions but only one way at a time.
The flow of information is bidirectional but information can only be sent if it is not being
received. It is suitable for data transmission between a computer and dumb terminals. An
example is the police radio (walkie-talkie).
c. Full duplex Mode
In full duplex mode, signals can be transmitted in both directions simultaneously. The
communicating devices can transmit at the same time. The flow of information is
bidirectional. It is suitable for interactive systems. An example is the telephone.

2.4. Parallel and Serial Transmission


a. Parallel Transmission
Parallel transmission is the method of transferring blocks of data (several bits) at the same
time over separate channels/lines. This type of transmission requires a separate channel for
each bit to be transmitted. For example, eight separate channels will be required if a block of
eight bits is to be transmitted in parallel. Parallel transmission is fast but it is suited only for

GBHS DSCHANG Page 122


READERS ARE LEADERS

short distances as cabling for long distances will be expensive. It is mainly used for
connections within the computer and for connecting the computer to the printer.
b. Serial Transmission
Serial transmission is the method of transferring data one bit at a time through the same
channel. If a block of 8 bits is to be transmitted in series, the bits will be transmitted one after
the other on the same channel. Serial transmission is slower than parallel transmission but it is
suited for long distances. It is cheaper as only one transmission line is required. Serial
transmission can be asynchronous or synchronous.
 Asynchronous serial transmission: it describes the process where transmitted data is
encoded with start and stop bits, specifying respectively the beginning and end of each
character. Data is sent character by character with each character preceded by a start bit
and a stop bit is added to the end. Other control bits like the parity bit are added to the
group before the stop bit and small gabs are inserted to distinguish each group.
 Synchronous serial transmission: it describes a continuous and consistent timed transfer
of data blocks. Data is sent as one long bit stream or block of data without start or stop
bits and with no gabs. Upon reception, the receiver counts the bits and reconstructs bytes.
Another channel is therefore used to transfer timing signals to keep the both parties
synchronized. Accuracy is dependent on the receiver keeping an accurate count of the
bits as they arrive.
Synchronous transmission is faster than asynchronous transmission because fewer bits have to
be transmitted, only data bits and no extra control bits. For this reason it is the choice for
network communications links.
2.5. Switching Techniques
The process of transferring data blocks from one node to another is called switching. Data is
routed by being switched from one node to another. Two switching techniques exist: packet
switching and circuit switching.
a. Packet Switching
Packet switching is a switching method in which the message to be transmitted is broken into
small data packets and sent over the network. Each packet contains a portion of data and some
control information. The packets may take different routes to arrive their destination and they
may arrive in any other. On arrival, they are put back into order and the message is
reconstituted. Each packet is sent with a header address which tells what its destination is.
One packet contains information on how many packets should be arriving. If a packet fails to
arrive, the destination computer sends a message to the sender‘s computer asking it to send
the missing packet again. This method is suitable for transmission of data.
b. Circuit Switching
Circuit switching is a switching method in which a dedicated communication path in physical
form between two stations within a network is established, maintained and terminated for
each communication session. This channel remains open throughout the communication

GBHS DSCHANG Page 123


READERS ARE LEADERS

process and cannot be used by anyone else. It has basically three phases: circuit
establishment, data transfer and circuit disconnect. The message is sent without being broken
up, so it is received in the order it was sent. This method was designed for voice
transmissions. Telephone networks use this type of switching method to transmit phone calls.

3. Transmission Media
A transmission medium is the physical pathway that connects computers and other devices on
a network. There are two categories of transmission media: guided and unguided media.
3.1. Guided Media
Guided media are the physical links through which signals are confined to narrow path. They
are made up of an internal conductor (usually copper) bounded by jacket material. They are
also called bounded or conducted media. Three common types of guided media are used for
data transmission.
a. Coaxial cable
b. Twisted pair cable
i) Unshielded Twisted Pair (UTP)
ii) Shielded Twisted Pair (STP)
c. Fiber optic cable

4. Unguided Media
Unguided media do not use physical means to define the path to be taken. They provide a
means for transmitting electromagnetic waves but do not guide them. They are also called
unbounded media. Examples of unguided media are infrared waves, radio waves, microwaves
and satellite.
 Communication Satellites. A communication satellite is a microwave relay station placed
in outer space. A microwave signal is transmitted from earth to the satellite which
amplifies the signal and sends it back to earth. The earth station transmits the signal to
the satellite on an up-link, on one frequency and the satellite repeats those signals on a
down link which is on another frequency.

5. Peripheral Device Control


a. Buffer

GBHS DSCHANG Page 124


READERS ARE LEADERS

A buffer is an area of memory used to temporarily store data while it is being moved from one
place to another. Routers use buffers to route data packets on the Internet. When a packet is
sent from one router to another via one or more intermediate routers, the packet is received at
each intermediate router in its entirety, stored there until the required output line is free, then
the packet is forwarded.
b. Interrupt
An interrupt is a signal to the processor emitted by hardware or software indicating an event
that needs immediate attention. An interrupt alerts the processor of a high-priority condition
requiring the interruption of the current task the processor is executing.
c. Polling
Polling is the process by which the central computer or communications controller in a
network, "polls" or asks each device in the network if it has a message to send and then allows
each in turn to transmit data. Access and control of star network typically is maintained by a
polling system.
d. Handshaking
Handshaking is the process by which two devices initiate communications. It begins when
one device sends a message to another device indicating that it wants to establish a
communications channel. The two devices then send several messages back and forth that
enable them to agree on a communications protocol.

6. Communication Protocols
A protocol is a set of rules and conventions that govern how devices on a network
communicate. Protocols set message formats and procedures that allow machines and
application programs to exchange information. These rules must be followed by each machine
involved in the communication in order for the receiving host to be able to understand the
message. The need for a protocol is obvious: it allows different computers from different
vendors and with different operating characteristics to ‗speak the same language‘. A protocol
may be physical or logical.

6.1. Physical Protocols


Physical protocols are concerned with how a device connects to a medium. They ensure that a
device connected to a medium can transmit through the medium. Few examples of physical
protocols are 802.11 for Wi-Fi connections and DSL for broadband.

6.2. Logical Protocols


Logical protocols are concerned with data handling. They ensure that data are in the right
format for the application, the bit rates match at both ends, and the same error correction is
used. Examples of logical protocols are TCP/IP, HTTP, POP3, FTP, SMTP and WAP.

GBHS DSCHANG Page 125


READERS ARE LEADERS

 TCP: stands for Transmission Control Protocol. It is a connection-based Internet


protocol that supports reliable data transfer connections.
 IP: stands for Internet Protocol. It specifies the format of packets and the addressing
scheme.
 UDP: stands for User Datagram Protocol. It is a connectionless Internet protocol that is
designed for network efficiency and speed at the expense of reliability.
 HTTP: stands for Hypertext Transfer Protocol. It is a standard method of publishing
information as hypertext in HTML format on the Internet. In other words, HTTP defines
how messages are formatted and transmitted over the World Wide Web. Web addresses
or URLs usually begin with http indicating that the protocol used is HTTP.
 HTTPS: stands for Hypertext Transfer Protocol Secure. It is the protocol used for
accessing a secure web server, whereby all data transferred are encrypted.
 POP: stands for Post Office Protocol. It is a standard protocol for delivering e-mails to
personal computers.
 FTP: stands for File Transfer Protocol. It is a standard for transferring files between a
server and a client on a TCP/IP network.
 SMTP: stands for Simple Mail Transmission Protocol. It defines a basic service for
electronic mails. It is used for sending e-mails between servers.
 WAP: stands for Wireless Application Protocol. It is a protocol which runs on mobile
phones and provides a universal open standard for bringing Internet content to mobile
phones and other wireless devices.

No. Layer Examples of Protocols


Name
7 Application HTTP, SMTP, FTP,
TELNET
6 Presentation XDR, ANS.1, SMB
5 Session X.225, RPC, NetBIOS,
4 Transport TCP, UDP, SPX,
3 Network IP, X.25
2 Data Link Ethernet, Token Ring,
PPP, ISDN
1 Physical Electricity, Radio, Laser
The OSI reference model

GBHS DSCHANG Page 126


READERS ARE LEADERS

7. Machine Identification and Communication Ports


Every node on a network be it a server or network station has a unique identity. The type of
identity a node has is determined by the protocols running on the network. Two types of
addresses exist for identifying a node on a network: MAC and IP addresses.

7.1. Media Access Control (MAC) Address


Every node on a network has a network interface card or network adapter, which has a media
access control address. MAC address is a built-in number consisting of 12 hexadecimal digits
that uniquely and permanently identifies the network adapter.
For example, 00-14-22-DA-67-15. Under Windows, the MAC address can be displayed by
typing ipconfig/all at a Command prompt.

7.2. IP Address
An IP address is a unique identifying number given to every single computer on a TCP/IP
network. All computers, desktops, laptops, PDAs, phones, tablet PCs connected to the
Internet, have IP addresses by which they are identified. Two versions of IP addresses are
available: IPv4 that uses 32 bits and IPv6 that uses 128 bits.
An IPv4 is made up of four sets of numbers separated by periods such as [Link]. Each
of the four numbers separated by periods can be any number from 0 to 255, making for a total
of 4.3 billion potential IPv4 addresses (i.e. ).
An IPv6 has eight sets of numbers separated by colons such as
3ffe:1900:4545:3:200:f8ff:fe21:67cf.
IP addresses are assigned manually (by an administrator) or automatically (by DHCP or
APIPA), unlike MAC addresses that are assigned during manufacture. MAC addresses are
physical addresses while IP addresses are logical addresses.

7.3. Communication Ports


A communication port is a 16-bit number that identifies an application for which the data is
intended on the Internet. Popular Internet application protocols are associated with well-
known ports and well-known services. Examples are port 80 for accessing the World Wide
Web (HTTP), port 21 for file transfer (FTP), port 25 for sending emails (SMTP) and port 110
for receiving emails (POP).

8. NETWORK SECURITY
Network security deals with the security of information during its transmission from a user on
one computer network to another.
8.1 Network Security Problems Network security problems can be divided roughly into four
intertwined areas: secrecy, authentication, nonrepudiation and integrity control. 1. Secrecy:
This is also called confidentiality, and has to do with keeping information out of the hands of

GBHS DSCHANG Page 127


READERS ARE LEADERS

unauthorized users. 2. Authentication: this deal with determining whom you are talking to
before revealing sensitive information or entering into a business deal. 3. Nonrepudiation:
This deal with signatures: How does [Link] prove that Musa indeed placed an order for a
book, which Musa claims he never placed? 4. Integrity of service: How does one ensure that
the message received was really the one sent, and not something that a malicious adversary
modified in transit or concocted?

8.2 Types of attacks over a network: We will also classify the attacks that compromise
network security as passive attacks and active attacks.
a) Passive Attacks: These attacks are in the nature of eavesdropping on, or monitoring of,
transmissions. The goal of the opponent is to obtain information that is being transmitted.
Passive attacks are very difficult to detect since they do not involve the alteration of the data.
Two types of passive attacks are:
 Release of message contents: where an eavesdropper tries to learn the contents of what is
being transmitted. This can be prevented by encryption.
 Traffic analysis: where the opponent tries to observe the pattern, frequency and length of
messages being exchanged which could be used in guessing the nature of the communication
that is taking place.

b) Active Attacks: Active attacks involve some modification of the data stream or the
creation of a false stream. It is difficult to prevent active attacks absolutely because to do so
would require physical protection of all communications facilities and paths at all times.

8.3 Data compression and data encryption: In other to send data easily through a network,
it is required to compress it in other to reduce space for storage and bandwidth for
transmission. Data compression is the process of converting data from a large format into a
smaller format, usually by the means of an algorithm. The data can be expanded back to its
original state, usually by means of decompression algorithm. The procedure for compressing
data is known as data compression techniques or coding schemes. Some popular examples of
data compression techniques include:
a) Graphic Interchange Format (GIF): This is a widely used compression format that is
used for storing and transferring graphic images in relatively small files over computer
network such as Internet.
b) Joint Picture Expert Group (JPEG): This is a popular file compression format for storing
and transferring color photograph and high quality images in relatively small files over
computer network such as Internet.
c) Motion Picture Expert Group (MPEG): This is a standard file compression format for
storing and transferring digital audio and video (moving images) in relatively small files over
computer network.

GBHS DSCHANG Page 128


READERS ARE LEADERS

d) Huffman coding: This is a lossless compression technique in which the characters in a


data file are converted to a binary code, where the most common characters in the file have
the shortest binary code, and the least common have the longest.
e) Run-length encoding: This a compression technique that is designed for compressing,
long, repetitive character strings in a piece of text, as well as compressing byte of a
monochrome image file.

An important characteristic feature in any coding scheme is the compression ratio. It is the
ratio of a compressed file to the original uncompressed file. There are two basic form of data
compression: lossless compression and lossy compression.
- Lossless compression is the form of compression in which the original data can be restores
exactly. (Ex: zip).
- Lossy compression is the form of compression in which the original data cannot be restored
exactly due to loss of some of its elements (ex: mp3)

Data encryption refers to mathematical calculations and algorithmic schemes that transform
plaintext into cypher text, a form that is non-readable to unauthorized parties. The recipient of
an encrypted message uses a key which triggers the algorithm mechanism to decrypt the data,
transforming it to the original plaintext version.

III. Assignment
THE INTERNET and THE WORLD WIDE WEB (WWW)
Plan
- History
- Definition
- Internet Access, ISPs and Services offered by the Internet like e-mail
- Advantages and Disadvantages
- WWW and E-mails
- Internet protocols
- Collaborative environments
- Social networking
- Electronic services like e-commerce, e-government, e-learning, e-banking, e-health, and
computer assisted learning (CAL) giving its advantages and disadvantages.

CHAPTER 12: SYSTEM DEVELOPMENT LIFE CYCLE (SDLC)


Most IT projects use the System‘s Life-cycle approach to developing a new system. This
approach consists of several distinct stages, which follow one after the other. It is also referred
to as Software Development Life Cycle The number of SDLC phases may vary from four to

GBHS DSCHANG Page 129


READERS ARE LEADERS

seven stages. The division of phases often depends on the organization involved. The seven
phase approach involves the following stages: system study or planning, analysis, design,
coding, testing, conversion or implementation, and maintenance.

The principal goal of this TOPIC is to describe all the activities involved at each stage of
SDLC and the different models to follow in order to create a system/software.

Definition: SDLC is the process, methods or a set of methodologies applied to create or alter
software projects. Each of these methodologies defines unique way to create a new software
module or program. This cycle is a project management technique which divides a complex
project into smaller phases that can easily be managed.
A. SDLC Phases: it is a process of gradual refinement, meaning that it is done through
several development phases. Each phase continues and refines what‘s done in the previous
phase. The phases are as seen above.

1. System Study/Planning: This is the process of understanding why the system should be
built and defining its requirements. In this phase the problem is identified and the feasibility
study is carried out. The detailed study is also examined.
- PROBLEM IDENTIFICATION: It is the first part of the SDLC and one of the most
tedious task which is to recognize the real problem of the pre-installed system. It involves the
preparation of a ‗System Proposal‗ which lists the Problem Definition, Objectives of the
Study, Terms of reference for Study, Constraints, and Expected benefits of the new system.
The problem identification is a statement of the existing problems and description of user
requirements as outlined by the customer. It is also a brief investigation of the system under
consideration and a clear picture of what actually the physical system is.
- FEASIBILITY STUDY: In this part/phase we establish a descriptive view of the
intended project and determine its goals and objectives. If the project is to proceed, the
feasibility study will produce a project plan and budget estimate for the future stages of
development. The main goal of feasibility study is not to solve the problem but to achieve the
scope. A feasibility study is an initial investigation of a problem in order to ascertain whether
the proposed system is viable, before spending too much time or money on its development.
- DETAILED SYSTEM STUDY: This involves detailed study of various operations to be
performed by the system and their relationships within and outside the system. System
Study/Planning: This is the process of understanding why the system should be
built and defining its requirements. In this phase the problem is identified and the feasibility
study is carried out. The detailed study is also examined.

2. System Analysis: it is the study of an activity or procedure to determine the desired


output and the most efficient method of obtaining this output. It begins after the project has

GBHS DSCHANG Page 130


READERS ARE LEADERS

been defined and appropriate resources committed. It analysis activities as well as the
prediction of potential problems that may arise in the future regarding the system. The first
portion of this phase involves collecting, defining, and validating functional support and
training requirements. The second is developing initial life cycle management plans, including
project planning, configuration management, support operations, and training management.
Data Flow Diagrams are created to pinpoint where an information system can be used to solve
any problems that may exist.

3. System Design: this is the process that describes the detailed features and operations
to satisfy specific requirements. It uses the finding from a systems analysis to lay out the
methods and data relating to the components and functioning of the system. System design
determines how the system operates in terms of interactions, hardware, software, network
infrastructures, security issues, and other important factors. Normally, the design proceeds in
two stages:
• Preliminary or general design
• Structured or detailed design
Preliminary or general design.
The specification of the features of the new system and the cost estimation in implementing
these features are estimated in this stage. And if the project is still considered to be feasible,
move on to the detailed design stage.
Structured or detailed design.
The design of the system becomes more structured at this stage. Structured design is a
blueprint of a computer system. Input, output, databases, forms, codification schemes and
processing specifications are drawn up in detail. In the design stage, the programming
language and the hardware and software platform in which the new system will run are also
decided.
The various tools and techniques used to describe the system design are:
• Flowchart
• Data flow diagram (DFD)
4. System Development (coding): The goal of the coding phase is to translate the design
of the system into code in a given programming language. For a given design, the aim of this
phase is to implement the design in the best possible manner. The coding phase affects both
testing and maintenance profoundly. It is an important stage where the defined procedures are
transformed into control specifications by the help of a computer language.

5. Testing: Before actually implementing the new system into operations, a test run of
the system is done removing all the bugs if any. It is an important phase of a successful
system. After codifying the whole programs of the system, a test plan should be developed
and run on a given set of test data. During testing, the functionality of the individual sub
systems is tested to ensure proper operation (a process known as program testing or
GBHS DSCHANG Page 131
READERS ARE LEADERS

subtesting). After successful testing of each subsystem, the entire system is tested to ensure
all subsystems work together properly (a process known as system or unit testing). Testing is
the process to ensure that the system meets the requirements that were stated in the analysis
phase to meet the sponsors requirements and also to discover (and eliminate) any errors
(bugs) that might be present.

6. Implementation: After having the user acceptance of the new system developed, the
implementation phase begins. Implementation is the process of installing the new system into
the customer‗s organization and training the employees to use it, i.e. the stage of a project
during which theory is turned into practice. The major steps involved in this phase are:
• Acquisition and Installation of Hardware and Software.
• Conversion.
• User Training.
• Documentation.
After the users are trained about the computerized system, manual working has to shift to
computerized working. The following strategies are followed for running the system:
i. Parallel conversion/run: In such a run, it is for a certain defined period where by the
two systems i.e. computerized and manual are executed in parallel (together) until the
computerized works correctly. This strategy is helpful because of the following:
o Manual results can be compared with the results of the computerized system.
o Failure of the computerized system at the early stage does not affect the working
of the organization because the manual system continues to work as it used to do.
ii. Pilot conversion/run: In this type of run, only a few group of people use the new
system until it is evident that the new system works correctly then adding the other
people into the new system gradually.
iii. Plunge conversion/run: Here, the manual system is unplugged and the computerized
system is used exclusively. It carries high risk and should only be applied where the
system is commissioned from scratch or where resources are limited.
iv. Phased conversion/run: it is a run whereby the new system is implemented in phases
until it is evident that the new system performs correctly and then implementing the
remaining phases of the new system. This strategy builds the confidence and the errors are
traced easily.
See diagram bellow for more and the pros and cons of each conversion/run.

GBHS DSCHANG Page 132


READERS ARE LEADERS

7. Maintenance and Disposal

Maintenance is the process of keeping a system in good working conditions. It involves


the making of changes to hardware, software, and documentation to support its operational
effectiveness. Maintenance is necessary to eliminate errors in the system during its working
life and to tune the system to any variations in its working environment. It also means the
review of the system from time to time. The review of the system is done for:

knowing the full capabilities of the system,

knowing the required changes or the additional requirements,


GBHS DSCHANG Page 133
READERS ARE LEADERS

Studying the performance.

If a major change to a system is needed, a new project may have to be set up to carry out the
change. The new project will then proceed through all the above life cycle phases.
Disposal involves the orderly removal of surplus or obsolete hardware, software, or data.

SDLC phases and their respective Activities.

B. SDLC Models: SDLC model or methodology refers to a structured approach to the


development of an IS. This approach guides all the processes involved from an initial
planning through to maintenance of the finished product. Today, SDLC models take a variety
of approaches to development. Some of the most popular life cycle models or approaches
include;

GBHS DSCHANG Page 134


READERS ARE LEADERS

1. Waterfall Model: this is a classic SDLC model with a linear and sequential method that
has goals for each development phase. Here, the output of each stage becomes the input for
the next stage. This means that each of the stages is separated and do not overlap. Each stage
has a set of exit criteria which must be met before the next stage can begin. The number of
stages varies between 4 and 7.

Advantages: 1) it is easy to understand and use. 2) Its stages and activities are well-defined.
3) Its phases are processed and completed one at a time. 4) it works well for smaller projects
where requirements are very well understood. 5) It can quickly move to the implementation
phase. Disadvantages: there is high degree of risk and uncertainty. It is a poor model for
complex projects. Adjusting scope during the life cycle can kill the project.

When to use the waterfall model: This model is used only when the requirements are very
well known, clear and fixed, Product definition is stable, Technology is understood, There are
no ambiguous requirements, Ample resources with required expertise are available freely and
The project is short.

2. V-Shaped Model: V-model means Verification and Validation model. Just like the
waterfall model, the V-Shaped life cycle is a sequential path of execution of processes. Each
phase must be completed before the next phase begins. Testing of the product is planned in
parallel with a corresponding phase of development i.e. each stage is matched with its
equivalent stage in testing.

GBHS DSCHANG Page 135


READERS ARE LEADERS

The various phases of the V-model are as follows:


Requirements like BRS and SRS begin the life cycle model just like the waterfall model.
But, in this model before development is started, a system test plan is created. The test plan
focuses on meeting the functionality specified in the requirements gathering.

The high-level design (HLD) phase focuses on system architecture and design. It provides an
overview of solution, platform, system, product and service/process. An integration test plan
is created in this phase as well in order to test the pieces of the software systems ability to
work together.

The low-level design (LLD) phase is where the actual software components are designed. It
defines the actual logic for each and every component of the system. Class diagram with all
the methods and relation between classes comes under LLD. Component tests are created in
this phase as well.

The implementation phase is, again, where all coding takes place. Once coding is complete,
the path of execution continues up the right side of the V where the test plans developed
earlier are now put to use.

Coding: This is at the bottom of the V-Shape model. Module design is converted into code by
developers.

Advantage: 1) simple and easy to use. 2) Testing activities like planning, test designing
happens well before coding. This saves a lot of time. Hence higher chance of success over the
waterfall model. 3) Proactive defect tracking – that is defects are found at early stage. 4)
Avoids the downward flow of the defects. 5) Works well for small projects where
requirements are easily understood.

GBHS DSCHANG Page 136


READERS ARE LEADERS

Disadvantages: 1) Very rigid and least flexible. 2) Software is developed during the
implementation phase, so no early prototypes of the software are produced. 3) If any changes
happen in midway, then the test documents along with requirement documents has to be
updated. 4) Bugs are expensive to fix in the final product, although more bugs are caught here
than in the waterfall model.

When to use the V-Shaped model: The V-shaped model should be used for small to medium
sized projects where requirements are clearly defined and fixed and The V-Shaped model
should be chosen when ample technical resources are available with needed technical
expertise.

3. Prototyping Model: in this model, a prototype (an early approximation of a final system or
product) is built, tested, and then reworked on as necessary until an acceptable system is
finally achieved from which the complete system or product can now be developed. By using
this prototype, the client can get an ―actual feel‖ of the system, since the interactions with
prototype can enable the client to better understand the requirements of the desired system.

Advantages: 1) Users are actively involved in the development. 2) Since in this methodology
a working model of the system is provided, the users get a better understanding of the system
being developed. 3) Errors can be detected much earlier. 4) Quicker user feedback is available
leading to better solutions. 5) Missing functionality can be identified easily. 6) Ease of use
and needs minimal training for the end user.

Disadvantages: 1) the system may take longer to develop using this method because of the
long process of developing prototypes which may be radically altered or thrown-away. 2) It
requires a good knowledge of the problem domain in order to create a prototype. 3) It might
take a while for a system to be built.

When to use a Prototype Model: Prototype model should be used when the desired system
needs to have a lot of interaction with the end users.

Typically, online systems, web interfaces have a very high amount of interaction with end
users, so there are best suited for Prototype model. They are excellent for designing good

GBHS DSCHANG Page 137


READERS ARE LEADERS

human computer interface systems. Prototyping ensures that the end users constantly work
with the system and provide a feedback which is incorporated in the prototype to result in a
useable system.

4. Rapid Application Development (RAD) model: it is a model based on the concept that
better products can be developed more quickly by using workshops or focus groups to gather
system requirements. This methodology specifies incremental development with constant
feedback from the customers. RAD has the ability to overcome the weakness of the waterfall
model. In RAD model the components or functions are developed in parallel as if they were
mini projects. The developments are time boxed, delivered and then assembled into a working
prototype. This can quickly give the customer something to see and use and to provide
feedback regarding the delivery and their requirements.

The phases in the RAD model are:


Business modeling: The information flow is identified between various business functions.
Data modeling: Information gathered from business modeling is used to define data objects
that are needed for the business.

GBHS DSCHANG Page 138


READERS ARE LEADERS

Process modeling: Data objects defined in data modeling are converted to achieve the
business information flow to achieve some specific business objective. Description are
identified and created for CRUD of data objects.
Application generation: Automated tools are used to convert process models into code and
the actual system.
Testing and turnover: Test new components and all the interfaces.
Advantages of the RAD model:
 Reduced development time.
 Increases reusability of components.
 Quick initial reviews occur.
 Encourages customer feedback.
 Integration from very beginning solves a lot of integration issues.
Disadvantages of RAD model:
 Depends on strong team and individual performances for identifying business
requirements.
 Only system that can be modularized can be built using RAD
 Requires highly skilled developers/designers.
 High dependency on modeling skills.
 Inapplicable to cheaper projects as cost of modeling and automated code generation is
very high.
When to use the RAD model
 RAD should be used when there is a need to create a system that can be modularized
in 2-3 months of time.
 It should be used if there‘s high availability of designers for modeling and the budget
is high enough to afford their cost along with the cost of automated code generating
tools.
 RAD SDLC model should be chosen only if resources with high business knowledge
are available and there is a need to produce the system in a short span of time (2-3
months).

5. Incremental Model: it is an evolution of the waterfall model. In incremental model the


whole requirement is divided into various builds. Multiple development cycles take place
here, making the life cycle a ―multi-waterfall‖ cycle. Cycles are divided up into smaller,
more easily managed modules. Each module passes through the requirements, design, testing
and implementation phases. This type of development allows the user to see a functional
product very quickly and allows the user to impact changes in subsequent release.

GBHS DSCHANG Page 139


READERS ARE LEADERS

Example

6. Agile Model: Agile SDLC model is a combination of iterative and incremental process
models with focus on process adaptability and customer satisfaction by rapid delivery of
working software product. Agile Methods break the product into small incremental builds.

7. Build and Fix Model: it is a very simple model of software development whereby the
product is constructed with minimal requirements and generally no specifications or any
attempt at design or testing. In essence, the product is built and modified as many times as
possible until it satisfies the client. Most software‘s pass through this model. It is cost-
efficient for very small projects of limited complexity. Its disadvantage is that it‘s very costly
for large projects and would often result in a low quality product.
8. Spiral Model, Iterative Model and Joint Application Development (JAD)

Methods of interacting with a system. There are various methods used by users to interact
with the system:
 command language: A human-computer interaction method where users entered explicit
statements into a system to invoke operations.
 Menu: A human-computer interaction method where a list of system options is provided
and a specific command is invoked by user selection of a menu option.
 Form: A highly intuitive human-computer interaction method whereby data fields are
formatted in a manner similar to paper based forms.
 Object: A human computer interaction method where symbols are used to represent
command or functions.
 Natural language: A human-computer interaction method whereby inputs to and outputs
from a computer base application are in conventional speaking language such as English.

Testing a developed information system


Implementing the procedure for module testing: Before an application is released, it
undergoes a thorough testing process to ensure that the app is working in the manner in which
it was intended. There are four main stages of testing that need to be completed before a
program can be cleared for use: unit testing, integration testing, system testing, and acceptance
testing. There is also regression testing which is not a separate level of testing; it is just a type
of testing that can be performed during any of the four main software testing stages.

Establishing the importance of testing: The importance of testing is to avoid a situation


whereby after having finished coding you test and the results are not the one expected, you
now have to go back and check the entire code may be made up of thousands or millions of

GBHS DSCHANG Page 140


READERS ARE LEADERS

lines to fix it which will be a very tedious job and costly. At its peak, the importance of testing
is to avoid bugs (program errors).
The order of testing is as follows:
 Unit testing: Unit testing is a type of software testing where individual units or
components of software are tested. The purpose is to validate that each unit of the
software code performs as expected. Unit Testing is done during the development
(coding phase) of an application by the developers. Unit Tests isolate a section of
code and verify its correctness. A unit may be an individual function, method,
procedure, module, or object. In SDLC, V Model, Unit testing is first level of testing
done before integration testing and is usually performed by thee developer.
 Integration testing: Integration testing allows individuals the opportunity to combine
all of the units within a program and test them as a group. This testing level is
designed to find interface defects between the modules/functions. This is
particularly beneficial because it determines how efficiently the units are running
together. Keep in mind that no matter how efficiently each unit is running, if they
aren‘t properly integrated, it will affect the functionality of the software program.
 System testing: System testing is the first level in which the complete application is
tested as a whole. The goal at this level is to evaluate whether the system has
complied with all of the outlined requirements and to see that it meets Quality
Standards. System testing is undertaken by independent testers who haven‘t played a
role in developing the program. This testing is performed in an environment that
closely mirrors production. System Testing is very important because it verifies that
the application meets the technical, functional, and business requirements that were set
by the customer.
 Acceptance testing: The final level, Acceptance testing (or User Acceptance Testing),
is conducted to determine whether the system is ready for release. During the
Software development life cycle, requirements changes can sometimes be
misinterpreted in a fashion that does not meet the intended needs of the users. During
this final phase, the user will test the system to find out whether the application meets
their business‘ needs. Once this process has been completed and the software has
passed, the program will then be delivered to production.
When a program is more thoroughly tested, a greater number of bugs will be detected; this
ultimately results in higher quality software. Other type of testing is beta testing.

SUMMARY OF THIS CHAPTER


SOFTWARE DEVELOPMENT PROCESS: Nowadays, systems are so big and complex
that teams of architects, analysts, programmers, testers and users must work together to create
the millions of lines of written code that drive our enterprises. Hence software development
may be defined nowadays as a process of working to produce computer software, this

GBHS DSCHANG Page 141


READERS ARE LEADERS

software could be produced for a variety of purposes – the three most common purposes are:
1) to meet specific needs of a specific client/business; 2) to meet a perceived need of some set
of potential users (the ease with commercial and open source software); 3) for personal use,
for example, in homes. Software development is a far more complex process than computer
programming. Programming refers to the process of writing and maintaining the source code,
whereas software development includes all the research, design, modification, reuse, re-
engineering, maintenance, or other related activities that are associated with the production of
computer software.
1) Software Development Phases: Software development is the process of creating
software through successive phases in an orderly way. Its phases are; identification of
required software, analysis of the software requirements, software design, code
generation (or computer programming), testing, and maintenance.
2) Software Development Methodologies: it is a framework that is used to structure,
plan, and control the process of developing a software system. Some of the most
methodologies often used in the software development cycle are: waterfall, verification
and validation (V-model), prototyping, increment model, RAD. build-and-fix models
etc. etc.

CHAPTER 13: DATABASE


Introduction
Organizations work on vast amount of data and information on daily bases thus, there is need
for data and information to be organized logically. These data may not make meaning if not
organized into an appropriate structure. A database is application software for such a task and
is one of the core/main parts of most/all applications/software in use today.

Definition: A database is a structured collection of data in a computer system which allows


for arranging, modifying, and extracting information easily in different logical orders.
Data are raw facts that have no meaning. It needs treatment (processing) to become useful
(information) and some conclusions to become knowledgeable.

The structure of a Database


Data is stored in tables in a database as soon below. The name of this table can be called
students. Each student will then be registered using the different fields. A single database file
can have more than 100 tables with potential relationship tables which are like tables.

GBHS DSCHANG Page 142


READERS ARE LEADERS

Serial No Registration NoSurname FirstName Sex Class


1 123 Shey Ndim Female Lower sixths
2 456 Eliza Joy Female Lower sixths
3 789 Didier MC Male Upper sixths
4 012 Cecil Pride Female Upper sixths

The table above is made up of six fields (columns) i.e. serial number, registration number,
surname, firstname, sex and class and four records (rows)
Database terminologies
Within the database, the data are organized into storage containers called tables. Tables are
made up of columns and rows. In a table, columns represent individual fields and rows
represent records of data. The following are the basic database terms;

A table is the database object that contains the basic data or information to be stored about an
entity of the database. For example, the registration of students in a school form a database
called student table which is a database entity.
1. Entity: It is a single data item; persons, things, places or events (a table’s name).
2. A field or (attribute) represents one related column of a table and is the smallest
logical structure of storage in a database. It holds one piece of information about an
entity or a subject represented by the table. For example, in the above table we have
the following fields; registration no, surname, firstname, sex, and class.
3. A record or tuple is a collection of multiple related fields that can be treated as a unit
or a record is a row of the table for a database which contains a collection of attributes
related to an entity (such as student or a person) of the database. For example,
information from the field‘s registration no, surname, firstname, sex, and class for a
particular student form a record.
4. A query is the database tool that allows to retrieve information from one or more
tables based on a set of search conditions you define using the table fields. Queries are
covered in more details later.
5. Forms are an MS Access tool that users can create to make data entry in database
tables easier. Entering data directly into a table can be difficult if there is a lot of
information to enter. Like an Excel spreadsheet, an Access table is essentially a screen
filled with blank rows where a user enters records. Forms however, provide users with
an easy-to-read interface where they can enter table data.
6. Reports: A report is an effective tool that gives you way to analyze and present data
using a specific layout. The text can be formatted in an Access report, just like it can
be in Word documents.

NB: Typical data is logically organized as follows; characters, fields, records, files, folders
and database.
- Characters are the most basic logical data elements.
- File is a collection of related records. E.g. a table can be referred to as a file.

GBHS DSCHANG Page 143


READERS ARE LEADERS

Advantages of database
- There is less data inconsistency since each data item is stored in fewer locations.
- It enables querying and faster searches.
- Data is independent of application.
- It is easier to maintain the confidentiality of the information.

Disadvantages of database
- It requires trained personnel to design, implement, maintain and work on.
- A total system failure can have a severe negative impact on the establishment.

Database Applications
Databases are widely use because it forms an essential part of almost all
organizations/software‘s/enterprises today. Here are some representative applications:
Banking, Universities/schools, Business, Manufacturing, organizations, enterprises,
government, hospitals, Facebook, Google, Twitter, etc.

Computerized and non-computerized databases


A database is a tool that stores data, and lets you create, read, update, and delete the data in
some manner. The management of these data can be computerized or not.

 A computerized database is a database that stores and manages its data by the use of
application software called database management system (DBMS) in the computer.

 A non-computerized database is a set of files that are grouped in folders or envelops


and stored in drawers or filing cabinets. Both types of database have advantages and
disadvantages. An advantage for one is probably a disadvantage to the others.

Flat-file databases
A database file that consists of a single data table is called a flat-file database. Flat-file
databases are useful for certain single user or small group situations especially for maintaining
lists such as address list or inventories. Data that is stored, managed, and manipulated in a
spreadsheet is similar to a flat-file database.
A "flat file" is a plain text or mixed text and binary file which usually contain one record per
line or 'physical' record (example on disc or tape). Within such a record, the single fields can
be separated by delimiters, e.g. commas, or have a fixed length. Extra formatting may be
needed to avoid delimiter collision. There are no structural relationships between the records.

Disadvantages of flat file database


- Redundant data: that is repeated information in the table.
- Errors on input: typographical errors occur each time is entered.
- Problems with updating data,
- Problems with modifying data,
- Difficult to perform queries,

GBHS DSCHANG Page 144


READERS ARE LEADERS

- Cannot create a link between tables.

Data Type for database


A data type determines the type of data that can be stored in a column of field of a table in
the database. Although many data types are available, the followings are the most commonly
used data types:
Data type Description Size
Text Alphanumeric data, letters, Up to 255 characters
numbers, symbols and
specials characters
Memo Alphanumeric data, support Store up to 2G, display up to
rich-text formatting (bold, 65 535 characters
italic, bullets lists...)
Number Positive or negative values Up to 16 bytes of data
that can be used in arithmetic
calculations
Data/Time Date and time information 8 bytes
Currency Monetary values, not 8 bytes
rounding during calculation.
Auto number Automatically generate by Up to 16 bytes
the computer when a new
record is added
Yes/No Boolean values (true or false) 1 bit
data 1=true 0=false

Stages in creating a DB
- Conceptual stage (logical stage) deals with data analysis which involves using a
formalized methodology to create a database design. This stage mainly focuses on
what data are required and how it should be organized rather than on what operations
should performed on that data. Two widely used methods are Entity Relationship
Modeling which views the world as a set of basic objects known as entities, their
characteristics known as attributes and their associations among these objects known
as relationships and Normalization.
- Physical stage refers to the manner in which the data are physically stored on the
hardware (HD). Fundamentally, it involves the physical organization of the records of
a file for the convenience of storage and retrieval of data. Usually files are arranged in
three fashions; sequential (access a file one after the order in ascending or descending
order), direct (randomly) and indexed sequential (the combination of the latter two.
Also called ‗hybrid access‘).

Database models: A database model refers to the way in which a database is constructed.
These models are the different ways of organizing large databases so that redundancy is
limited and data is kept separate from the application that processes it. Data models include;

GBHS DSCHANG Page 145


READERS ARE LEADERS

flat file database, relational database, hierarchical database, object-oriented database, network
and multi-dimensional databases.

1- Entity Relationship Model (ER)


An entity relationship model is a diagrammatic representation of the relationship that exists
between entities in a database.
An entity is a ―thing‖ or ―object‖ in the real world that is distinguishable from all other
objects. For example, each person in an enterprise is an entity. An entity has a set of properties
called fields and the values for some set of properties may uniquely identify an entity.
A relationship is an association among several entities. For example, we can define a
relationship between the entity students to the entity class in a school database. A student
attends a class. Belong is the relationship between the two entities student and class.
The following are use in ER diagram:
– A rectangle represents an entity set.
– An ellipse represents an attribute.
– A diamond represents a relationship.
– Lines represent linking of attributes to entity sets and of entity sets to relationship sets.

Example

Let us consider a simple ER diagram as shown above.


In the ER diagram the two entities are STUDENT and CLASS. Two simple attributes which
are associated with the STUDENT are Roll number and the name. The attributes associated
with the entity CLASS are Subject Name and Hall Number. The relationship between the two
entities STUDENT and CLASS is Attends.
Exercise

GBHS DSCHANG Page 146


READERS ARE LEADERS

Observe the above ER diagram and answer the following questions.


1. How many entities are on the diagram?
2. What are the attributes of each entity?
3. What is the relationship between them?

2- Relational Model
The relational model is a lower-level model. It uses a collection of tables to represent both
data and the relationships among the data. Most database products are based on the relational
model. Designers often formulate database schema design by first modelling data at a high
level, using the E-R model, and then translating it into the relational model.
The software used in a relational database is called a relational database management
system (RDBMS). The relational model is based on the mathematical concept of a relation,
which is physically represented as a table.

Terminology

There are different set of terms used to designate the tables, the columns and rows of the
relational model. The following table summarized it.

Relational term relation Tuple attribute


Alternative 1 Table Row column

Alternative 2 File Record Field

A relation is a table with columns and rows


An attribute is a named column of a relation
A tuple is a row of a relation.

GBHS DSCHANG Page 147


READERS ARE LEADERS

Types of Relationship
Even though a relationship may involve more than two entities, the most commonly
encountered relationships are binary, involving exactly two entities. Generally, such binary
relationships are of three types and called cardinality: one-to-one, one-to-many and many-to-
many.
a) One-to-one Relationship (1:1)

One-to-one is where one occurrence of an entity relates to only one occurrence in another
entity, e.g. if a man only marries one woman and a woman only marries one man, it is a one-
to-one (1:1) relationship.

1 marries 1
Man Woman

b) One-to-many Relationship (1:M)


A one-to-many relationship is where one occurrence in an entity relates to many occurrences
in another entity. For instance one manager manages many employees, but each -employee
only has one manager, so it is a one-to many (1: M) relationship.

The crowbar represents the (M) many occurrences.

c) Many-to-many Relationship (M:M)


In many-to-many relationship, one record in a table can be related to one or more records in a
second table, and one or more records in the second table can be related to one or more
records in the first table. For example, one teacher teaches many students and a student is
taught by many teachers.

3- Other types of database models


Hierarchical database model: Uses nodes to link and structure fields and records. Entries
may have one node with several child nodes in a one-to-many relationship.

Object-Oriented Database (OOD): Data is organized using objects classes, entities,


attributes and methods.

GBHS DSCHANG Page 148


READERS ARE LEADERS

Network Database: This is similar to hierarchical except that a child node may have more
than one parent in a many-to- many relationship.

Multidimensional Database: Extend two dimensional relational tables to three or more


dimensions (hyper cube)

The description of the database includes the table structures and the rules that will be
followed. The description is called a scheme. The schemas are stored in a data structure called
the data dictionary.

Data dictionary is a collection of descriptive information about data and objects in a


database. It contains a list of all tables in the database, the number of records in each table, and
the names and types of each field.

Keys: It is a data item that allows us to uniquely identify individual occurrence of an entity
type. Information is quickly retrieved from a database by choosing one or more fields
(attributes) to act like keys. E.g. an IP address uniquely identifies a PC on the Internet.
Types of keys;
- Primary Key: It is a field or a collection of fields in a table (entity) whose value can
be used to distinguish one record from another. This implies that no two records can
have the same value for the primary key and a primary key is mandatory.
NOTE: a primary key is always distinguish from the other key by asterisk (*) on it or is
underlined in a ER model and in a relational model.
- Foreign Key: A foreign key is a column or group of columns in a relational database
table that provides link between data in two tables. It acts as a cross-reference between
tables because it references the primary key of another table thereby establishing a link
between them.
- Candidate key: In a table, there can be more than one field that uniquely identifies
each record. All such fields are known as candidate keys. One of these candidate keys
is chosen as the primary key and the other keys that are not chosen as primary key are
known as secondary keys or alternate keys.
- Composite key: A composite key consist of more than attribute to uniquely identify
am entity occurrence.

Database Management Systems (DBMS)


A DBMS is software that is used to create, modify, and extract information from a database.
The main idea with a DBMS is that all the data is kept centrally and only authorized users can
have access to data through the DBMS. A DBMS is a general-purpose software i.e. not
application specific. A DBMS consists of:
– A part for collection of interrelated and persistent data. This part of DBMS is referred to as
database (DB).
– A set of application programs used to access, update, and managing data. This part
constitutes the management system (MS).

GBHS DSCHANG Page 149


READERS ARE LEADERS

Features of a DBMS are as follows; queries write to query a database using a query language
like the Structured Query Language (SQL), forms, reports, models define rules and standards
for all data in the database and data mining has to do with using software to search through
data from many sources looking for connections.

The main objectives of DBMS are:


Control of data redundancy: the database approach attempts to eliminate the redundancy by
integrating the files so that multiple copies of the same data are not stored.

Data consistency: If a data item is stored only once in the database, any update to its value
has to be performed only once and the new value is available immediately to all users.

Improved data integrity: Database integrity refers to the validity and consistency of stored
data. Integrity is usually expressed in terms of constraints, which are consistency rules that the
database is not permitted to violate. Constraints may apply to data items within a single record
or they may apply to relationships between records.

Improved security: Database security is the protection of the database from unauthorized
users. The access that an authorized user is allowed on the data may be restricted by the
operation type (retrieval, insert, update, delete).

Increased concurrency: In some file-based systems, if two or more users are allowed to
access the same file simultaneously, it is possible that the accesses will interfere with each
other, resulting in loss of information or even loss of integrity. Many DBMSs manage
concurrent data-base access and ensure such problems cannot occur.
Improved backup and recovery services: modern DBMSs provide facilities to minimize the
amount of processing that is lost following a failure.

Examples of DBMS are: Oracle, Postgres SQL, Sybase, MySQL, Microsoft Access, SQL,
DB2, Open Office Base, Microsoft SQL server, etc.

Data Integrity: Integrity ensures that data in a database is both accurate and complete, in
other words, that the data makes sense. There are at least five different integrity that need to be
considered; domain constraints, entity integrity, column constraints, user-defined integrity
constraints, and referential constraints which implies that if a foreign key is defined in one
table, any of its value must exist as a primary key in another table.

Transforming the ER model to Relational model


To implement the database, it is necessary to use the relational model. There is a simple way
of mapping from ER model to the relational model. There is almost one-to-one
correspondence between ER constructs and the relational ones.
Here,
– Entity name = Name of the relation or table.
– Attributes of ER diagram = Column name of the table.

GBHS DSCHANG Page 150


READERS ARE LEADERS

Example: The ER model to a Relational model


Here we have two entities CUSTOMER and ORDER. The relationship between
CUSTOMER and ORDER is one-to-many and the relationship is Submit.

The tables can then be represented in the relational model as:


Customer (Customer-ID, Customer-name, Customer-Address)
Order (Order-ID, Order-Date)

And can be read in a relational way as;


CUSTOMERSubmitsORDER(Order-ID, Order-Date, Customer ID, Customer-name,
Customer-Address)

In the relation above, the primary key CUSTOMER ID in the CUSTOMER relation becomes
a foreign key in the ORDER relation.

NORMALIZATION
Database normalization, or simply normalization, is the process of organizing columns
(attributes) and tables (relations) of a relational database to minimize data redundancy or
better still it is the process of splitting data across multiple tables to improve overall
performance, integrity and longevity.
This includes creating tables and establishing relationships between those tables according to
rules designed both to protect the data and to make the database more flexible by eliminating
redundancy and inconsistent dependency.

The initial idea of normalization was first proposed by E. F. Codd1 over 30 years ago and has
been a cornerstone of relational database design since then.
Normalization helps to determine whether our tables are structured in such a way as to avoid
the update anomalies, insertion and deletion problems. To better normalized relations, the
notion of functional dependency is used.
A functional dependency is a statement that essentially says ―If I know the value for this
attribute(s), I can uniquely tell you the value of some other attribute(s).‖

First Normal Form (1NF)


A table is in first normal form (1NF) if and only if all columns contain only atomic values,
that is, each column can have only one value for each row in the table.
Or First Normal Form (1NF): A relation in which the intersection of each row and column
contains one and only one value.
Example:
Suppose a designer wishes to record the names and telephone numbers of customers. He
defines a customer table which looks like this:

GBHS DSCHANG Page 151


READERS ARE LEADERS

Customer
Customer ID First Name Surname Telephone Number
123 Robert Ingram 555-861-2025
456 Jane Wright 555-403-1659, 555-776-
4100
789 Maria Fernandez 555-808-9633

A design that is unambiguously in first normal form makes use of two tables: a Customer
Name table and a Customer Telephone Number table.

Customer Telephone Number


Customer Name
Customer ID Telephone
Customer ID First Name Surname
Number
123 Robert Ingram
123 555-861-2025
456 Jane Wright
456 555-403-1659
789 Maria Fernandez
456 555-776-4100
789 555-808-9633

Second Normal Form (2NF)


Second Normal Form (2NF): A relation is said to be in 2NF if it is in First Normal Form and
every non-primary-key attribute is fully functionally dependent on the primary key.
Example: Consider a table describing employees' skills:
Employees' Skills
Employee Skill Current Work Location
Jones Typing 114 Main Street
Jones Shorthand 114 Main Street
Jones Whittling 114 Main Street
Bravo Light Cleaning 73 Industrial Way
Ellis Alchemy 73 Industrial Way
Ellis Flying 73 Industrial Way
Harrison Light Cleaning 73 Industrial Way

Third Normal Form (3NF)


Third Normal Form (3NF): A relation is said to be in 3NF if it is in First and Second Normal
Form and in which no non-primary-key attribute is transitively dependent on the primary key.
In other words, any non-primary key attributes depends only on the keys.
An example of a 2NF table that fails to meet the requirements of 3NF is:

Tournament Winners

Tournament Year Winner Winner Date of


Birth

GBHS DSCHANG Page 152


READERS ARE LEADERS

Indiana Invitational 1998 Al Fredrickson 21 July 1975

Cleveland Open 1999 Bob Albertson 28 September 1968

Des Moines Masters 1999 Al Fredrickson 21 July 1975

Indiana Invitational 1999 Chip Masterson 14 March 1977

The breach of 3NF occurs because the non-prime attribute Winner Date of Birth is transitively
dependent on the candidate key {Tournament, Year} via the non-prime attribute Winner. The
fact that Winner Date of Birth is functionally dependent on Winner makes the table
vulnerable to logical inconsistencies, as there is nothing to stop the same person from being
shown with different dates of birth on different records.

In order to express the same facts without violating 3NF, it is necessary to split the table into

Tournament Winners

Tournament Year Winner

Indiana Invitational 1998 Al


Fredrickson

Cleveland Open 1999 Bob Albertson

Des Moines Masters 1999 Al


Fredrickson

Indiana Invitational 1999 Chip


Masterson

Player Dates of Birth

Player Date of Birth

Chip Masterson 14 March 1977

Al Fredrickson 21 July 1975

Bob Albertson 28 September


1968

Update anomalies cannot occur in these tables, which are both in 3NF.

GBHS DSCHANG Page 153


READERS ARE LEADERS

DATABASE LANGUAGES
A particular language that has emerged from the development of the relational model is the
Structured Query Language (SQL). Over the last few years, SQL has become the standard
relational database language. It is made up of two parts DDL and DML.

Objectives of SQL
Ideally, a database language should allow a user to:
 Create the database and relational structures,
 Perform basic data management tasks, such as the insertion, modification, and deletion
of data from the relations,
 Perform both simple and complex queries.

Data-Definition Language
We specify a database schema by a set of definitions expressed by a special language called a
Data-Definition Language (DDL). DDL defines the database structure and controls access to
the data.
For instance, the following statements in the SQL language define the account table and are
mostly use by a Database Administrator (DBA) or Database Developers (DBD):
CREATE DATABASE and/or TABLE: to create a database and/or a table.
ALTER TABLE: to modify the structure of a table.
DROP DATABASE and/or TABLE: to delete a database and/or a table.
(All instructions end with a semi-colon ‗;‘).
A data dictionary is a special-purpose system whose function is to describe the content
of the database and of application programs within information systems. A data dictionary
can be seen as a repository of the metadata (data about data or data that describes data) in an
organization.

Data-Manipulation Language: A data-manipulation language (DML) is a language that


enables users to access or manipulate data as organized by the appropriate data model. Its
functions are:
 The selection or retrieval of information stored in or from a table:
 The insertion of new information into a table:
 The deletion of information from a table:
 The updating or modification of information stored in a table:
(All fields end with a comma ‗,‘)
A query is a statement requesting the retrieval of information. The portion of a DML that
involves information retrieval is called a query language.

Example:
This query in the SQL language finds the name of the customer whose customer-id is 456:
select [Link]-name;
from customer;
where [Link]-id = 456;

GBHS DSCHANG Page 154


READERS ARE LEADERS

The query specifies that those rows from the table customer where the customer-id is 456
must be retrieved, and the customer-name attribute of these rows must be displayed.
Queries may involve information from more than one table. For instance, the following query
finds the balance of all accounts owned by the customer with customer-id 192-83-7465.
select [Link];
from depositor, account;
where [Link]-id = 192-83-7465 and;
[Link]-number = [Link]-number;

EXERCISES TO BE DONE DURING LECTURES


A database of students is to be set up with the following fields:
FamilyName, OtherName, StudentID, DateOfBirth, DateOfEntry, CurrentClass,
CurrentSchoolYear, EmailAddress.
- Select a data type for each field.
- Which fields should be validated and which fields should be verified?
- Decide the validation rules for those fields which should be validated.
- Which field is best for the primary key?
- Choose a suitable format for the StudentID.
- Build a database with at least 10 records. Include all your validation checks.
- Run a query to print OtherNames, FamilyName, and EmailAddress in alphabetical
order of family name.
- Run a query to select all the students of class four with their StudentID.

OTHER EXERCISES TO BE DONE FROM THE MANUAL

Chapter 14: NUMBER THEORY & DATA REPRESENTATION


1. Number Systems
A number system is a set of symbols and rules used to represent numbers and quantities in a
certain base or radix. The number of different symbols used in a given number system is
known as the base or radix of the system. The largest value of a symbol (digit) in a given
number system is always less than the base or radix of that system by one. If the base of a
system is represented by , then the largest value a digit in that system can assume is
.
Examples of number systems used by the computer include the binary, octal, decimal
(denary) and hexadecimal systems.
The base of a number system is indicated by a subscript (decimal number) and this will be
followed by the value of the number. The following are few examples:
 (25)10 is of base 10 number system.
 (31)8 is of base 8 number system.

GBHS DSCHANG Page 155


READERS ARE LEADERS

 (19)16 is of base 16 number system.


 (11001)2 is a base 2 number system.

a. The Decimal System


The decimal system has a base value of . Its maximum or largest value of digit is
, meaning thatthe decimal system uses the digits and
to represent any quantity.
For any -digit number, the value each digit represents depends on its position in the number.
Decimal positions (place values) are powers of ten as shown below:
Least Significant Digit
Most Significant Digit
(LSD)
(MSD) …

Decimal positions for an -digit number

Where, is the ones place


is the ten‘s place
is the hundreds place

The value of any digit in a given -digit number is obtained by multiplying the digit by its
place value. The value of the number is the sum of the products of the digits and their place
values. That is, we multiply each digit by its place value, then we add the different products
obtained.

GBHS DSCHANG Page 156


READERS ARE LEADERS

Example: . This means that there are two hundreds,


three tens and four ones in the number .

NB: Each digit position in decimal has a weight that is ten times the one to its immediate
right. That is, is ten times greater than which is ten times greater than
b. The Binary System
The binary system has a base value of 2. Only two digits 0 and 1 are used to represent any
quantity in binary. These digits are called binary digits or more commonly bits. To express
any quantity in binary we use powers much like in the decimal system but this time, the
weights are powers of 2 as shown below.
Least Significant Bit
Most Significant Bit
(LSB)
(MSB) …

Binary positions for an -bit number

E.g. the binary number is expressed as


This means that there are 1 one, 0 two, 1 four, and 1 eight in the number .

c. The Octal System


The octal system has a base value of 8. It uses the digits 0-7 to represent any quantity.
Weights in octal are powers of eight as shown below.
Least Significant Digit
Most Significant Digit
(LSD)
(MSD) …
Octal positions for an -digit number

Where is the one‘s place


is the eights place
is the sixty fours place

Example: (This means that there are 3 sixty fours, 6


eight‘s and 7 one‘s in )

d. Hexadecimal System
The prefix ―hex‖ means 6 and ―deci‖ means 10. The hexadecimal number system is thus a
base-16 number system. Each digit position represents a power of 16. The digits used in this
system are 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F, where
.

GBHS DSCHANG Page 157


READERS ARE LEADERS

Binary Arithmetic
a. Addition
Rules for addition:
0+0=0
0+1=1
1+0=1
 1 + 1 = 0. Carry 1 to the next more significant bit. (Actually it is 210 then converts to binary
its 102 so zero (0) and carry one (1))
Examples
i. ………………………………….
ii. ………………………….
iii. …………………………..

b. Multiplication: The multiplication process for binary numbers is similar to that


for decimal numbers. Partial products are formed, with each product shifted
one place to the left. This is illustrated below.
Rules for multiplication:
0x0=0
0x1=0
1x0=0
1x1=1
Examples
a) 111 x 101 b) 101001 x 110
111 101001
* 101 * 110
111 000000
0000 101001
+11100 + 101001
100011 11110110

c. Subtraction
Rules for subtraction:
0‐0=0
0‐1=1

GBHS DSCHANG Page 158


READERS ARE LEADERS

NOTE: This as we know is not possible, so a 1 worth 2 is borrowed (since we are working in
base 2) from the next more significant bit (MSB) bit on the left to perform the operation. If
the next MSB is a 0, then a 1 worth 2 is borrowed from the other MSB towards the left.

When a 1 worth 2 is borrowed from a MSB from the left, the MSB becomes 0 and the bit on
the right which is a LSB becomes 2.
1‐0=1
1‐1=0
Examples
a) 00100101 ‐ 00010001 = 00010100
c) 00110011 ‐ 00010110 = 00011101
1 borrows
00100101 = (37)10 11 borrows
‐ 00010001 = (17)10 00110011 = (51)10
‐ 00010110 = (22)10
00010100 = (20)10
00011101 = (29)10

d. Division: Binary division follows a similar process to that of decimal division.


Example: Divide (a) (15)10by (5)10 in binary form, and (b) (15)10 by (6)10 in binary form.

Conversion From One Base to Another


We have discussed earlier that internally the computer uses binary numbers for data
representation whereas externally it uses decimal numbers. However, any number in one
number system can be represented in any other number system. Conversion between number
systems can be classified into three types: Coding, decoding and encoding.
- Coding: Coding is the conversion from decimal base (base 10) to any non-decimal base
b (b ≠ 10).
- Decoding: To decode is convert from a non-decimal base b (b ≠ 10) to the decimal base
(base 10).
- Encoding: Encoding is the conversion from a non-decimal base to a non-decimal base.
Some special cases would be distinguished.
1.2.1. Binary/Decimal Conversion

GBHS DSCHANG Page 159


READERS ARE LEADERS
a. Binary to Decimal

To convert a binary number to decimal, we proceed as follows:


Step 1: starting with the 1s place (LSB), write the binary place value over each digit in the
binary number to be converted.
Step 2: add up all the place values that have a ‗1‘ in them.

Examples
1) Convert 110102 to base 10
1 1 0 1 0  1*24 + 1*23 + 0*22 + 1*21 + 0*20 = 16 + 8 + 0 + 2 + 0 = 2610
4 3 2 1 0

Exercise: Convert the following; (15), (19), (21) to base 10.

Binary with a decimal number


Examples
2) Convert to base

⁄ ⁄

1101.0112 = 13.37510

Exercise: Convert and to base

a. Decimal to Binary
There are two methods that can be used to convert decimal numbers to binary:
- Repeated division method.
- Repeated subtraction method.
 Repeated Division Method
The general technique of this method can be used to convert any decimal number to any other
number system.
Step 1: divide the decimal number you want to convert by 2 in regular long division until
you obtain a final remainder
Step 2: use the remainder as the least significant bit of the binary number
Step 3: divide the quotient you got from the first division operation by 2 until you obtain a
final remainder
Step 4: use the remainder as the next digit of the binary number
Step 5: repeat steps 3 and 4 as many times as necessary until you get a quotient that
cannot be divided by 2
Step 6: use the last remainder (that cannot be divided by 2) as the most significant bit of
the binary number.

GBHS DSCHANG Page 160


READERS ARE LEADERS
Example: to base
o remainder 1 LSB
o remainder 0
o remainder 1
o remainder 0
o remainder 1
o remainder 0
o remainder 1
o remainder 1 MSB. Therefore, 21310 = 110101012

Converting Decimals with fractions to Binary


To convert a decimal number with a fraction (point) to base 2, convert the whole part as
before i.e. dividing by 2 until there is nothing left to divide then multiply successively the
decimal part (fractional part) by 2 keeping the whole part as the number in base 2 until the
decimal number is a whole number with a (point zero, .0). The whole part kept as the
number in base 2 is the answer. The answer is read from top to down.
E.g.: (15.375)10.
The whole part is (15)10 = (1111)2.

The fractional part is (0.375)10 which are converted as follows:


0.375*2= 0.75 0↓
0.75*2=1.5 1
0.5*2=1.0 1
Since the reminder is zero we stop.
The underlined whole numbers is the answer.
Therefore (0.375)10 = (0.011)2 and so (15.375)10 = (1111.011)2

Example: Convert to binary


First convert the whole part i.e. ,

Exercise: Convert: to decimal.

Binary/Octal Conversion
a. Binary to Octal
Step1: make groups of three bits starting from the least significant bit and move towards the
most significant bit.
Step 2: replace each group of bits by its octal representation from the Truth Table (TT)
Step 3: if the last group of MSB is not 3-bits, add zeros in front to make 3-bits.

GBHS DSCHANG Page 161


READERS ARE LEADERS
A B C Octal equivalent
0 0 0 0
0 0 1 1
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7
Binary to Octal Truth Table
Example: Convert to base 8

Example: Convert to base 8

b. Octal to Binary
To convert from octal to binary, we carry out the inverse operation of binary to octal. That is,
we replace every octal digit by its 3-bits binary equivalent.
Example: Convert to binary
From the TT above,

Example: Convert to binary

Binary/Hexadecimal Conversion
a. Binary to Hexadecimal
Step1: make groups of four bits starting from the least significant bit and move towards the
most significant bit.
Step 2: replace each group of bits by its hexadecimal value representation from the Truth
Table (TT).
Step 3: if the last group of MSB is not 4-bits, add zeros in front to make 4-bits.

GBHS DSCHANG Page 162


READERS ARE LEADERS
A B C D Hexadecimal equivalent
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
1 0 1 0 A
1 0 1 1 B
1 1 0 0 C
1 1 0 1 D
1 1 1 0 E
1 1 1 1 F
Binary to Hexadecimal Truth Table

Example: Convert to base 16

Example: Convert to base 16

b. Octal or Hexadecimal to Binary


To convert from octal or hexadecimal to binary, we carry out the inverse operation of binary
to octal or hexadecimal. That is, we replace every octal or hexadecimal digit by its 3-bits or
4-bits binary equivalent respectively.
Example
Convert 4508 to binary
48 = 1002, 58 = 1012, 08 = 0002
⸫ 4508 = 1001010002
Convert to binary

Data Representation
Computers use binary patterns (fixed number of bits) to represent data, which could be
numbers, letters, videos, images or other symbols. It is important to decide on how these

GBHS DSCHANG Page 163


READERS ARE LEADERS
patterns will be interpreted. The interpretation of binary patterns is called data representation
or encoding. Different data representation schemes exist.

Unsigned Integers
Unsigned integers can represent zero and all positive integers. The value of an unsigned
integer is interpreted as ―the magnitude of its underlying binary pattern‖. That is, for an
unsigned integer, all the bits in the binary pattern are used to represent the magnitude of the
integer. In binary, an n-bit pattern can represent integers from 0 to .
For example:
- A 4-bit pattern will represent the integers to
- An 8-bit pattern will represent the integers to
- An 16-bit pattern will represent the integers 0 to (216) – 65.535

How many integers will a 32-bit pattern represent?

When computers perform an unsigned integer arithmetic operation, there are three problems
that occur:
- If the result is too large to fit to the number bits assigned to it, an ―overflow‖ is said to
occur, e.g. if the result of an operation using 16-bit integers is larger than 65.535 (216),
an over flow results.

An example of overflow; consider adding (80 + 80 = 160)10, which produces a result of -9610
in 8-bit two's complement:
01010000 = 80
+ 01010000 = 80
10100000 = -96 (not 160 because the sign bit is 1.)
(largest +ve number in 8 bits is 127). In general, overflow occurs when adding
two positive numbers produces a negative result, or when adding two negative numbers
produces a positive result. Adding operands of unlike signs never produces an overflow.
- In the division of two integers, if the result is not itself an integer, a ―truncation‖ is
said to have occurred e.g. 10 divided by 3 is truncated to 3, and the extra 1/3 is lost.
- Any division by zero is an error, since it is not possible in the context.

Signed Integers
Signed integers can represent zero, positive integers, as well as negative integers but are
always written with a negative sign in front to distinguish them from unsigned integers. Four
representation schemes are available for signed integers:
1. Sign-Magnitude representation.
2. 1's Complement representation.
3. 2's Complement representation.
4. Biased representation (Excess- ).
The following are important observations about signed integer arithmetic:
- If a signed integer has n-bits, it can contain a number between -2n-1 and + (2n-1-1). E.g.
111011 has 7-bits and will be -27-1 = -26 = -64 and 27-1-1 = 26-1 = 64-1 = 63 thus the
integer can contain between (-64, 63).

GBHS DSCHANG Page 164


READERS ARE LEADERS
- No matter what the length may be, if a signed integer has a binary value of all 1s, it is
equal to decimal negative one (-1).

a. Sign Magnitude Representation


In sign-magnitude representation, the most significant bit is the sign bit with 0 for positive
and 1 for negative. The remaining bits represent the absolute value of the integer
which is interpreted as "the magnitude of the ( )-bit pattern".
Example: Suppose and the binary representation .
Sign bit is 0 number is positive
Absolute value is
Hence, the integer is .

Example: Suppose and the binary representation .


Sign bit is 1 number is negative
Absolute value is
Hence, the integer is

Example: What is the sign and magnitude of the binary representation 10001100
Sign bit is 1 implies negative
Magnitude or absolute value is 0001100 is 12
Hence, the integer is -12
Example: What is the binary equivalent of the numbers 4510 and 10
Solutions:
 4510 is a positive number  sign bit is 0
4510 to base 2  1011012 = 01011012
Therefore 4510 = 001011012
 10 is a negative number  sign bit is 1

10 to base 2  10012 = 00010012


Therefore 10 = 100010012

The drawbacks of sign-magnitude representation are:


- There are two representations (0000 0000 and 1000 0000) for the number zero, which
could lead to inefficiency and confusion i.e. (+0) and (-0) as respective integers.
- Arithmetic is cumbersome making the design of electronic circuits for this scheme
difficult.

b. 1’s Complement Representation


In 1's complement representation the most significant bit is still the sign bit (0 for positive
and 1 for negative). The remaining bits represent the magnitude of the integer as
follows:
o For positive integers, the absolute value of the integer is equal to "the magnitude of
the ( )-bit pattern".
o For negative integers, the absolute value of the integer is equal to "the magnitude of
the complement (inverse) of the ( )-bit pattern".

GBHS DSCHANG Page 165


READERS ARE LEADERS
Example: Using 1‘s complement, represent the following base 10 numbers using 8-bits.
i) = 0011010
Number is positive sign bit is 0
2
ii)
Number is negative sign bit is 1
=0011001
Complement of is
2
Example: Give the decimal equivalent of the following 1‘s complement binary
representations.
i) .
Sign bit is 0 positive
Absolute value is
Hence, the integer is

ii)
Sign bit is 1 negative
Absolute value is the complement of , i.e.,
Hence, the integer is

Disadvantage
The problem with this representation is that there are still two representations for zero (0000
0000 and 1111 1111).

c. 2’s Complement Representation


In 2's complement representation, the remaining bits represent the magnitude of the
integer as follows:
o For positive integers, the absolute value of the integer is equal to "the magnitude of
the ( )-bit pattern".
o For negative integers, the absolute value of the integer is equal to "the magnitude of
the complement of the ( )-bit pattern plus one". That is, we just add one to 1‘s
complemented to get 2‘s complement.

An alternative and simple way of getting 2‘s complement is


o To write the representation of the positive number
o Starting from the least significant bit, flip all the bits to the left of the first 1.

Example: Using 2‘s complement, store the following base 10 numbers using 8-bits.
i)
Number is negative sign bit is 1

1‘s complement of 24 is
2‘s complement of 24 is

GBHS DSCHANG Page 166


READERS ARE LEADERS
is represented by 2
ii)
Number is negative sign bit is 1

1‘s complement of 13 is
2‘s complement of 13 is
is represented by

Example: Give the decimal equivalent of the following 2‘s complement binary
representations.
i)
Sign bit is 0 positive
Absolute value is
Hence, the integer is
ii)
Sign bit is negative
Absolute value is the complement of plus 1, i.e.
Hence, the integer is (

Modern computers use 2's complement in representing signed integers. This is because:
1. There is only one representation for the number zero unlike in sign-magnitude and 1's
complement representations.
2. Positive and negative integers can be treated together in addition and subtraction.
Subtraction can be carried out using the "addition logic".

Binary Arithmetic for Signed Integers


a. Addition in 1’s Complement
o Add binary representations of the two numbers
o If there is a carry (referred to as end-round carry), add it to the result.

b. Subtraction in 1’s complement


Subtraction is implemented using addition as follows:
o Determine the 1‘s complement of the negative number
o Add the binary representations of the two numbers
o If there is any carry, add it to the result

Example: subtract -37 from 51 in binary using 8-bits


in 1‘s complement
(51)
(-37) +

+
(14)

GBHS DSCHANG Page 167


READERS ARE LEADERS
c. Addition in 2’s Complement
Addition is implemented as follows:
o Add binary representations of the two numbers
o If there is a carry, ignore it

d. Subtraction in 2’s Complement


Subtraction is implemented as follows:
o Determine the 2‘s complement for the negative number
o Add the binary representations of the two numbers
o If there is any carry, ignore it.

Example: subtract 37 from 51


(1‘s Compl) (2‘s Compl)
(51) 00110011
(-37) + 11011011
(14) 1 00001110 discard end-round carry  00001110

Binary Coded Scheme


The alphabetic data, numeric data, alphanumeric data, symbols, sound data and video data, all
are represented as combination of bits in the computer. A code is made by combining bits of
definite size. Binary Coding schemes represent the data such as alphabets, digits 0-9, and
symbols in a standard code. A combination of bits represents a unique symbol in the data.
The standard code enables any programmer to use the same combination of bits to represent a
symbol in the data.
The binary coding schemes that are most commonly used are;
 Binary Coded Decimal (BCD)
 American Standard Code for Information Interchange (ASCII)
 Extended Binary-coded Decimal Interchange Code (EBCDIC)
 Unicode

Binary Coded Decimal (BCD)


BCD is a method of using binary digits to represent the decimal digits 0–9. A decimal digit is
represented by four binary digits. The BCD coding is the binary equivalent of the decimal
digit. BCD system was developed by the IBM (International Business Machines) corporation.
In this system, each digit of a number is converted into its binary equivalent rather than
converting the entire decimal number to its binary form. Similarly, letters and special
characters can be coded in the binary form.
Let us determine the BCD value for the decimal number 5319. Since there are four digits in
the decimal number, there are four bytes in the BCD number. They are:

GBHS DSCHANG Page 168


READERS ARE LEADERS

Binary code decimal digits (0–9) are represented by using four bits. The valid combinations
of bits and their respective values are shown in the table below.

Binary Coded Decimal

To represent the signs + and -, any of the remaining 4 bits patterns can be used. One
convention uses 1010 for (+) and 1011 for (-). You can see that in one byte we can have
either 2 digits or a sign and one digit. Here we must use the full 4-bits representation of any
digit (including the leading 0s). Thus the BCD representation of 5319 is 0101001100011001
and not 101001100011001

Representing characters
In a coding system, every symbol can be represented by a combination of bits that is different
from any other combination. The most popular coding system is the commonly referred to as
ASCII. The second most popular coding system nowadays is UNICODE. Other fairly
common systems include EBCDIC and BCD. These coding systems have codes for both
numbers and characters

Extended Binary-coded Decimal Interchange Code (EBCDIC)


Once upon a time IBM invented EBCDIC. EBCDIC is an acronym for Extended Binary
Coded Decimal Interchange Code. It is a single byte (8 bit) character encoding standard that
is used in the IBM mainframe environment. IBM didn't invent just one version of EBCDIC
either but several different incompatible versions. The computing friendly and user friendly
thing would have been to use the already in existence ASCII standard.
 The Extended Binary Coded Decimal Interchange Code(EBCDIC) uses 8 bits (4 bits
for zone, 4 bits for digit) to represent a symbol in the data.
 EBCDIC allows 28= 256 combinations of bits.
 256 unique symbols are represented using EBCDIC code. It represents decimal numbers (0-
9), lower case letters (a-z), uppercase letters (A-Z), Special characters, and Control characters
(printable and non-printable e.g. for cursor movement, printer vertical spacing etc.).
 EBCDIC codes are used, mainly, in the mainframe computers.

American Standard Code for Information Interchange (ASCII)


The name ASCII is an acronym for: American Standard Code for Information Interchange.
It is a character encoding standard developed several decades ago to provide a standard way
for digital machines to encode characters. ASCII codes are of two types: ASCII-7 & ASCII-
8.

GBHS DSCHANG Page 169


READERS ARE LEADERS
 ASCII-7is a 7-bit standard ASCII code. In ASCII-7, the first 3 bits are the zone bits and
the next 4 bits are for the digits. ASCII-7 allows 27 = 128 combinations. 128 unique symbols
are represented using ASCII-7.
 ASCII-8is an extended version of ASCII-7. It is an 8-bit code having 4 bits for zone and 4
bits for the digit. ASCII-8 allows 28 = 256 combinations. ASCII is used widely to represent
data in computers.
 The ASCII-8 code represents 256 symbols.
o Codes 0 to 31 represent control characters (non-printable), because they are used for
actions like, Carriage return (CR), Bell (BEL) etc.
o Codes 48 to 57 stand for numeric 0-9.
o Codes 65 to 90 stand for uppercase letters A-Z.
o Codes 97 to 122 stand for lowercase letters a-z.
o Codes 128-255 are the extended ASCII codes.

Unicode
Unicode is a universal character encoding standard for the representation of text which
includes letters, numbers and symbols in multi-lingual environments. It uses 32 bits (232 =
4164895296 combinations) to represent a symbol in the data. Unicode codes can uniquely
represent any character or symbol present in any language like Chinese, Japanese, included
mathematical and scientific symbols are also represented in Unicode codes. An advantage of
Unicode is that it is compatible with the ASCII-8 codes. The first 256 codes in Unicode are
identical to the ASCII-8 codes.

BCD ASCII EBCDIC


4-bits 7-bits 8-bits
0000 0 1000001 A 11000001 A
0001 1 1000010 B 11000010 B
0010 2 1000011 C 11000011 C
0011 3 1000100 D 11000100 D
0100 4 1000101 E 11000101 E
0101 5 1000110 F 11000110 F
0110 6 1000111 G 11000111 G
0111 7 1001000 H 11001000 H
1000 8 1001001 I 11001001 I
1001 9 1001010 J 11001010 J
1010 10 1001011 K 11001011 K
1011 11 1001100 L 11001100 L
1100 12 1001101 M 11001101 M
1101 13 1001110 N 11001110 N

GBHS DSCHANG Page 170


READERS ARE LEADERS
CHAPTER 15: ALGORITHMS & PROGRAMMING LANGAUGES

A. ALGORITHMS
Introduction
Algorithmic thinking enables you to come up with a set of rules that tell you what to do at
each step without thinking when solving a problem. Such a set of rules computer scientists
call an ALGORITHM. Algorithmic thinking is core key when learning to write computer
programs.

Computational thinking refers to a collection of diverse skills that have to do with problem
solving that result from studying the nature of computation. It includes important skills such
as creativity, ability to explain and team work including some very specific problem solving
skills as the ability to think logically, algorithmically and recursively..

Logical thinking is about deducing as much new information as possible from the little you
already have but not jumping to conclusions.

PROBLEM SOLVING STEPS


Steps you may use to solve a problem
1. Define the problem. 2. Design a strategy (plan) to solve the problem
3. Follow your plan to solve the problem. 4. Evaluate the efficiency of the solution.
5. Return to number 2.

ALGORITHM STRATEGIES
An algorithm strategy is a general approach to solve problems algorithmically. Although
more than one technique may be applicable to a specific problem, it is often the case that an
algorithm constructed by one approach is clearly superior to equivalent solutions built using
alternative techniques.

Examples of strategies
Brute force is a straightforward approach to solve a problem based on the problem‘s
statement and definitions of the concepts involved. It is considered as one of the easiest
approach to apply and is useful for solving small – size instances of a problem.

Greedy Algorithms "take what you can get now" strategy

Divide-and-Conquer, Decrease and conquer: Also known as stepwise refinement, these


are methods of designing algorithms that (informally) proceed as follows: Given an instance
of the problem to be solved, split this into several smaller sub-instances (of the same
problem), independently solve each of the sub-instances and then combine the sub-instance
solutions so as to yield a solution for the original instance.
Transform-and-Conquer: These methods work as two-stage procedures. First, the problem
is modified to be more amenable to solution. In the second stage the
problem is solved. Example: consider the problem of finding the two closest numbers
in an array of numbers.

GBHS DSCHANG Page 171


READERS ARE LEADERS
Algorithm design approaches: different approaches are used to build an algorithm;
1. Top-Down Design: the goal of the top-down design is to divide a given problem into
sub-problems. A sub-problem in turn can be thought of as simply another problem
and so it can be divided into sub-problems which would be easier to solve than the
original problem. The division of the problem starts at the top level down that is why
the process is called top-down design.
2. Bottom-up design: As you might guess, with this approach the details come first.
It is the opposite of the top-down approach. In a Bottom-Up Technique, the
smallest sub-instances are explicitly solved first and the results of these used to
construct solutions to progressively larger sub-instances.
EFFECTIVENESS OF A SOLUTION
There are many different solutions to the same problem so in order to consider the
effectiveness of a given solution, the following questions may be asked;
 Does the solution work for all sets of data?
 Does the solution have any unnecessary processes that are never used?
 Are any actions repeated more often than necessary?
 Can the solution be simplified and still work as well?

Algorithm design and Presentation


Definition: An Algorithm is an ordered sequence of unambiguous and well-defined
instructions that can be employed to accomplish a given task in a finite time.
This means that a set of instructions is not an algorithm if it does not have a definite stopping
place or if the instructions are too vague to be followed clearly. An algorithm represents the
logic which is used to solve the problem. The purpose of an algorithm is to communicate a
computation to humans (structured English) not to machines.

COMPUTER PROBLEM SOLVING APPROACH


- The first step in writing instructions to carry out a task with the computer is to
determine what the output should be, that is exactly what the task should produce.
- The second step is to identify the data input required for obtaining the output.
- The third step is to determine how to process the inputs in order to obtain the desired
output. That is to determine what formula, method, way or steps that can be used to
obtain the output.
The problem solving approach should always be adopted each time looking for the algorithm
that produces a solution of problem.

Example: A car travels 150km in 2h. How fast is the car moving?
Input: distance, time.
Processes: Ask for the distance and time, set the speed to: distance/time, display the speed.
Output: speed.

PRODUCTION OF AN ALGORITHEM
The process of producing an algorithm is as follows:
1. Read the problem carefully until you understand what the problem is talking about
and do have the clear idea of the output.
2. Apply the problem solving approach that is determine the output, the input and
processes, methods, ways or steps to apply for solving the problem.

GBHS DSCHANG Page 172


READERS ARE LEADERS
3. Implement the chosen processes to solve the problem while respecting the conditions,
if there are any.
4. Test the algorithm, that is run the algorithm with the exact or some randomly values
to ensure the correctness and the effectiveness of the algorithm.

Characteristics of Algorithms
A good algorithm should have the following characteristics:
o It must be explicit: [Link] clear and obvious.
o It must be precise or unambiguous: it must be specified exactly and accurately and
there should be no doubt about what to do next
o It must be effective or executable: it must produce a result and there should be no
―impossible‖ or unknown steps in the algorithm
o It must be finite or terminate: it must have a beginning and an end though there are
some that do not end.
o Efficient: some algorithms may work correctly but be inefficient by taking more time
and using more resources (space) than required to solve the problem.
o Must have an input and output.

To satisfy these quality standards, one can put the following question at the time of the
resolution of the algorithm problem:
 Which are the data on which the algorithm will work?
 Which are the processes which it must execute to offer these services?
 Which are the services which it most produce (this include respond to users request or
another algorithm)?

Computational Complexity: It measures how economical the algorithm is with respect to


time and space. The time complexity of an algorithm indicates how fast the algorithm runs (it
is the most crucial part of complexity). The space complexity indicates how much memory
the algorithm needs. Computer science has evolved to a point where space is no more a
problem, so it time complexity that is of almost importance.

Types of algorithm
There are several types of algorithms. They include;
1) Bullet proof algorithm: These are algorithms that are capable of recovering from any
imaginable exceptional condition.
2) Sort algorithm: A sort algorithm is an algorithm used to put elements of a list into
order.
3) Merge algorithm: These are algorithms which run on sorted lists and produce more
sorted lists as output. With the development of the large RAMS these types of
algorithms are becoming obsolete.
4) Search algorithm: Search algorithms look for one element of a set by using a key or
search criteria.
5) Cryptographic algorithm: Cryptographic algorithm uses deferent techniques to
convert data into encrypted form.

GBHS DSCHANG Page 173


READERS ARE LEADERS
Presentation of algorithms
There are many ways in which algorithms can be represented. We shall look into just 3 ways.
They are; Structured English (Natural language), Flow charts, and Pseudo code.
1) Structured English: By representing algorithms in Structured English, we simply
write down the steps to follow in solving a problem in chronological order. There is no major
syntax guiding the steps, just the chronology in the writing. Structured English (Natural
language) expressions of algorithms are rarely used for complex or technical processes.
Below is an algorithm (in natural language) which collects two numbers, sum up the
numbers, finds the difference of the numbers and then displays both the sum and the
difference of the numbers.
1. Get two numbers;
2. Find the sum of the numbers;
3. Find the difference between the
numbers;
4. Display the sum;
5. Display the difference;

An algorithm to make tea will be given


as:
1. Put water into the coffee machine
2. Add tea to it
3. Plug the machine to the current
4. Wait for ten minutes
5. Stop machine
6. Unplug it from current
7. Serve tea in a tea cup
8. Add sugar
9. Drink.

GBHS DSCHANG Page 174


READERS ARE LEADERS

2) Flow charts: A flow chart is a graphical representation of an algorithm. It uses graphic


symbols to describe the nature and flow of steps in an algorithm. Each step in a flowchart contains
information about what must be done and the arrows show the order in which the instructions
must be executed. Arrows indicates which step to go next. The following symbols are used in flow
charting:
1. Terminator: indicate the beginning (begin/start) or end (end/stop) of an algorithm.
Only one flow line leaves the terminator and it is represented by an Oval.

Start or End

2. Rectangle: indicates a process i.e. instructions, procedures, or actions to be carried by


an algorithm.

3. Rhombus or Diamond: indicates a decision or choice that has to be made and only one
flow line enters the diamond. However, two or more flow lines may leave a diamond.

4. Arrow and a Connector: indicates the direction of flow and connects two lines together
from a rhombus.
And
5. Parallelogram: indicates data input and output.

Advantages
 Communicate the details of a task or procedure to others.
 Excellent way of communicating each stage in a procedure.
 Acts like a guide or blueprint for the designer.
 Helps in analyzing problems or bottlenecks in a given task.
Disadvantages
 It is often difficult to present complex processes or tasks clearly using flow charts.
Example: Flow chart to divide two numbers (X and Y)
begin

read x, y

y=0? Yes

No Print “Error”

z := x/y

End

GBHS DSCHANG Page 175


READERS ARE LEADERS

3. PSEUDO CODE: A pseudo code is an outline of a computer program written in a mixture


of a programming-like language and English. Pseudo-codes help programmers write out the
program in a simple clear language before attempting to put it in a suitable programming language
of their choice. Writing pseudo code is one of the best ways to plan a computer program.

The difference between a pseudo-code and a flow chart is that pseudo-code has less structure
while programmers must use symbols in flow charts.

The three standards for writing good pseudo-code are;


 Number each instruction: this is to enforce the notion of an ordered sequence in which
instructions are carried out.
 Each instruction should not be ambiguous but effectively computable.
 Nothing should be left out.

For example, here is a pseudo code outline of a Pascal program that reads two numbers and says
which is greater:
Begin
Read (a, b);
If a is greater than b then;
Write (―a is greater than b‖);
If b is greater than a then;
Write (―b is greater than a‖);
END
The advantage of pseudo-code is that it allows the programmer to concentrate on how the program
works while ignoring the details of the language.

Basic Instructions
Three basic instructions used in an algorithm are input, output and assignment instructions:
 An input instruction allows information to be typed from the keyboard using the
keyword read, readln, or get.
 An output instruction allows information to be shown on the screen using the keyword
write, writeln.
 display of information on the screen.
 printing of information on paper.
 The assignment or affectation statement allows a value to be assigned to a variable. A
variable can be assigned the content of another variable, a constant, a literal, an
arithmetic or Boolean expression. The symbol used is or :=.
Examples:  ,  ,  , 
In an assignment statement, the value to the right is assigned to the variable in the left. In the case
of  ,― ‖ is calculated and the result is assigned (kept) in the variable sum.
For  ,― ‖ is calculated and the result is assigned to the variable total,
meaning that the value of total has been increased by 1.
E.g. Let
 .

GBHS DSCHANG Page 176


READERS ARE LEADERS
Activity: Complete the table below.

+x

Elementary Data and Data Types


Variables, Constants and Literals
a. Variable: It is an object in a program whose value can be modified during the execution of
the program. In the above flow chart, x, y and z are variables.
b. Constant: An object whose value cannot be modified in the course of the algorithm or
program. A constant is given a value that remains the same all through the program.

Variables and constants are characterized by:


o An identifier: This is the name of the object.
o A value: This is the content of the object.
o A type: This defines the domain in which the object gets its value.

Example: var: name of variable = x, value = 2, and type of variable = integer.


c. Literal: anything (numbers or text) that is usually written within double quotes. For
example, ―Enter a number‖, ―The result is‖ are literals. This is what the program shows on
the screen (writeln).
1.1. Data Types
A data type defines the domain in which an object gets its value and the kind of operations that
can be performed on the object. The basic data types are:
 Integer: used to store positive, negative whole number and zero.
 Real numbers: used to store real numbers with decimal points both positive and
negative.
 Boolean: used to store logic values like true/yes or false/no.
 Character: used to store a single character or digit.
 Alphanumeric strings or Strings: used to store a word or phrase e.g. the word
hamburger will be stored as a string. Names of people, nested55, 34$56 are strings.

Basic Algorithmic Control Structures


Sequence Control Structure
A sequence control structure executes a set of instructions (Actions) one after the other from the
first to the last in the order they are given.
Action 1

Syntax: Instruction 1 Get a


Get b Action 2
Instruction 2
… C a + b
Instruction n Print ―Sum =‖, c Action n

End

GBHS DSCHANG Page 177


READERS ARE LEADERS
1- Selection Control Structure.
A selection control structure (condition control structure) chooses the instruction or set of
instructions to be executed based on the validity of a certain condition. Examples: If …then
…else and case …of.

If… then … else Read a, b


Syntax: IF condition THEN
Instruction 1 True
ELSE ?

Instruction 2 False

Ex. Get a, b Action 1 Action 2


If a = 0 then
Printf ―Error: division by zero‖
Else
Printf b/a

Explanation: Condition is a Boolean expression meaning that it can take only one of two values
true or false. The condition is evaluated, if it is true, instruction 3 is executed. If it is false,
instruction 2 is executed.
Note that instructions 1 and 2 could be compound instructions.
It is possible to nest many selection structures.
Syntax: If condition1 then
If condition2 then
Instruction 1 E x. Get a, b
Else If a <> 0 then
If b <> 0 then
Instruction 2 Print b/a
Else Else
Print ―Answer is 0‖
Instruction 3 Else
Print ―Error: division by 0‖
End

Explanation: If condition1 is true, we move to condition2. If condition2 is true, then instruction 1


is executed otherwise, instruction 2 is executed. If condition 1 is false, instruction 3 is executed.
Instruction1 or instruction 2 will be executed if and only if condition 1 is true.

Case … of E x. Get day


Syntax: Case variable of Case day of
1: print ―today is Monday‖
Case 1: Instruction 1
2: print ―today is Tuesday‖
Case 2: Instruction 2 …
… 7: print ―today is Sunday‖
End
Case n: Instruction n
End

Explanation The value of variable is evaluated, if it matches with case 1, instruction 1 is


executed. If it matches with case 2, instruction 2 is executed and so on. Case…of is a multiple

GBHS DSCHANG Page 178


READERS ARE LEADERS
selection structure. It is used when an important number of choices are to be considered depending
on the value of a variable.

Repetition (iteration) Control Structure


The repetition (iteration) control structure executes an instruction or set of instructions many times
until a certain condition is reached or while a condition is true. Repetition structures define the
order of operations and the number of repetitions. They are also known as loops. Examples are,
while…do, repeat…until, for…to…do.

While Loop E x. Get n


Syntax: While condition do i 1
Instruction(s) While i <= n do
Print ―this is a while loop‖
End while i i + 1
End while

Explanation: The condition is evaluated, if it is true instruction(s) is/are executed. Instruction(s)


is/are executed as long as condition remains true. When the condition becomes false, the loop
stops.
The condition for the loop to stop comprises of a variable called control or iteration variable
whose value must change at the end of each execution of the loop. In the example above, the
control variable is ―i‖.

Repeat Loop Ex. Get n


Syntax: Repeat i 1
Instruction(s) Repeat
Until condition Print ―this is a repeat loop‖
i := i + 1
Until i <= n

Explanation: The instruction or set of instructions is executed and the condition is evaluated. If it
evaluates to false, the instruction or set of instructions is executed again. If condition evaluates to
true, the program exits the loop.
Remark!: The Repeat until loop must be executed at least once as the condition is evaluated only
at the end of the loop.
E x. Get n
For i := 1 to n do
Print ―this is a for loop‖
For Loop End For
Syntax: For var: =low_limit to hi_limit do Or
Get n
Instruction(s)
For i:= n down to 1 do
Or Print ―this is a for loop‖
For var: =hi_limit downto low limit do End For
Instruction(s)

Explanation: var (variable) is given a value low limit or hi limit depending on the loop, which is
automatically incremented or decremented (by 1) after any execution of the loop. The loop stops
when low limit becomes greater than hi_limit. In both cases, if hi_limit is less than low limit, the
loop body is not executed at all.

GBHS DSCHANG Page 179


READERS ARE LEADERS
Exercise! Exercise! Exercise!
1) Write an algorithm to calculate the area of a circle.
2) Write an algorithm to solve a linear equation.
3) Write an algorithm that reads a person‘s sex and writes good morning sir if it‘s male and
good morning madam if it‘s female.
4) Write an algorithm that solves a quadratic equation.

Recursion
Some problems are recursive in nature. The solution to such problems involves the repeated
application of the solution to its own values until a certain condition is reached. Algorithms for
such problems are known as recursive algorithms (functions).
Recursion can be defined as the calling of a procedure by itself, creating a new copy of the
procedure.
A recursive function is a function that calls (invokes) itself during its execution. The main
characteristics of a recursive algorithm are:
- Stopping condition: It specifies the situation when the result can be obtained directly
without the need of a recursive call.
- Recursive call: The algorithm calls itself at least once. The value of the parameter
corresponding to a cascade of calls should lead eventually to the stopping condition.
Examples of recursive functions are the Factorial function, the sum function, and the Fibonacci
function.

Sorting algorithms
A sorting algorithm is an algorithm that puts elements of a list in a certain order. We can
distinguish many sorting algorithms: Bubble sort, Insertion sort, Selection sort, Heapsort,
Mergesort, Quick sort …

1. Selection sort
The principle of Selection Sort is to find the smallest element of the data sequence (from
index 0 to n-1) and put it to the beginning of the sequence. This procedure is then applied on the
yet unsorted areas (1 to n-1, 2 to n-1 and so on), until the area from n-2 to n-1 has been sorted.

2. Insertion sort
The data sequence is divided into two sections: an already sorted target sequence and a still unsorted
source sequence. The target sequence initially consists of the first element only. However, it grows
by one element per iteration.

In every iteration the first element of the current source sequence is compared with the elements of
the target sequence in incremental order. If the first element of the source sequence is lower
than or equal to an element of the target sequence, all elements to the left of the first element of the
source sequence and to the right of the current element of the target sequence are moved to the right,
the current element is inserted to the corresponding location in the target sequence and the
iteration is stopped. Sorting is finished once all elements belong to the target sequence.
3. Bubble sort
The name of this algorithm is supposed to indicate that the elements "rise" like bubbles. All elements
are compared with their successors; if the element with the lower index is the greater one, the

GBHS DSCHANG Page 180


READERS ARE LEADERS
elements are exchanged. Once the entire sequence has been processed this way, the whole process is
repeated - until there's been an iteration during which no exchange took place. Then the data is
sorted.
4. Merge sort
The unsorted sequence is divided into two sub-sequences. These, again, are divided into two sub-sub-
sequences, and so on. The smallest partitions consist of just one element each; thus, each of them can
be regarded as sorted within its borders. Now neighboring partitions are merged to larger sub-
sequences (that's the source of the name of this algorithm), however not before the elements have
been correctly ordered. The resulting sub-sequences are, again, merged until finally the entire data
sequence has been reunited.
5. Quick sort
Quicksort is a fast and recursive sorting algorithm, which is used not only for educational purposes,
but widely applied in practice. Quick sort is suitable for sorting big data volumes.
Algorithm
The divide-and-conquer strategy is used in quicksort. Below the recursion step is described:
- Choose a pivot value. The Pivot can be any value, which is in range of sorted values, even if
it doesn't present in the array.
- Partition. Rearrange elements in such a way, that all elements which are lesser than the
pivot go to the left part of the array and all elements greater than the pivot, go to the right
part of the array. Values equal to the pivot can stay in any part of the array. Notice, that array
may be divided in non-equal parts.
- Sort both parts. Apply quicksort algorithm recursively to the left and the right parts.

Searching algorithms
Searching for data is one of the fundamental fields of computing. Often, the difference between a fast
program and a slow one is the use of a good algorithm for the data set.
Linear search
A linear search is the most basic of search algorithm you can have. A linear search
sequentially moves through your collection (or data structure) looking for a matching value.

Binary search
Binary search or half-interval search algorithm locates the position of an item in a sorted array.
Binary search works by comparing an input value to the middle element of the array. The comparison
determines whether the element equals the input, less than the input or greater. When the element
being compared to equals the input the search stops and typically returns the position of the element.
If the element is not equal to the input then a comparison is made to determine whether the input is
less than or greater than the element.

Dry run of an algorithm: It is the process where a programmer manually works through the code of
an algorithm (pseudo code) to trace the values of variables i.e. the act of mentally running an
algorithm expressed in pseudo code without using a computer.

GBHS DSCHANG Page 181


READERS ARE LEADERS
B. COMPUTER PROGRAMMING LANGUAGES
Introduction
Programming or program development is the act of writing computer programs. A computer
program is a set of instructions written in a programming language that tells the computer what to do
in order to solve a problem. In other words, it is an algorithm expressed in a programming language
or a program is a collection of procedures each containing a sequence of instructions.

Characteristics of a good Computer Program and software


 Efficiency: it is the degree with which the program fulfills its purpose without waste of
resources.
 Reusability: it is the ease with which a program can be reuse to design other programs.
 Maintainability: it is the ease with which modifications can be made to satisfy new
requirements or to correct deficiencies.
 Reliability: this is the extent to which a program fails to perform its functions under normal
operating circumstances.
 Correctness: degree with which a program meets its specified requirements.
 Robustness: degree with which a program resist to users manipulations errors.
 Documentation: enough comment should be included in a program to facilitate its
understanding by any computer user.
 Portability: it refers to the ability of software to run on different platforms (system
software‘s) with or without minimal changes.
 Flexibility: a program should be flexible enough to handle most of the changes without
having to rewrite the entire program.
 Readability: it should be written in such a way that it makes other programmers or users to
follow the logic of the program without much effort.
 Clarity: the state or measure of being clear in appearance, thought or style.

Programming Languages
A programming language is a set of words, symbols and rules for writing computer programs. For
short A programming language is a problem-solving tool.

A programming language is determined by its syntax (rules guiding the formulations of the program
statement) and semantics (it describes the meaning of the program statement i.e. it is the vocabulary
of the language). Two categories of programming languages exist: low-level languages and high-
level languages.
- Low Level Languages
Low level languages are those that allow low-level access to hardware features. There are two
categories of low-level languages: machine language and assembly language.
 Machine Language
Machine language is the computer‘s language. It is the language the computer understands. A
Machine language instructions are written in binary (a series of 0s and 1s), and are directly
executable by the computer (processor). Each machine language statement corresponds to one
machine action. Machine language is the first generation of programming languages.
 Assembly Language
Assembly language is a low-level language that uses words or symbolic codes called mnemonic
codes to represent machine language instructions. Assembly language is the second generation of
programming languages. ADD, LOAD, and STORE are known as mnemonics. For example:
LOAD R0 Number1 Loads number1 in register 0
ADD R2 R0 R1 Adds register 0 and register 1 and store result in register 2.
a. Advantages
o Programs are easier to write and understand when compared to machine language.
o It can produce small size program
GBHS DSCHANG Page 182
READERS ARE LEADERS
o It can produce very fast code as it allows low-level access to hardware features
b. Disadvantages
o Programs are not as easy to write and understand when compared to high level languages.
o Programs are tied to specific computer hardware and can‘t be reused on another kind of
computer.
High Level Languages
A high-level language is a language that is closer to human language. A high-level allows a
programmer to write programs without having to understand the inner workings of the computer.
High-level languages are the third generation of programming languages. Examples of high-level
languages are C, Beginners All-purpose Symbolic Instruction Code (BASIC), Pascal, Java,
FORmular TRANslation (FORTRAN), C++, COmmon Business Oriental Language (COBOL), etc.
a. Advantages
o Programs are easy to write and understand
o Built-in libraries to perform routine tasks
o Can be ported to multiple hardware setups from same.

b. Disadvantages
o slower than second generation languages
o Produce larger program files for same functionality than second generation languages.
o May not allow for low level hardware access.

Language Translators
To run a program on a computer, the program needs to be translated into the machine language of the
computer on which it will run. A language translator is a computer program that translates program
instructions from one language into another without loss of original meaning. It translates from HHL
also known as source code or human readable code to LLL also known as object code then then a
linker links it to machine code for execution. There are three types of language translators: assembler,
compiler, and interpreter.

Assembler
An assembler translates instructions from assembly language into machine language. This process is
called assembling.

Compiler
A compiler is a computer program that translates an entire block ([Link] once) of instructions written
in a high-level language into machine language instructions before executing it. The high-level
language program is called source code and the generated machine language program is called
object code. Types of compiled languages are Pascal, C, C++, FORTRAN, JAVA, and Python.
Third generation languages.
Advantages of a Compiler
o Fast in execution
o The object/executable code produced by a compiler can be distributed or executed without
having the compiler present.
o The object program can be used whenever required without the need of recompilation.

Disadvantages of a Compiler
o Debugging a program is much harder. Therefore not so good at finding errors.
o When an error is found, the whole program has to be re-compiled though compilation process
is so fast.

Interpreter

GBHS DSCHANG Page 183


READERS ARE LEADERS
An interpreter is a computer program that translates and executes instructions written in a high-level
language into machine language instructions one line at a time. If a program performs a section code
1000 times, then the section is translated into machine code 1000 times since each line is interpreted
and then executed. Types of interpreters: BASIC, Lisp, Logo, etc. Third generation languages.
a. Advantages of an Interpreter
o Good at locating errors in programs since interpretation is done line by line.
o Debugging is easier since the interpreter stops when it encounters an error.
o If an error is corrected, there is no need to retranslate the whole program.

b. Disadvantages of an Interpreter
o It is slow as interpretation is done line by line
o Translation has to be done every time the program is to be executed since no object code is
produced.
o For the program to run, the interpreter must be present.

Program Errors and Correction


- Syntax Error
Syntax is the set of rules that specify how the symbols of a language can be put together to form
meaningful statements. A syntax error is a place in a program where the syntax rules of the
programming language were not followed. A syntax error will stop a program compilation or
interpretation.
- Semantic Error
Semantics specify the meaning of an orderly well-formed program. A semantic error is a situation
where the programmer misunderstood the meaning of something in the programming language.
Compilation and interpretation do not detect semantic errors. Semantic errors are detected from
wrong results. They are also called logical errors.
Something may be syntactically correct but semantically incorrect.
- Run-time Error
Run-time error is an error that occurs when a program is being executed. For example, a run-time
error may occur if division by 0 is attempted. A run-time error may cause the program to stop
execution.
- Debugging
An error in a computer program is known as a bug and debugging is the process of finding and
removing bugs. Syntax errors and semantic errors are bugs. A debugger is the software tool (or
person) used for this purpose.
- Logic error
These are errors that lead to wrong output.

Key Words and Operators


- Key Words
Any high-level language has its own set of predefined words which are used to write programs. Each
of these words has a specific meaning, and cannot be used for any other purpose within the
programming language IDE. These words are known as key words or reserved words. A reserved
word is a key word in a programming language that has a specific meaning and cannot be used for
any other purpose. E.g. If, Else, For, To and goto.
- Operators
Operators are used to perform various operations on data. They may be arithmetic, relational or
logical. Arithmetic operators are +, -, *, %, ++ and -- and /. Relational operators include <, >, ==, <=,
>= and !=. Logic operators are NOT (!), AND (&&) and OR (||).

PROGRAMMING PARADIGMS: A set of coherent abstractions used to effectively model a


problem/domain. A mode of thinking aka a programming methodology. Therefore, it is a

GBHS DSCHANG Page 184


READERS ARE LEADERS
fundamental style and methodology of computer programming. There are as follows: imperative
(procedural), declarative, and object oriented Paradigms.

- Imperative Paradigm: It is also known as procedural programming paradigm. It tells the program
how to obtain the results. It uses sequences of instructions that are executed by the processor in the
order the programmer designed. Imperative programming manipulates variables and data
structures/types. In other words, imperative is asking for something to be done or is a command or an
order to do something. Examples: C, Pascal, FORTRAN, BASIC, Ada, COBOL, etc.

- Declarative Paradigm: Made up of logic Paradigm and Functional Paradigm. Its


control flow is implicit i.e. the programmer states only what the result should look like not
how to obtain it. Logic paradigm is a programming process that consists of a set of facts and rules
(axioms) describing properties of a certain objects and theorems to be proved. E.g. Prolog. Prolog
and Mercury are fifth generation language also called Natural Languages. In the functional
programming paradigm, a program development is the construction of mathematical functions. E.g.
Lisp, Mathematica, Haskell, Scheme, etc.

- Object Oriented Paradigm (OOP): Here software is viewed as a collection of units called objects
each of which is capable of performing the actions that are immediately related to itself as well as
requesting actions of other objects. Together, these objects interact to solve the problem. E.g. design
of graphical user interface using C++, Python, Perl, Java, Smalltalk, Eiffel.

Procedural: program =algorithms + data good for decomposition.


Functional: program =functions + functions good for reasoning.
Logic programming: program =facts + rules good for searching.
Object-oriented: program =objects + messages good for encapsulation.

Software reuse
The systematic development of reusable components and reuse of these components serve as building
blocks to create new system. Software reuse has proved to be an efficient way to help improving
software development quality and productivity during all these years‘. Software reuse is the process
of implementing or updating software systems using existing software assets.
Types of reuse are Horizontal reuse and Vertical reuse.

The advantages of reuse


 Increase software productivity.
 Shorten software development time.
 Improve software system interoperability.
 Develop software with fewer people.
 Move personnel more easily from project to project.
 Reduce software bugs, development and maintenance costs.
 Produce more standardized software.
 Produce better quality software and provide a powerful competitive advantage.

Disadvantages
 The principles, methods, and skills required to develop reusable software cannot be learned
effectively by generalities and platitudes.
 To succeed in-the-large, reuse efforts must address both technical and non-technical issues.
 Retrieval and Legal.
 Expensive.
 Managerial.
GBHS DSCHANG Page 185
READERS ARE LEADERS

SOFTWARE DEVELOPMENT TOOLS


These are software that are used to develop applications and system software.
- Source code editor: A source code editor is a text editor program designed specifically for
editing source code of computer programs. It could be a standalone application or it may be built into
an Integrated Development Environment (IDE). An IDE is single software that provides
comprehensive facilities to computer programmers in which all software development is done. Also
known as Integrated Design Environment or Integrated Debugging Environment. An IDE normally
consist of: a source code editor, a compiler or interpreter, automation tools, a debugger.
- Linker: This is software that is used to combine object code modules (sub-programs) together
to make a complete program.

STAGES IN THE PROGRAM DEVELOPMENT CYCLE


 Problem Analysis.
 Task Analysis.
 Algorithm Development.
 Coding
 Testing and Debugging.
 Documentation and Maintenance.

PROGRAMMING TECHNIQUES
There exist three main types of programming techniques: unstructured programming, structured
programming and Object oriented programming.

Unstructured programming refers to writing small and simple programs which consist of only one
main program. All the actions such as providing input, processing and displaying output are done
within one program only. This style of programming is generally restricted for developing a small
application; but if the application becomes large, then it poses real difficulties in terms of clarity of
the code, modifiability and ease of use. Although this type of programming style is not
recommended, still most programmers start programming using this technique only.

Structured programming: The programs generated using unstructured approaches are meant for
simple and small problems. If the problem gets lengthy, this approach becomes too complex and
obscure. After some time, even the programmers themselves may find it difficult to understand their
own program. Hence, programming should be performed using a ‗structured‘ (organized) approach
like procedural programming or modular programming.

Procedural programming
This programming has a single program that is divided into small segments called
procedures (also known as functions, routines, subroutines or methods). From the main or
controlling procedure, a procedure call is used to invoke the required procedure. After the sequence
is processed, the flow of control continues from the position from where the call was made. The
main program coordinates calls to procedures and hands over appropriate data as parameters. The
data are processed by the procedures and once the program has finished, the result data are
displayed.

Modular programming is the process of breaking down a problem into smaller independent tasks.
These tasks can then be broken down into subtasks. Each module is designed to perform a specific
function. Note that each module in itself is a small program, which can be compiled and tested

GBHS DSCHANG Page 186


READERS ARE LEADERS
individually and all modules are combined to build the whole program. Modular programming is an
important and beneficial approach to programming problems. They make program development
easier, and they can also help with future development projects.
A module is a component of a larger system that interacts with the rest of the system in a simple and
well-defined manner.
Importance of modular programming
a) Distributed d evel op men t : By breaking down the problem i nt o multiple t as ks ,
different developers can work in parallel. And this will shorten the development time.
b) Code reusability: A program module can be reused in programs. Modules or
procedures can also be reused in future projects.
c) Program readability: A program that has many functions is straightforward. But a
program with no functions can be very long and hard to follow.
d) Manageable tasks: Breaking down a programming project into modules makes it more
manageable. These individual modules are easier to design, implement and test.
e) Maintainability: An error in the system provide from a given module. It is then easier
to maintain a single module than to maintain a whole program.

GBHS DSCHANG Page 187


READERS ARE LEADERS

Object Oriented Programming (OOP) is a style of programming that identifies and group‘s
variables and modules into class objects. The class object represents a ―thing‖ like a
customer, a purchase, a payment and expresses each in terms of their data (state) and modules
(behavior). The class object is stored in a file where it can then be accessed by the programs
logic and more important be reused by other programs.
A main platform of object-oriented programming is code reusability. Rather than starting
from scratch with each new application, a programmer will consult libraries of existing
components to see if any are appropriate as starting points for the design of a new
application. Reusability is the ability of software elements to serve for the construction of
many different applications.

Benefits of Reusability
 Reliability. Components built by specialists in their field are more likely to be
designed correctly and reliably.
 Efficiency. The component developers are likely to be experts in their field and will
have used the best possible algorithms and data structures.
 Time Savings. By relying upon existing components there is less software to develop
and hence applications can be built quicker.
 Decreased maintenance effort. Using someone else‘s components decreases the
amount of maintenance effort that the application developer needs to expend.
 Consistency. Reliance on a library of standard components will tend to spread a
consistency of design message throughout a team of programmers working on an
application.
 Investment. Reusing software will save the cost of developing similar software from
scratch.
Language dependency:
 Machine dependent or Machine oriented: It is a term for application programming
languages that runs just on a specific kind/class of machine or PC. LLL is also
machine dependent.
 Machine independent: It refers to programs or programming languages that run on a
variety of different types of computers for example Java and most/all HLL is machine
independent

INTRODUCTION TO C PROGRAMMING LANGUAGE


C is an all general-purpose high level programming language mostly used in creating OSs and
more sophisticated programs. It was originally developed by Dennis M. Ritchie to develop the
UNIX operating system at Bell Labs. C is a successor of B language.

C is one of the oldest programming languages. It was developed in the 70s but it is still very
powerful thanks to how low-level it is. Learning C is a great way to introduce yourself to
more complex languages as well, and the knowledge you gain will be useful in almost every
programming language and can help you get into application development.

GBHS DSCHANG Page 188


READERS ARE LEADERS

The C is the most widely used computer language, it keeps fluctuating at number one scale of
popularity along with Java programming language(used for programming Android), which is
also equally popular and most widely used among modern software programmers.

C was initially used for system development work, in particular the programs that make-up
the operating system. C was adopted as a system development language because it produces
code that runs nearly as fast as code written in assembly language. Some examples of the use
of C might be: Operating Systems, Language Compilers, Assemblers, Text Editors, Print
Spoolers, Network Drivers, Modern Programs, Databases, Language Interpreters, and
Utilities.

How to get a C compiler


Download and install a compiler. C code needs to be compiled by a program that interprets
the code into signals that the machine can understand. Also known as Integrated Development
Environment (IDE) made up of made up of Text Editor and Compiler. Compilers are usually
free and different Compilers are available for different operating systems.
- For Windows, try Dev C++ or tuo C or CodeBlocks.
- For Mac, XCode is one of the best C compilers.
- For Linux, gcc is one of the most popular options.

C was designed for Unix operating systems, but has been ported and expanded for nearly all
operating systems. The modern version of C is Objective C & C++. C is essentially
comprised of functions, and in these functions you can use variables, conditional statements,
loops to store and manipulate data.

Reserved words or Key words in C: These are words that should not be used as constants or
variables or any other identifiers name in a C program.
void Used to indicate that a function takes no arguments or returns no value
typedef Used to associate a type with an identifier
const Used to declare constants
char, int, float,
Simple data types
double
struct Used to create a record data structure
Selection
if test a condition and perform a set of instructions based on the result
else used in if statement to provide an execution path when the if test fails
The switch statement tests the value of a expression and test with the
switch, case and
different "case" values. We can use "default" value, if it doesn't
default
matches any of "case" values.
break Used to jump out of the innermost enclosing loop or switch statement
continue Used to skip the statements that follow continue inside the loop
Operators
sizeof Determines the number of bytes of an object
return Used to terminate the execution of a function
Used to terminate the execution of a function and returns the value val
return val to the calling
function
Loops-related
for Used in a for loop

GBHS DSCHANG Page 189


READERS ARE LEADERS

do Used in a do… while loop (equivalent to repeat..until loop in Pascal


while Used in a while loop
Constant values
null pointer value indicating the pointer does not contain a value

NOTE: C is a case-sensitive language i.e. all keywords must be in lowercase. Thus,


Manpower and manpower are two different identifiers in C.

Structure of a C program
A C program basically consists of the following parts:
- Comments
- Pre-processor directives/commands
- Global declarations
Variables
Functions
- Main
Statements & Expressions
- Comments.

Examine some basic code.


Take a look at the very basic program below to get a good idea about how some of the various
aspects of the language work together and to get an idea of how programs function.

#include <stdio.h>
int main()
{
/*my first program in C */
printf("Hello, World! \n");
system("PAUSE");
return 0;
}

 The #i ncl ude<st di o.h > It is a preprocessor command which tells a C compiler to
include stdio.h file before going to actual compilation and also loads libraries that
contain the functions you need. In this example, st di o.h lets us use the pri nt f() and
system() functions.
 The i nt m ai n( ) command tells the compiler that the program is running the function
called "main" and that it will return an integer when it is finished. All C programs run
at least a "main" function.
 The braces {} indicate that everything inside them is part of the function. In this case,
they denote that everything inside is a part of the "main" function.
 Line 4 /* …. */ is a comment and is ignored by the C compiler.
 The pri nt f() function displays the contents of the parentheses on the user's screen.
The quotes ensure that the string inside is printed literally. The \n sequence tells the
compiler to move the cursor to the next line.
 The ‗; ‘ denotes the end of a line. Most lines of C code need to end with a semicolon.
 The system (―pause‖) or get char () command tells the compiler to wait for a
keystroke input before moving on. This is useful because many compilers will run the
program and immediately close the window. This keeps the program from finishing
until a key is pressed.
GBHS DSCHANG Page 190
READERS ARE LEADERS

 The ret urn 0 command indicates the end of the function.


Always comment on your code.
Comments are part of the code that is not compiled but allows you to explain what is
happening. This is useful for reminding yourself what your code is for and for helping other
developers who might be looking at your code.

- To comment in C place / * at the start of the comment and */ at the end.


- Comment on all but the most basic parts of your code.
- Comments can be used to quickly remove parts of your code without deleting them.
Simply enclose the code you want to exclude with comment tags and then compile. If you
want to add the code back, remove the tags.

Using Variables
Understand the function of variables.
A variable is nothing but a name given to a storage area that a program can manipulate. Each
variable in C has a specific type which determines the size and layout of the variable's
memory; the range of values that can be stored within that memory; and the set of operations
that can be applied to the variable. The name of a variable can be composed of letters, digits,
and the underscore character.
Variables allow you to store data either from computations in the program or from user input.
Variables need to be defined before you can use them, and there are several types to choose
from.

Some of the more common variables in C programming include i nt , char , bool, double,
fl oat or an y use r de fi ned obj ect . Variable list may consist of one or more identifier
names separated by commas. Each one stores a different type of data.

Variable Definition in C
A variable definition tells the compiler where and how much storage to create for the variable.
A variable definition specifies a data type and contains a list of one or more variables of that
type as follows: type variable_list;

Variables can be initialized (assigned an initial value) in their declaration. The initializer
consists of an equal sign followed by a constant expression as follows:
type variable_name = value;

How variables are declared.


Variables need to be established, or "declared", before they can be used by the program. You
declare a variable by entering the data type followed by the variable's name. For example, the
following are all valid variable declarations:
float x;
char name;
int a, b, c, d;

Note that you can declare multiple variables on the same line, as long as they are of the same
type. Simply separate the variable names with commas.

Some valid declarations are shown here:


int i, j, k;
char c, ch;

GBHS DSCHANG Page 191


READERS ARE LEADERS

float f, salary;
double d;

The line int i, j, k; declares and defines the variables i, j and k; which instruct the compiler to
create variables named i, j, and k of type int.

Like many lines in C, each variable declaration line needs to end with a semicolon.

Example: Check the following example where variables have been declared at the top, but
they have been defined and initialized inside the main function:

#include <stdio.h>
// Variable declaration:
extern int a, b;
extern int c;
extern float f;
int main ()
{
/* variable definition: */
int a, b;
int c;
float f;
/* actual initialization */
a = 10;
b = 20;
c = a + b;
printf("value of c : %d \n", c);
f = 70.0/3.0;
printf("value of f : %f \n", f);
return 0;
}
The same concept applies on function declaration where you provide a function name at the
time of its declaration and its actual definition can be given anywhere else.

Know where to declare variables. Variables must be declared at the beginning of each code
block (The parts of your code that are enclosed in {} brackets). If you try to declare a variable
later in the block, the program will not function correctly.

Variable scope: The scope of a variable is the region of code within which a variable is
visible. Variable scoping helps avoid variable naming conflicts. The concept is intuitive:
two functions can both have arguments called x without the two x‗s referring to the same
thing. Most programming languages support global and local scope with the newer
programming languages also supporting block scope.

Local variables: These variables only exist inside the specific function that creates them i.e.
inside the ‗int main‘ function. They are unknown to other functions and to the main function
program. Local variables cease to exist once the function that created them is completed.
They are recreated each time that function is executed or called.

GBHS DSCHANG Page 192


READERS ARE LEADERS

Global variables: These variables can be accessed (i.e. known) by any function
comprising the program. They are implemented by associating memory locations with
variable names. They do not get recreated if the function is recalled and are created outside
the main function before ‗int main‘.

Using Constants: Constants refer to fixed values that the program cannot alter during its
execution. These fixed values are also called literals. Constants can be of any of the basic
data types like an integer constant, a floating constant, a character constant, or a string literal.
Constants are treated just like regular variables except that their values cannot be modified
after their definition.
An integer literal can be a decimal, octal, or hexadecimal constant. A prefix specifies the
base or radix: 0x or 0X for hexadecimal, 0 for octal, and nothing for decimal.
A floating-point literal has an integer part, a decimal point, a fractional part, and an exponent
part. You can represent floating point literals either in decimal form or exponential form.
Character literals are enclosed in single quotes, e.g., 'x' can be stored in a simple variable of
char type.
String literals or constants are enclosed in double quotes "". A string contains characters
that are similar to character literals: plain characters, escape sequences, and universal
characters.

Understand the function of constants: constants are used to hold some identifiers
permanent like its name constant for a particular reason known by the programmer. E.g. pi,
gravitational force, name of a country, etc. etc.

How constants are declared.


There are two simple ways in C to define constants:
C. Using #define preprocessor
D. Using const keyword

The #define Preprocessor: Given below is the form to use #define preprocessor to define a
constant: #define identifier value
The following example explains it in detail:

#include <stdio.h>
#define LENGTH 10
#define WIDTH 5
#define NEWLINE '\n'
int main()
{
int area;
area = LENGTH * WIDTH;
printf("value of area : %d", area);
printf("%c", NEWLINE);
return 0;
}

The const Keyword: You can use const prefix to declare constants with a specific type as
follows: const type variable = value;
The following example explains it in detail:
#include <stdio.h>

GBHS DSCHANG Page 193


READERS ARE LEADERS

int main()
{
const int LENGTH = 10;
const int WIDTH = 5;
const char NEWLINE = '\n';
int area;
area = LENGTH * WIDTH;
printf("value of area : %d", area);
printf("%c", NEWLINE);
return 0;
}

NB: printf("%c", NEWLINE) means the cursor should go to a new line.

Know where to declare constants; constants are declared at the beginning of the program
before variables. Note that it is a good programming practice to define constants in CAPS
(uppercase letters).

Functions: A function is a group of statements that together perform a task. Every C program
has at least one function, which is main() and all the most trivial programs can define
additional functions. You can divide up your code into separate functions. How you divide up
your code among different functions is up to you, but logically the division is such that each
function performs a specific task. A function declaration tells the compiler about a function's
name, return type, and parameters. A function definition provides the actual body of the
function. The C standard library provides numerous built-in functions that your program can
call.
Defining a Function: The general form of a function definition in C programming language
is as follows:
return_type function_name( parameter list )
{
body of the function
}
A function definition in C programming consists of a function header and a function body.
Here are all the parts of a function:
 Return Type: A function may return a value. The return_type is the data type of the
value the function returns. Some functions perform the desired operations without
returning a value. In this case, the return_type is the keyword void.
 Function Name: This is the actual name of the function. The function name and the
parameter list together constitute the function signature.
 Parameters: A parameter is like a placeholder. When a function is invoked, you pass
a value to the parameter. This value is referred to as actual parameter or argument. The
parameter list refers to the type, order, and number of the parameters of a function.
Parameters are optional; that is, a function may contain no parameters.
 Function Body: The function body contains a collection of statements that define
what the function does.
Example: Given below is the source code for a function called max(). This function takes
two parameters num1 and num2 and returns the maximum value between the two:

/* function returning the max between two numbers */


int max(int num1, int num2)

GBHS DSCHANG Page 194


READERS ARE LEADERS

{
/* local variable declaration */
int result;
if (num1 > num2)
result = num1;
else
result = num2;
return result;
}

Function Declarations: A function declaration tells the compiler about a function name and
how to call the function. The actual body of the function can be defined separately. A function
declaration has the following parts: return type function name (parameter list);
For the above defined function max(),the function declaration is as follows:
int max(int num1, int num2);
Parameter names are not important in function declaration, only their type is required, so the
following is also a valid declaration: int max(int, int);
Function declaration is required when you define a function in one source file and you call
that function in another file. In such case, you should declare the function at the top of the file
calling the function.

Calling a Function: While creating a C function, you give a definition of what the function
has to do. To use a function, you will have to call that function to perform the defined task
using call by value or call by reference.

A parameter is an entry in a function header; it serves as a ―placeholder‖ for an argument. A


function‘s parameters are fixed; they do not change during program execution.
An argument is an actual value passed to the function by the calling program. Each time a
function is called, it can be passed different arguments

Procedures: A program segment that can be invoked from different parts of a program or
programs. It does not return a value (function of type void). Procedure declaration: int
next_index(void);

Passing arguments to functions: We have different ways of passing parameter to function


such as call by value and call by reference. Whenever we call a function, then sequence of
executable statements get executed. We can pass some of the information to the function for
processing called argument or parameter

Call by value: The value of a variable is sent to function. The actual parameter cannot be
changed by function copy going into the procedure. This is the mechanism used by both C
and Java. Note that this mechanism is used for passing objects, where a reference to the
objected is passed by value.

Call by reference: When passing parameter using called by address scheme, we are passing
the actual address of the variable to the called function. Any update made inside the
called function will modify the original copy since we are directly modifying the content of
the exact memory location.

C input and output operations


GBHS DSCHANG Page 195
READERS ARE LEADERS

As in Pascal, many C programs make used of user-supplied inputs and produce outputs that
are intended for consumption by the user. The inbuilt functions scanf and printf are
commonly used for input and output respectively as explained in Table below.

Function Description
This function can be used to read keyboard input. Usage of this function generally
takes the form scanf("format", argument list);, where format is a string of characters
that controls the input process. Some examples:
• scanf("%d", &x); /*read data into int variable x*/
scanf • scanf("%f", &y); /*read data into float variable y*/
• scanf("%d%f", &x,&y); /*read data into integer variable x*/
/*and float variable y*/
• scanf("%c", &z); /*read data into character variable z*/
• scanf("%s", &w); /*read data into character array w */
This function can be used to display things on screen. Usage of the function
generally takes the form printf("print_specifier", argument_list);, where
print_specifier is a string that will be printed, and contains zero or more %character;
%character is replaced by arguments that follow the print specifier. Some examples
printf • int x=10; float y=6.5; char z = 'D';
• printf("%d", x); /*10*/
• printf("Integer value %d", x); /*Integer value 10*/
• printf("Float value %f", y); /*Float value 6.500000*/
• printf("Character value %f", z); /*Character value D*/

Example
#include <stdio.h>
int main()
{
int x;
printf("Enter a number: ");
scanf("%d", &x);
printf("You entered %d", x);
system("PAUSE");
return 0;
}

- The " %d" string tells sc anf to look for integers in the user input.
- The & before the variable x tells scanf where to find the variable in order to change
it, and stores the integer in the variable.
- The final pri nt f command reads back the inputted integer to the user.

Learn the basic conditional operators. Conditional statements revolve around the use of
mathematical operators that compare values. The following list contains the most commonly
used conditional operators.

1. = /*assignment */
2. > /* greater than */
3. < /* less than */
4. >= /* greater than or equal to */
5. <= /* less than or equal to */

GBHS DSCHANG Page 196


READERS ARE LEADERS

6. == /* equal to */
7. != /* not equal to */
Manipulate your variables.
You can use mathematical expressions to manipulate the data that you have stored in your
variables. The most important distinction to remember for mathematical expressions is that a
single = sets the value of the variable, while = = compares the values on either side to see if
they are equal.
x = 3 * 4; /* sets "x" to 3 * 4, or 12 */
x = x + 3; /* adds 3 to the original value of "x", and sets the new value as the variable
*/
x == 15; /* checks to see if "x" equals 15 */
x < 10; /* checks if the value of "x" is less than 10 */
Using Conditional Statements
Conditional statements are what drive most programs. They are statements that are
determined to be either TRUE or FALSE, and then acted upon based on the result. The most
basic of the statements is the i f statement.

TRUE and FALSE work differently in C than what you might be used to. TRUE statements
always end up equaling a non-zero number. When you perform comparisons, if the result is
TRUE then a "1" is returned. If the result is FALSE, then a "0" is returned. Understanding this
will help you see how IF statements are processed.

Write a basic IF statement. You can use IF statements to determine what the program
should do next after the statement is evaluated. You can combine it with other conditional
statements later to create powerful multiple options, but for now write a simple one to get
used to them.
#include <stdio.h>
int main()
{
if (3 < 5 )
printf("3 is less than 5");
getchar();
}

Use ELSE/ELSE IF statements to expand your conditions. You can build upon IF
statements by using ELSE and ELSE IF statements to handle different results. ELSE
statements run if the IF statement is FALSE. ELSE IF statements allow you to include
multiple IF statements into one code block to handle various cases. See the example program
below to see how they interact.

#include <stdio.h>
int main()
{
int age;
printf("Please enter your current age: ");
scanf("%d", &age);
if ( age <= 12 ) {
printf("You're just a kid!\n");
}

GBHS DSCHANG Page 197


READERS ARE LEADERS

else
if (age < 20) {
printf("Being a teenager is pretty great!\n");
}
else if (age < 40) {
printf("You're still young at heart!\n");
}
else {
printf("With age comes wisdom.\n");
}
return 0;
}
The program takes the input from the user and takes it through the IF statements. If the
number satisfies the first statement, then the first pri nt f statement is returned. If it does not
satisfy the first statement, it is taken through each ELSE IF statement until it finds one that
works. If it doesn't match any of them, it goes through the ELSE statement at the end.

LOOPS
Loops are one of the most important aspects of programming, as they allow you to repeat
blocks of code until specific conditions are met. This can make repeating actions very easy to
implement, and keeps you from having to write new conditional statements each time you
want something to happen.
Loops use what is known in C as Increment and Decrement. The unary operator ++, --, is
used to increment and decrement which acts upon single operand. Increment operator
increases the value of variable by one. Similarly, decrement operator decreases the value of
the variable by one. These operators can only be used with the variable but can‘t be used with
expression ++(x+y+z) or constants ++6.

There are three main types of loops: FOR, WHILE, and DO...WHILE.

FOR loop.
This is the most common and useful loop type. It will continue running the function until the
conditions set in the FOR loop are met. FOR loops require three conditions: initializing the
variable, the condition to be met, and the way the variable is updated. If you don't need all of
these conditions, you will still need to leave a blank space with a semicolon, otherwise the
loop will run forever.
#include <stdio.h>
int main()
{
int y;
for (y = 0; y < 15; y++;)
{
printf("%d\n", y);
}
getchar();
}

In the above program, y is set to 0, and the loop continues as long as the value of y is less than
15. Each time the value of y is printed, 1 is added to the value of y and the loop is repeated.
Once y = 15, the loop will break.

GBHS DSCHANG Page 198


READERS ARE LEADERS

WHILE loop.
WHILE loops are more simple than FOR loops. They only have one condition, and the loop
acts as long as that condition is true. You do not need to initialize or update the variable,
though you can do that in the main body of the loop.

#include <stdio.h>
int main()
{
int y=0;
while (y <= 15){
printf( "%d\n", y );
y++;
}
getchar();
}

The y+ + command adds 1 to the y variable each time the loop is executed. Once y hits 16
(remember, this loop goes as long as y is less than or equal to 15), the loop breaks.

DO...WHILE loop. This loop is very useful for loops that you want to ensure run at least
once. In FOR and WHILE loops, the condition is checked at the beginning of the loop,
meaning it could not pass and fail immediately. DO...WHILE loops check conditions at the
end of the loop, ensuring that the loop executes at least once.

#include <stdio.h>
int main()
{
int y;
y = 5;
do {
printf("This loop is running!\n");
} while ( y != 5 );
getchar();
}

This loop will display the message even though the condition is FALSE. The variable y is set
to 5 and the WHILE loop is set to run when y does not equal 5, so the loop terminates. The
message was already printed since the condition is not checked until the end.

EXAMPLE
1. /*this program computes the dimensional weight of a box*/
2. #include<stdio.h>
3. Int main (void)
4. {
5. Int height, length, width, volume;
6. Float weight;
7. Printf(―enter the length of box: ‖);
8. Scanf(―%d‖, &length);
9. Printf(―enter the width of box: ‖);
10. Scanf(―%d‖, &width);

GBHS DSCHANG Page 199


READERS ARE LEADERS

11. Printf(―enter the height of box: ‖);


12. Scanf(―%d‖, &height);
13. Volume = length*width*height;
14. Weight = (volume+165)/166;
15. Printf(―volume (cubic inches) : %d\n‖, volume);
16. Printf(―dimensional weight (pounds) : 2f\n‖, weight);
17. Return 0;
18. }

DETAILS OF THE PROGRAM


Line Explanation
1 A comment describing what the program does and is ignored by the
compiler.
2 Commands beginning with the # are known as pre-processor directives.
3 The main function starts the execution of the program. The keyword
‗int‘ indicates the return type is an integer. Also the keyword ‗void‘
indicates that the function takes no arguments.
4, 18 The braces each indicate where the body of the program begins and
ends respectively. They can also be use to group statements.
5, 6 Define the type of data that each variable i.e. height, length, width,
volume and weight will hold. Here we have integers and float (decimal
numbers)
7, 9, 11 Printf statement: it causes the message ‗enter length, width, and height
of box‖ to be displayed on the console screen.
8, 10, 12 Scanf statement: it reads input and stores it in the specified variable.
%d indicate s that the input is a decimal integer, %f; input is a floating
point number, %s input is a string. The ‗&‘specifies the location where
the variable is stored.
13, 14 Computations
15, 16 Printf displays the values of the numeric expressions volume and
weight as integers and floating point numbers respectively. For the
weight, ‗2f‘ specifies that the value printed will have just 2 digits after
the decimal point. The ‗\n‘ character tells printf to move the cursor to
the beginning of a new line.
17 Indicates that the main function terminates and the program returns the
value ‗0‘ to the O.S. when it terminates or returns a value to the user.

Some common operators in Pascal and C


Pascal C
The operators perform
Arithmetic Action(s)
arithmetic manipulations
operators
on their operands
+ + Adds both operands
- - Subtracts second operand from the first
* * Multiplies both operands
/ / Divides numerator by denominator

GBHS DSCHANG Page 200


READERS ARE LEADERS

Note: In C, if both operands are intergers, integer


division is performed and the result will be an
integer. The fractional part of the result is
discarded. If however, any of the operands is float
or double, the result is a floating point number
and the fractional part is not discarded
div / Integer division. Same comment above with C.
Modulus operator. Result is the remainder when
mod %
numerator is divided by the denominator
N/A ++ Increment operator. Increments its operand by 1
N/A -- Decrement operator. Decrements its operand by 1
These operators perform a
Relational comparison on their
operators operands and result in a
true or false result
Equality. The result is true if both operands are
= ==
equal, and false otherwise
Not equal. The result is true if operands are not
<> !=
equal, and false if they are equal
Greater than. The result is true if the left operand
> > is greater than the right operand and false
otherwise.
Less than. The result is true if the left operand is
< <
less than the right operand, and false otherwise.
Greater than or equal to. The result is true if the
>= >= left operand is greater than or equal to the right
operand, and false otherwise.
Less than or equal to. The result is true if the left
<= <= operand is less than or equal to the right operand,
and false otherwise.
These operators perform
Logical
logical operations on their
(boolean)
operands; the result is a
operators
true or false
The AND operator.
In C, the result is true if both operands are non-
and && zero, otherwise the result is false.
In Pascal, the result is true if both operands are
true, otherwise the result is false.
The OR operator.
In C, the result is true if any of the two operands
or || is non-zero, otherwise the result is false.
In Pascal, the result is true if any of the two
operands is true, otherwise the result is false.
The NOT operator. Used to reverses the logical
not ! state of its operand. If a condition is true
then the NOT operator will make false
Assignment Change the value in a
Operators memory location, i.e. in a

GBHS DSCHANG Page 201


READERS ARE LEADERS

variable
Simple assignment operator. Assigns the value of
the right hand side expression to the left hand side
operand Statements involving the assignment
operator may look mathematically incorrect.
:= =
Examples: c = c + 5; (in C) or c := c + 5; (in
Pascal) should be interpreted as follows: Assign
to variable c a value which is the same as the old
value of c, plus 5.
These C operators perform an arithmetic
operation, and then assign the result to the left
operator.
+=, =, *=,
N/A Example, += (add AND assignment operator)
/=, %=
adds right operand to the left operand and assign
the result to left operand. Hence, c += 5 is
equivalent to c = c + 5;

YOU SHOULD CONTINUE LEARNING C PROGRAMMING LANGUAGE ON


YOUR OWN IF YOU WANT TO, ITS SIMPLE! ITS ONE OF THE BEST THING
YOU CAN DO FOR YOURSELF, YOUR FAMILY AND YOUR COUNTRY.

CHAPTER 16: PROJECT MANAGEMENT


Competence;
- Define project and project management with their differences.
- Describe project management phases.
- Explain terminologies in project management.
- Understand project management tools (PERT and Gantt chart).
- Demonstrate an understanding of the features of PERT chart as a project management
tool.
- Show an understanding of the properties of Gantt chart as a project management tool.
Introduction
A typical project starts with someone having an idea and documenting the idea on paper.
Projects usually go through a number of phase‘s i.e. well-defined beginning, intermediaries
and an end. There are classified according to size and duration whereby;
 Medium projects have a small size and small time frame.
 Small projects have duration of more than one month.
 Large projects have duration of more than one year.
The duration of a project is determined by its complexity. A project starts when at least one of
its activities is ready to start. A project is completed when all of its activities have been
completed. A project should have some ‗deliverables‘ for ease of monitoring.

Often program and project are used interchangeably, but nominally, a program is a larger
concept than a project. A Program is a set of related Projects. Example the space shuttle
program consists of many flights which are each separately managed projects. This chapter is
focused on PROJECTS.

GBHS DSCHANG Page 202


READERS ARE LEADERS

Definition: A project is a sequence of unique, complex, and planned process having one goal
to achieve a specific objective through a well-defined set of activities, people, budget, and a
time frame in order to create a unique product or service.

Characteristics of a good project are;


- Well defined and achievable objectives or goals.
- A time frame for which to achieve its goals.
- Resources (types: budget, people, and material & facilities) are efficiently allocated for
activities in the various project phases.
- Project is aimed at satisfying the customers.
- Created once.

Examples of a project
- Programming computer software or an App or web site.
- Setting a computer network.
- Creating an IS.
- Constructing a bridge, house, and road.
- Setting up a business.
- [Link].

Resources needed for a project


– People
– Facilities
– Equipment
– Money
– Materials

Concept and/or Notion of Project Planning


Project Planning involve understanding the fundamentals of a project:
- What business situation is being addressed?
- What do you need to do?
- What will you do?
- How will you do it?
- How will you know you did it?
- How well did you do?

Project Management (PM) is a combination of techniques, procedures, people, and systems


focused on the successful completion of a project. It is also a discipline that will support the
planning, implementation, tracking, and control of projects. Project management program
permits the user to identify tasks, task relationships, resources, and time requirements of a
project; to manipulate that information for planning purposes; to track work progress against
the plans. At the head of project management is a project manager. The constraints of a PM
are; Scope, Time and Budget.

GBHS DSCHANG Page 203


READERS ARE LEADERS

These three constraints can be represented graphically by a framework known as “project


management triangle”. Here each side of the triangle represents a constraint.
a) Scope constraint: it refers to what must be done to produce the projects end results.
b) Time constraints: it refers to the amount of time available to complete a project.
c) Cost constraint: it refers to the budgeted amount available for the project.
Reducing or increasing any one of the three constraints have an impact on the other two.
Increase scope will increase the other two. A tight time will increase cost and reduce scope. A
tight budget will increase time and reduce scope.
The forth constraint is Quality which is the core of each and every project. These constraints
form what is known as the Project Management Triangle

Just like other human undertakings, projects need to be performed and delivered under certain
constraints (restrictions). Traditionally, these constraints are scope, time and cost. Reducing or
increasing any one of the three constraints have an impact on the other two. Increase scope
will increase the other two. A tight time will increase cost and reduce scope. A tight budget
will increase time and reduce scope.

• In reality we can only control and manage – at most - two of these constraints. Name them.

Project Manager
A project manager is a qualified individual (or a firm) that directs, supervises, and co-
ordinates a project from beginning to end.

GBHS DSCHANG Page 204


READERS ARE LEADERS

Some duties/activities of a project manager as follows:


- Define the project, set manageable tasks, obtain resources, and build a team and motivate the
team to carry out the work on time.
- Inform all stakeholders of progress on regular basis.
- Asses and monitor risks to the project and mitigate/reduce/diminish/lighten them.
- Be able to adapt to and manage changing conditions.

Qualities of project manager


- Strong leadership ability.
- Ability to develop people.
- Excellent communication skills.
- Contract management skills.
- Problem solving and time management skills.
- Creative and/or critical thinking.

Project Team: A project team is a group of professionals committed to achieving common


objectives, who work well together and who relate directly and openly with one another to get
things done i.e. action performed by a team towards a common goal. A team consists of more
than one person each of whom typically has different responsibilities and they success is the
responsibility of all the members.

Team working is the fuel that allows common people to attain uncommon results.

Team membership ranges from 6 – 15 (if >15 split into two groups). Recent development in
management jargon outlines TEAM as ―TOGETHER EVERYONE ACHIVES MORE”.

Project team membership


– Project manager – (chosen before Scoping).
– Core team (chosen before Planning).
– Supporting team (chosen before Launching).

Characteristics of effective teams


It consists of members who have;
- A common purpose and clear goals.
- The necessary skills and resources.
- A common approach to work.
- The willingness to share information.
- Trust and support in each other.
- The willingness to take responsibility for team actions.

Benefits of teamwork
- Maximize strength of each member;
- Increase in productivity and product quality and also decrease in the cost of production;
- A balance work load as each member can help each other;

GBHS DSCHANG Page 205


READERS ARE LEADERS

- Can blame your teammate if the project goes bad;


- Encouragement of skills, knowledge sharing and fast learning;
- Education of group members on tolerance and understanding.

Disadvantages of teamwork
- Never gets enough credit when the project goes well;
- Not all members will have the same strengths and weaknesses;
- Tasks/work not undertaken on time by some members can let the team down;
- Conflicts in ideas can cause tensions and personality clashes can cause issues too;
- Opposing views can cause arguments.

Project Team Effectiveness and Performance


• ―People like us‖
– Select team members who will get on well with each other.
• Possesses needed skills and competencies.
– Goes with member development. Pair less experienced people with more experienced to
develop their skills and understanding.
• Member satisfaction & Member development
– People need to think that they are (a) appreciated and (b) developing marketable skills.
Make sure they get great feedback and access to training opportunities.
• Flexibility, Coordination & Cooperation.
– Are the team acting as a team in monitoring progress? Do they identify and share critical
tasks, to get things done?
• Quality of output.
– Do your team understands what makes a high-quality piece of work? If not, it is your job to
educate them!
• Productivity
– Set clear goals and reward structures. Make sure people feel appreciated when they meet
their goals.

Project Management Life Cycle (PMLC): These are the sequence of steps or phases to be
completed when implementing a project and are not a linear process. In each phase are the
project activities that are carried out.
1. Project conception and Initiation: at this phase the idea is carefully examined to
determine whether or not it benefits the organization and a decision making then
decides if the project is feasible. The project manager works with the business
sponsor or the manager who wants the project implemented and other stakeholders.
The following are examine in this phase:
 Analyzing the business needs/requirements in measurable goals.
 Stakeholder analysis including users and support from personnel for the project.
 Financial analysis of the cost and benefits including a budget.
 Project charter (contract) including cost, tasks, deliverable, and schedules.
2. Planning and design: at this stage all project activities and plan charter may be put in
writing outlining the work to be performed. It consists of the following sub-stages:

GBHS DSCHANG Page 206


READERS ARE LEADERS

 Determining how to plan.


 Estimate the resource requirements for the activities.
 Identifying deliverables and creating the work breakdown structure
 Select the planning team.
 Risk planning.
3. Execution and construction: in this phase, the project manager knows how many
resources and how much budget is needed to work the project. The project manager
then assigns those resources and allocates budget to various tasks and all the teams are
informed of responsibilities. It involves the following process:
 Coordinating people and resources.
 Integrating project activities.
 Performing the project activities in accordance with the project management plan.
4. Monitoring and Controlling: project managers compare project status and progress
to the actual plan and other necessary actions are taken to keep the project on track. If
the client disapproves or request a specific change, the team must then revert to the
project planning phase and adjust the scope to match the new required deliverables. Its
activities include:
 Measuring the ongoing project activities.
 Monitoring the project variables (e.g. cost, effort, scope) against the project
management plan and the project performance baseline (where we should be).
 Identifying corrective actions to address issues and risks properly (that is how can we
get on track again).

Project maintenance is an ongoing process and it includes continuing support of end-


users, correction of errors, and updates of the software.
5. Completion and finish point: here the project manager and project sponsor pull
together the project team and those who have an interest in the outcome of the project
(stakeholders) to analyze the final outcome of the project. An evaluation is done to
highlight project success and/or learn from the project. The finish point (closure) is the
formal acceptance of the project. This phase consist of the following sub-stages:
 Finalizing all activities across all of the process groups to formally close the
project or a project phase.
 Completing and settling each contract and closing each contract applicable to the
project or project phase.
 Formal acceptance of deliverables by customer.
Process groups

GBHS DSCHANG Page 207


READERS ARE LEADERS

Types of Project Management (PM) Planning’s


- Traditional PM: Follows the linear, waterfall model.
- Incremental planning PM: Delivers the project in incremental stages. Reduces risk of
delivering everything at once.
- Iterative planning PM: Allows project to evolve as understanding increases. Allows
management and stakeholder expectations/operational challenges to be clarified.
- Adaptive planning PM: Allows project purpose and goals to evolve as project proceeds.
Project planned in cycles: goals and requirements reviewed each cycle.
- Extreme planning PM: Involves users and/or clients in constant input/review of
requirements. Needs small group of project team working closely.

Project Management Methodologies: these are the various ways or approaches in which
projects are manage from the beginning to the end. For different industries and different types
of projects, there are specific methodologies that can be used.
- Traditional project management: this methodology follows the PMLC phases where each
stage is broken down and begins only when the previous stage has been completed. Most
common in construction projects where the work is very linear and rarely subject to
significant change.
- Critical Path Method (CPM): here each task indicates its time-duration then determines
the resources necessary to carry out the project within that time. The critical path is simply all
the tasks that determine the end date in a project schedule. If one of those tasks is late by one
day, then the entire project will be extended or late by one day. CPM aligns all tasks to bring
about the greatest possible time-efficiency.
- Critical Chain Project Management (CCPM): it is in contrast with the CPM in the way it
focuses on resources rather than time constraints. The CCPM is essentially the sequence of
tasks that the team members are able to efficiently handle. Used when a project has limited
resources and its time schedules are less strict and it distributes work in a flexible
collaborative way.
- Event Chain Methodology (ECM): it is used for projects with tasks that initiate chains of
events. Each task upon completion causes a new event in which a new task must be worked
on. Each task must be managed carefully in order to achieve the desired results.
- Other Project Management Approaches: PRINCE2, PRISM (Projects Integrating
Sustainable Method), Agile Project Management

GBHS DSCHANG Page 208


READERS ARE LEADERS

Project Management Standards: implementing a project using one of the project


management methods is not enough, it is also equally important to follow widely accepted
project management standards. This is because nowadays, most businesses attain global
dimension easily with the help of the Internet and once a project goes online it is opened to
the global market which emphasizes the need for global project management standards. Some
of these standards are:
- International Project Management Association (IPMA) founded in Europe.
- GAPPS (Global Alliance for Project Performance Standards): it is an open source standard
describing COMPETENCIES form project and program managers.
- ISO (International Standard Organization) standards ISO 9000: it is a family of standards for
quality management systems.
- IAPPM (International Association of Project and Program Management): it provides
guidelines for project auditing and rescuing troubled projects.

Project Management Software: PM software is a class of application programs that are


specifically designed to provide tools that are used for managing projects. Project applications
can be used for:
- Scheduling,
- Cost control,
- Resource allocation,
- Collaboration,
- Communication and,
- Administration.

Categories of Project Management Software:


- Desktop.
- Client-Server: can be accessed by multiply users working on the project in different parts.
- Web-based: accessed through a web-site without installing the software.
- Integrated: combines project management with many other aspects of company activities.
Popular Project Management Applications: Microsoft Project, Matchware Mindview, Project
Kickstart (it integrates with other applications like PowerPoint, Outlook, Excel, Word, and
Microsoft Project), Basecamp.

Major challenges in Project Management


- Unrealistic deadlines.
- Communication deficit.
- Scope change.
- Misunderstanding and/or Disagreement.
- Bad weather.
- Personality conflict.
- Resource competition.
- Failure to manage risk.
- Insufficient team skills.

GBHS DSCHANG Page 209


READERS ARE LEADERS

Project Scheduling
It is setting an order and time for planned events or task. This is done after determining the
following elements for each task:
Resource needed to accomplish it.
Time needed to carry out the task.
Tasks that must have been accomplished before it.

Project Management Tools: PM tool is a piece of technology that is used for visually
communicating information (e.g. phases, tasks, resources) about a project. This visualization
tool enables project managers to direct and supervise the various tasks and schedules that are
required for completing the project. PERT chart and Gantt chart are the most popular project
management tools today. They are both used to schedule tasks, keep the project on schedule
and ensure that the timeline is met in accordance with the original project plan.

- PERT charts: The term PERT stands for Program Evaluation and Review Technique. It
was developed by the US Navy for the planning and control of the Polaris missile program.
A PERT chart is a project management tool used to schedule, organize, and coordinate tasks
within a project. A PERT chart represents a graphic illustration of a project as a network
diagram or flow chart consisting of numbered nodes (either circles or rectangles) representing
events or milestones in the project linked by labeled vectors (directional lines) representing
tasks in the project.
Project managers can use PERT charts to:
- Set a realistic timetable for project completion.
- Make sure focus is maintained on the most critical tasks for the critical path – since the path
leads to the minimum time the project requires, any delays to these tasks will result in a delay
to the overall project.
- Identify tasks that need to be shortened if the overall project time needs to be reduced.
- Identify tasks that can be carried out simultaneously.
- Identify slack time where certain tasks are not as time-critical to the overall deadline.
Whereas CPM uses a single estimate for task duration, the PERT method requires the project
manager to supply three estimates to make the estimates as accurate as possible. The three
estimates are:
- Optimistic Time (O): the shortest time that the activity is likely to take. There will be a
small probability (less than 5%) of this happening.
- Most Likely Time (M): the project manager should have a high degree of certainty that the
task will be completed within this time.
- Pessimistic Time (P): the project manager should be almost certain (e.g. 99%) that the task
will be completed within this time.
- Optimistic time (O): the minimum possible time required to accomplish a task assuming
everything proceeds better than is normally expected.
- Pessimist time (P): the maximum possible time required to accomplish a task assuming
everything goes wrong (but excluding major catastrophes).
- Most likely time (M): the best estimate of the time required to accomplish a task assuming
everything proceeds as normal.

GBHS DSCHANG Page 210


READERS ARE LEADERS

- Expected time (TE): the best estimate of the time required to accomplish a task accounting
for the fact that things don‘t always proceed as normal. TE is the average time the task would
require if the task were repeated several times over an extended period of time.
TE = (O+4M+P) / 6

(H/W):
- Calculate the expected number of days needed to complete an activity on a PERT chart if
the pessimist time is 6 weeks, optimist time is 14 days and normal time is 4 weeks.
Solution: convert all to weeks or days and apply this formula: TE = (O+4M+P) / 6
Answer: 4weeks or 28days.

PERT Node and Terminologies


1. PERT Node: A PERT node is as follows and is use in drawing the PERT network
diagram.

2. PERT Terminologies
- PERT event: a point that marks the start or completion of one or more activities. Consumes
no time and uses no resources.
- Predecessor event: an event that immediately precedes some other event without any
events intervening. An event can have multiple predecessors‘ events and can be the
predecessor of multiple events.
- Successor event: an event that immediately follows some other event without ant other
intervening events. Ana event can have multiple successor events and can be the successor of
multiple events.
- PERT activity: the actual performance of a task which consumes time and requires
resources such as labor, materials, space, machinery. A PERT activity cannot be performed
until the predecessor event has occurred.
- Task: this is any activity that consumes resources such as time and manpower.
- Super task: one or more activities that no subtask can begin until the super task has begun
and the super task cannot end until all the subtasks have ended.

Examples
OS is a super task for it must be loaded in the RAM first before subtasks like
Applications software‘s can be able to start and work.
In the construction industry, foundation and especially walls are the super task for it is
started before other subtasks like piping, wiring, plastering, and painting can be done.
- Critical task: a task that must be completed on schedule for the project to finish on time.

GBHS DSCHANG Page 211


READERS ARE LEADERS

- Path: a set of sequentially connected activities in a PERT chart.


- Critical path: a critical path is a series of tasks that must be completed on time for a project
to finish on schedule. Each task on a critical path is a critical task.
- Lag: describes a delay in the link between a predecessor and a successor. It tells the logical
relationship between the start and or finish of one activity and the start and or finish of a
following activity.
- Lag time: it is the amount of time delay between the completion of one task and the start of
its successor task. A negative value against a lag is known as a lead.
- Slack time: it is the amount of time an activity can be delayed from its early start without
delaying the project finish date. It is also known as float time.
- Floating task: a task that can be performed earlier or later in the schedule without affecting
the project duration.
- Lead: a lead is observed when a task that should theoretically wait for its predecessor to
finish starts a little earlier.
- Lead time: it the time that a successor is allowed to start before its predecessor goes to
completion.
- Duration (D): it is the time (number of days or hours) it will take to complete a task.
- Early Finish date (EF): this is the earliest date that a task can be completed. The EF
duration of the last task(s) is the total duration of the project.
For any one task, EF = ES + Duration.
- Early Start date (ES): is the earliest date on which a given task can start.
- Effort: it is the number of labor units required to complete an activity or other project
element.
- Free Float (FF) or Slack Time (ST): the amount of time an activity can be delayed without
delaying the ES date of any immediate successor activity. It can be calculated as follows:
FF = LS – ES or FF = LF – EF
- Late Finish date (LF): is the last date a task can be completed without delaying the project.
It equals the EF of the last task(s).
- Late Start date (LS): is the last date a task can be start without delaying the projects overall
duration. Calculated as follows: LS = LF – Duration.
- Dependency: a dependency between two tasks says that these two tasks are linked. The
most common kind of dependency is finish-to-start. This means that task A must be finished
before task B can start.
- Fast tracking: it is performing more critical activities in parallel.
- Forward pass: is a calculation performed on each task determining its early start date and
early finish date.
- Backward pass: is a second calculation for each task on the project starting on the project
finish date and working backwards to the first task. It calculates the late finish date and late
start date of each task.
- Total project duration: it is the length of time the whole project will take, all tasks start to
finish as calculated by the forward pass. It equals the length of the critical path.
- Project finish date: is the number of days a project will finish.
- Milestone: a significant event in the project usually the completion of a major component.

GBHS DSCHANG Page 212


READERS ARE LEADERS

Examples
1. The following table shows the expected duration of each task. The task dependencies are
shown.

a. Construct a PERT chart for the project.


b. Identify the critical path and hence the minimum time to completion.
c. Describe where there is slack time in the system.
d. Construct a Gantt chart for the software development project. Assume that the first task
starts on 17th October 2015.

2. The following table shows the tasks, dependencies, and estimated times a project manager
might input to a PERT chart for a software development project (estimates are used for
illustrative purposes only), and the calculated Expected Times.

Network diagram.
The network diagram is based on the tasks and their dependencies (predecessor tasks). Task A
has no predecessor, and therefore starts the project on the left. Task B has only task A as a
predecessor, and is therefore the next task. The diagram shows that tasks D, E and H (writing

GBHS DSCHANG Page 213


READERS ARE LEADERS

test plans, code and manuals) all have task C (specification) as a predecessor, and can
therefore be carried out simultaneously.

Identify the critical path: The critical path is determined by using the estimated times to
work out the earliest start (ES) and finish (EF) times (forward pass), and latest start (LS) and
finish (LF) times (backward pass), and identifying the tasks where ES and LS are equal.

Step1: Forward pass.


This is done by working from left to right across the chart. The ES of task A is week 0, and
the EF is 6 since this is the ES plus the duration (estimated time). The earliest that task B can
begin is week 6 (since task A must be complete) so its ES is 6, and EF is 6 + 3 = 9. Note that
task G has an ES of 27 because it is dependent on both task D and task F being complete first,
and the earliest that both tasks will be completed is week 27.

Step 2: Backward pass.


Working from right to left, the Latest Finish Time (LF) and Latest Start Time (LS) can be
filled in. The final time is 33 weeks, so the LF of task H must be 33. Because this task (H) has
a duration of eight (8) weeks, it means it has a LS of LF- D 33 – 8 = week 25.
Note that for some tasks, such as Task C, there are different possibilities. To calculate the LF
of Task C we need to look at the latest start times for Tasks D, E and H which are dependent
on it. The latest time task C can finish (LF) must be 19 weeks because Task E has to start at
this point.

Step 3: Critical path and slack.


The critical path is identified by finding the nodes where ES = LS. These are nodes for which
there is no ‗slack‘ or spare time for a task in the project. The slack is calculated as LF – EF or
LS – ES, e.g. Task H has 6 weeks‘ slack, and could be scheduled to start sometime between

GBHS DSCHANG Page 214


READERS ARE LEADERS

week 19 and week 25 depending on factors such as the resources available to a task on the
critical path.

- Gantt chart: A Gantt chart is a graphic display of a schedule that helps to plan, coordinate,
and track specific tasks in a project. It was developed in 1918 by H.L. Gantt. In a Gantt chart,
activities are listed down the left side of the chart, dates are shown across the top, and planned
activity durations are shown on horizontal bars. It is a tool which enables project managers
organizes time, people, equipment, and money. Allows managers to monitor the progress of a
project and ensures the right people and equipment are in the right place and the right time. It
can be created using a Spreadsheet application.
The time relation of all tasks to each other (for example, tasks carried out simultaneously) is
therefore clearly apparent in a Gantt chart. The project status can be easily determined at
intermediate dates in the project, and progress of individual tasks can be shown by filling in
the task boxes. Unlike PERT charts, GANTT charts do not show the critical path, however,
dependencies between tasks can be indicated by lines linking tasks.

Its control flow is implicit i.e. the programmer states only what the result should look like not
how to obtain it.
Limitations of a Gantt chart
– Does not clearly indicate details regarding the progress of activities.
– Does not give a clear indication of interrelation between the activities.

Example: The following table shows the tasks, dependencies, and estimated times a project
manager might input to a basic GANTT chart for a software development project.

GBHS DSCHANG Page 215


READERS ARE LEADERS

Task 1 has no predecessors, and can thus start on 12 June. The Gantt chart shows the task as a
box starting on 12 June and finishing on 13 June on the horizontal access. Task 2 requires
Task 1 to be completed, and the duration is three days, so the box covers the dates 14 to 16
June. The line from the finish of Task 1 to the start of Task 2 indicates the dependency. Note
that Tasks 4, 5 and 8 all require Task 3 to be completed, and have no other dependencies, so
these all start on the same date. The chart below show all seven days of the week, but often,
weekend days are excluded.

Difference between PERT chart and Gantt chart


PERT charts focus on the sequence of tasks and their dependencies between one another
while Gantt charts focus on the time required for each task. Other differences include the
following:
 PERT chart display critical and non-critical tasks whereas Gantt charts fail to show the
critical and non-critical tasks.
 PERT chart produces more accurate expected time TE. This is because tasks in PERT
charts will have three representative time structures; optimistic time, most likely, and
pessimistic. By averaging these times, a manager can predict the time a task will take
to complete more realistically than the single time that Gantt charts provide.
 Gantt charts are straightforward and are not made for projects which will experience
change; while PERT charts are complex and tolerate great deals of unknown.
 Gantt charts focus on the time required to complete a task whereas a PERT chart
focuses on relationships between the tasks, the sequence of tasks, their dependencies
between one another and time.
 Gantt charts handle sequence and duration while PERT charts manage large and
complex projects with variable duration tasks.
 A PERT chart presents information in the form of a flow chart or network diagram
while the Gantt chart presents information in the form of a bar chart.

Report writing
Reports are documents which both give readers information and ask the reader to do
something with that information. Reports can be used:
 To suggest new ideas and options.
 To ask people to accept a point of view.

GBHS DSCHANG Page 216


READERS ARE LEADERS

 To influence decisions.
 To ask people to make choices between alternative recommendations.
Therefore a well-structured and well written report can be a very influential document.

The Format of a Report


1- Title or title page
2- Contents list
3- Abstract
4- Introduction
5- Discussion
6- Result
7- Conclusions
8- Summary
9- Recommendations
10- Appendices and reference if it an academic report.

Breakdown Structure: These are structures that are commonly associated with project
management. There are Work Breakdown Structure, Product Breakdown Structure, and
Hybrid Breakdown Structure.

1. Work Breakdown Structure (WBS)


WBS helps in;
Identifying the main activities and the independent activities.
Break each main activity down into sub-activities which can further be broken down
into lower level sub-activities and should be in hierarchical order. WBS is the
foundation of project planning. It is developed before dependencies are identified and
activity durations are estimated. It contains a list of activities for a project derived
from…Previous experience and Expert brainstorming.

2. Product Breakdown Structure (PBS)


PBS begins with the final product at the top of the hierarchy followed by the sub-categorized
elements of the product.
Advantage
– Activity list likely complete and non-overlapping;
– PBS gives a structure that can be;
• refined as the project proceeds
• used for determining dependencies among activities
Disadvantage
– May miss some activities related to final product.

3. Hybrid Breakdown Structure (HBS)


A mix of WBS and PBS (most commonly used). The HBS consists of;
– a list of the products of the project, and
– a list of phases for each product.

GBHS DSCHANG Page 217


READERS ARE LEADERS

SPREADSHEET APPLICATIONS the case of MICROSOFT EXCEL

Definition of spreadsheet: It is application software that allows the user to work with
numbers, performs calculations, and creates graphs. It consist of a workbook which have one
sheet by default and the sheets can be added to so many sheets arranged in the form of a grid
made up of vertical columns labeled by letters (A, B, C, D...) and horizontal rows labeled by
numbers (1, 2, 3, 4, 5,...) that manipulate, analyze, and display numerical character data. The
boxes at the intersection of the column and row is called a cell. A cell therefore is a position
on the grid where a row and a column intersect e.g. A1, D41.

It is applicable in areas such as student‘s records (report cards), charts and graphs, accounting,
budgeting, forecast, reports, etc. One of its great ability is that it can change figures and words
in the cell without the user having to do anything once a formula is introduced automatically.

Vocabulary: Our study focuses on the type of spreadsheet called Microsoft Excel.
1. An Excel file is also called a Workbook.
- Default title is Book1 but can be renamed to the name of your choice.
2. Ribbon broken into Tabs (Home, Insert, Page Layout, formulas, data, review, view, and
the helper ―tell me what you want‖)
- Tabs broken into groups
(Clipboard, Font, Alignment)
3. Name box (left) and formula
bar (right).
- Name box shows address of
current cell.
- Formula bar shows contents of
current cell.
4. Columns Headings are
Lettered, Rows Headings are
numbered.
- Columns of building, rows of
chairs
5. Worksheet navigation buttons,
Worksheet tabs.
- Default Sheet1 but can be increased to so many.
6. Status bar
- Excel behaves differently depending on the current "mode"

Types of spreadsheet Applications.


MS. Excel, Lotus 1-2-3 and Lotus Symphony, Quattro Pro, Google sheets, VisiCalc, Open
Office, Zoho Sheet (web-based spreadsheet), IWork numbers (Apple)), Libre Office.

GBHS DSCHANG Page 218


READERS ARE LEADERS

Characteristics of a cell in MS Excel


A cell can contain any of the three types of data:
- Labels: labels consist of text.
- Value: the second type of data a cell can contain is a numerical value which is moved
to the right of the cell.
- Formula: the third and most powerful data a cell can take is a formula. A formula
instructs the computer to mathematically calculate the value to be displayed in the cell.
To enter a formula or function in MS Excel, you most first begin with an equality sign
(=).
Cell referencing: Formulas in an Excel worksheet usually involve functions performed on
the values contained in one or more other cells on the worksheet (or on another worksheet). A
reference that you make in a formula to the contents of a worksheet cell is either a relative
reference, an absolute reference, or a mixed reference. Absolute and Mixed cell referencing
can be obtained with the F4 key.
 A relative reference to a cell takes the form A1. When you copy or fill a formula
from the original cell to other cells, a relative reference changes to maintain the
relationship between the cell containing the formula and the referenced cell. For
example, copying a formula that refers to cell A1 one row down changes the A1
reference to A2; copying the formula one column to the right changes the A1
reference to B1.
 An absolute reference takes the form $A$1; $A indicates an absolute reference to
column A, and $1 indicates an absolute reference to row 1. When you copy or fill a
formula from the original cell to other cells, an absolute reference will not change —
regardless of the relationship to the referenced cell, the reference stays the same.
 A mixed reference refers absolutely to either the column or row and relatively to the
other. The mixed reference A$1 always refers to row 1, and $A1 always refers to
column A. You can reference cells in other worksheets within the workbook.

Merge cells: This option merges the cells across the selected rows and columns and maintains
default alignment for the data type of the first cell of the merged cells.
To merge selected cells ➜ On the Home tab, in the Alignment group, display the Merge &
Center list, and then click Merge Cells to merge the entire selection, maintaining the
horizontal alignment of the data type in the first cell.

- Sorting: this is a function that provides a way of arranging data in an orderly manner
either in ascending or descending order.
- Filter: The filter function lets you view just the records that you want to see! The other
records in your data table will still be there, but hidden.
Note: The sort and filter function is always together and is available from the home and data
ribbons.
- Insert a chart: select the data you want to draw a graph with and go to the insertion
ribbon and choose illustrations hence choose the type of illustration of your choice for
your chart.

GBHS DSCHANG Page 219


READERS ARE LEADERS

Working with multiple sheets


By default, a new workbook includes only one worksheet. You can add blank worksheets to
the workbook or copy or move worksheets from another workbook.

To insert a new worksheet


➜ Click the New sheet button at the right end of the worksheet tab section.
➜ On the Home tab, in the Cells group, click the Insert arrow, and then click Insert Sheet.

To rename a worksheet.
● Right-click the worksheet tab and then click Rename.
● Enter the new worksheet name and then press Enter.

Excel allows you to build formulas and functions that reference data stored on different
worksheets within the same workbook. So you can be on worksheet3 and refer back to a cell
[Link] referring to a cell on a different worksheet, you type the name of the
worksheet followed by an exclamation sign (!) and then the column letter and the row
number. If you are on worksheet2 in cell D9 and want to refer back to cell C4 on
worksheet1, the reference would look like this: D9 =worksheet1!C4.
If you are on a worksheet named March, and you want to refer back to cell C7 on a sheet
name January, the reference would look like this: =January!C7. If you want to make that
an absolute reference, it would look like this: =January!$C$7.

Excel also allows you to reference data stored in a different workbook i.e. a different Excel
file. A cell reference to a different excel workbook (file) would look like this: [workbook
name]worksheet name cell name, e.g. =[workbook1]worksheet1!N10. If its absolute then
it would look like this: =[workbook1]worksheet1!$N$10

Functions
Spreadsheets usually include some built-in formulas called functions which are used for
performing predefined operations using the operations keyword. E.g. =SUM(D2:D15) is
a function with the keyword “sum” and this =D2+D3+D4+D5 is a formula.

Different calculations: The following are some of the many other functions for performing
mathematical calculations on spreadsheet.
- Copy a formula: to copy in a spreadsheet is just like in MS Word, click on the start cell
and drag until you reach the desired cell, then right click and chose copy.
The following are mathematical functions (sum, product, average, division (keyword is
quotient), subtraction (uses only a formula).

Other advanced functions.


 Exponents: D4^B2,
 Square root: =SQRT(D4),

GBHS DSCHANG Page 220


READERS ARE LEADERS

 Minimum: =MIN(D2:D10),
 Maximum: =MAX(D2:D10),
 ROUND() to round a set a values to a specified number of decimal places,
 TODAY () to show the current date,
 Rank: =RANK(D2,D$2:D$10,O or 1). 0 is decreasing order and 1 is increasing,
 COUNT: =COUNT(D2:D10) returns the number of cells that contents numeric value,
 Count-if: =COUNTIF(D2:D10,‖condition‖),
 The SUM-IF: =SUMIF(D2:D10,‖condition‖),
 IF: =IF(logic test,‖condition if true‖,‖condition if false‖),
 Nested if: it is the use of more than one IF function in a function e.g. =if(logic
test,‖condition‖,‖if(logic test,‖condition‖,if(logic test,‖condition‖,if(logic
test,‖condition‖)))). Mostly used to give grades to students‘ scores like A grade, B
grade, C grade etc.
 Concatenation: the function concatenate is used to relate up to 255 chain of text in a
single chain. The elements to be related can be text, numbers, and cell reference of
cells or a combination of all. For example if in the worksheet the surname of a person
is in cell A1 and the name is in cell B1, these two elements can be combined in one
value in another cell with the help of this function.
Syntax: =concatenate(text1, text2, text3, …) OR concatenate(A1, B1, C1, ..)
Which relates the texts or contents of the cells without a space.
=concatenate(A1,” “,B1). Relates the contents of the cells with a space i.e. a space between
the contents of A1 and that of B1.
NB: the next argument is a space.

Remark: you can equally use the ampersand or character ‗&‘ like the operator to replace the
concatenation function with a formula. E.g. =A1 & B1 which is equivalent to the function
=CONCATENATION(A1,” & “ ,B1).
 COUNTA: =COUNTA(D2 :D10) Returns the number of cells that contain any content
(are not empty).
 COUNTBLANK: =COUNTBLANK(D2 :D10) Returns the number of empty cells.

To hide selected rows or columns.


1. On the Home tab, in the Cells group, display the Format list.
2. In the Visibility section of the Format list, point to Hide & Unhide, and then click Hide
Rows to hide the selected row(s) or Hide Columns to hide the selected column(s).

To find hidden rows or columns in a worksheet


Open the Go To Special dialog box, click Visible cells only, and then click OK. In the
highlighted content, cells adjacent to hidden cells have a thin white border.

To unhide rows or columns.


1. Select the columns or rows on both sides of the hidden column(s) or row(s).
2. Right-click the selection, and then click Unhide.

GBHS DSCHANG Page 221


READERS ARE LEADERS

Or
1. Select the rows or columns on both sides of the hidden rows or columns.
2. On the Home tab, in the Cells group, display the Format list.
3. In the Visibility section of the Format list, point to Hide & Unhide, and then click Unhide
Rows to display the hidden row(s) or Unhide Columns to display the hidden column(s).

To hide a worksheet
➜ Right-click the worksheet tab, and then click Hide.

To display a hidden worksheet


1. Right-click any visible worksheet tab, and then click Unhide.
2. In the Unhide dialog box, select the worksheet you want to display, and then click OK.

Error Types: Certain types of errors happen in excel because of one of the following reasons.
Type When It Happens
#DIV/0! When you divide by ZERO
#N/A! When a formula or a function inside a formula cannot find the referenced data.
#NAME? When the text in a formula is not recognized.
#NULL! When a space was used instead of a comma in formulas that reference
multiple ranges. A comma is necessary to separate range references.
#NUM! When a formula has numeric data
#REF! When a reference is invalid.
#VALUE! When the wrong type of operand or function argument is used
########### When a number too big

GBHS DSCHANG Page 222

You might also like