Computer Generations and Types Explained
Computer Generations and Types Explained
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.
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.
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.
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).
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.
3- Purpose
Here they are grouped as special and general purpose computers.
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.
• 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.
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
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.
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
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.
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
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.
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.
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.
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.
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.
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,
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.
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
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.
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.
- 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.
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.
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.
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,
Examples; Examples;
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
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.
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.
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
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).
Human expert ES
Perishable Permanent
Difficult to transfer Transferrable
Difficult to document Easy to document
Unpredictable Consistent
Expensive Cost effective system
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,
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
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.
Liteware: This is the free version of a program, that does not contain those features that are
attractive to frequent or heavy user.
Retail Software: While shareware is provided as a trial version to users, retail software is sold
to end users.
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 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.
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
Control Unit,
ALU &
Registers
- 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
• 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.
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.
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:
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
• 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).
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:
- 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 coupler includes a man machine interface to perform the following features:
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.
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.
element to operate on single data stream i.e. one operation at a time. Old PCs,
mainframe computers or Macintosh is of this type.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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
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)
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.
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
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.
- 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.
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.
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.
OR Gate circuit
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.
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
The exclusive-OR gate and the exclusive-NOR gate are denoted by Θ and ʘ respectively. In
addition, these gates perform the following Boolean functions.
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.
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
|
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
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.
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.
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.
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.
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.
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.
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,
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.
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.
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:
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:
Here, the program Pay010 has keyboard input, and produces output on the monitor and
printer.
Field works
- Visiting institutions and making appraisals of there IS.
- Visiting institutions using systems for general and specific purposes.
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.
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.
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.
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.
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)
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
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.
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
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.
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.
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.
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.
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.
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.
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.
expensive to build and manage than private networks based on proprietary protocols e.g.
companies, military, secret services like MI5 and CIA, etc.
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.
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.
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.
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
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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
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.
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).
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.
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.
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.
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.
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.
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.
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.
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;
flat file database, relational database, hierarchical database, object-oriented database, network
and multi-dimensional databases.
Example
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.
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
Network Database: This is similar to hierarchical except that a child node may have more
than one parent in a many-to- many relationship.
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.
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.
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.
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.
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).‖
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.
Tournament Winners
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
Update anomalies cannot occur in these tables, which are both in 3NF.
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.
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;
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;
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.
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) …
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
.
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. …………………………..
c. Subtraction
Rules for subtraction:
0‐0=0
0‐1=1
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
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
⁄ ⁄
1101.0112 = 13.37510
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.
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.
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,
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.
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
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
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).
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
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).
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
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".
+
(14)
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.
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
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.
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.
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.
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.
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)?
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.
Start or End
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
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.
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
.
+x
End
Instruction 2 False
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: 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.
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
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.
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
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.
- 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.
- 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.
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.
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
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
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
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.
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.
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
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.
#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
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;
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.
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.
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.
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>
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;
}
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:
{
/* 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.
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);
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.
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 */
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");
}
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.
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);
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;
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.
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.
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].
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.
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”.
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;
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 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:
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
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.
- 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.
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.
Examples
1. The following table shows the expected duration of each task. The task dependencies are
shown.
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
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.
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.
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.
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.
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.
Breakdown Structure: These are structures that are commonly associated with project
management. There are Work Breakdown Structure, Product Breakdown Structure, and
Hybrid Breakdown Structure.
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"
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.
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).
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.
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.
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