0% found this document useful (0 votes)
16 views50 pages

Intro To SE Lecture Notes 1 (Chapters 1-3)

introduction to software engineering

Uploaded by

ruhamadana.111
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
16 views50 pages

Intro To SE Lecture Notes 1 (Chapters 1-3)

introduction to software engineering

Uploaded by

ruhamadana.111
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 50

CHAPTER 1

Overview of Computers and the Computer System


1.1 Overview of Computers

1.1.1 What is a computer?


An electronic system that can be instructed to accept, process, store, and present data
and information. It is an electronic device that accepts data, performs computations,
and makes logical decisions according to instructions that have been given to it; then
produces meaningful information in a form that is useful to humans. The name
computer comes from a Latin word Computer, meaning, “to compute”

1.1.2 Characteristics of Computers


The characteristics of a computer show the capability and the potential of the computer for
processing data. This saves time, space, money, labors etc. And they answer the questions
why computers are used? Why have they become so popular?
1. Speed: The ability of the computers to carry out their instructions in a very short
period of time is one of the main reasons for their popularity. Computers can
perform within a matter of seconds or minutes tasks that would be
impossible for a person to complete by hand in lifetime.
Processing speed is measured in Hertz, a unit used in the definition of frequency. i.e
Its speed is measured by the amount of time it took to perform or carry out a
basic operation. Common units are in terms of micro second (10-6 one millionths),
nano second (10-9 one billionths), and Pico second (10 -12 one trillionths). Hence a
computer with speed 1 microsecond can perform 1 million instructions in just 1
second. For example in one second this computer can perform the following
tasks:
Compute the grade point average for 3000 students, Calculate the total value of all
books used by students in a university,…
Remark: is usually the concern of CPU.
2. Accuracy: Now days computers are being used life-and-death situations (For example,
jet pilots rely on computer computations for guidance, Hospitals rely on patient-
monitoring systems in critical –care units) which needs almost hundred percent accuracy.
Introduction To Computing and Software Engineering 1 Compiled by:
Tesfaye M
From this we can understand that computer is accurate and consistent. Unless there is an
error in the input data or unreliable program the computer processes with a very
accurate.
3. Capacity: The ability of computers to store and process vast amounts of data continues to
grow. A computer operating at 200 MHz can move data from one location to another at a
rate excess of 1.2 billions characters (symbols) per second.
Remark: is usually the concern of Memory: RAM, Hard Disk.
4. Versatility: Because of technological advancements in the computer industry, most
computers today are considered to be general-purpose computers That is both their
computation and input/output processing capabilities are such that they can be used
for almost any type of application. For example, the same computer that is used to
handle engineering company’s mathematics, and design computations can also be
efficiently used by the company to track inventory, process payroll, project earnings,
and fulfill all its reporting needs.
Today’s computers are versatile in what they can do; computers and their components part
being used in application never before envisioned. For example; in home appliances
(washing machines, ovens) home entertainment centers, traffic lights, automobiles, banking,
assembly plants, space probes, art, music, education, hospitals, and agriculture, to name few.
The versatility of the computers and its use in a wide array of application are limited only by
the imagination of the human mind.
Note: Even if the above main characteristics of computers are increasing with time, the cost
and size of computers are decreasing.
Durability and Reliability: are durable and extremely reliable devices. They can operate error-
free over long periods of time.

1.1.3 Application of Computers

Why we use Computers?


The following are some of the capability of Computers, which are reasons to use
them.
 Store and process large amount of information with high speed and accuracy;
 Transmit information across continents via communication channels
 Simulate events
 Perform complex mathematical computations and make comparisons
 Monitor ongoing industrial operations
Introduction To Computing and Software Engineering 2 Compiled by:
Tesfaye M
 Perform repetitive processes with great ease, speed, and reliability
 Therefore, computers are applicable for any functions or process that requires
these abilities.
The main areas of computer applications can be listed as follows:
Learning Aids:
Examples: learning toys, programs range from simple arithmetic to calculus, from
English grammar to creative writing and foreign language, and from basic graphics to
engineering design models,)
Entertainment:
Example : Games
Commercial or Business Applications
Computers are needed to perform business operations that require handling large
amounts of data. Several computer applications are available to assist business in
working with large volumes of data.
Examples are: Text processing, Accounting and Finance management,
Inventory control,…
Scientific – Engineering and Research Applications
� Using computers for scientific research, complex mathematical calculations,
design work, and analysis and control of physical system
Banking and Services: eg. Teller Machine (customers are issued cards that permit them
to use other banks teller machine’s). Online banking (A bank customer can use his/
her computer to check account balances, transfer funds, pay bills)
Shopping from Home: Individual may now shop by computer in the comfort of their home.
Household Control: A growing number of the newer houses hold devices are
computers controlled. For example: Security systems, refrigerators, microwave ovens,
washers, stereos, and televisions. This computer controlled home security system
monitors movements, broken glass, unlawful entry without a security code, and so
on, and alerts the local police department.
Weather and Environment
Computer equipment may show temperature ranges , precipitation levels and wind
flow and can used in weather forecasting. Computer can also helped in overcoming
environmental hazards.
Transportation

Introduction To Computing and Software Engineering 3 Compiled by:


Tesfaye M
Computers have affected almost every kind of transportation. Many aircraft can fly
under the control of the computer; in this situation, the captain simply serves as a
manger by telling the computer what to do. In Cars, computers have provided
functional controls such as spark and fuel control.
Medical and Health Care
Computers have long been used by hospitals for routine record keeping. Today,
however, many people owe their lives to the computer. Computers are used in
hospitals as sensors (device that detect changes in blood pressure, heart rate,
temperature), testing…
Communication: Basic need for most human activities
Tarditional- telephone, fax, mail...
In the new information era- e-mail, internet, video conferencing
The new communication technology enables people located in different places to work together as
if they were in the same office. Big multinational companies are already exploiting this technology
to achieve better use of the resources of their seperate offices. In this way projects can be shared
between officeswith the application of the best expertise, and around the clock

Related Iessues:On-line services, Internet distance learning, E-business,


Teleworking...

Introduction To Computing and Software Engineering 4 Compiled by:


Tesfaye M
1.1.4 Generation of Computers
Although computer professionals do not agree on exact dates or specifics, computer
developments are often categorized by generations. Actually there are four generations and
major characteristics that distinguish these generations are the following;
 Dominant type of electronic circuit elements used.
 Major secondary storage media used.
 Computer language used.
 Types or characteristic of operating system used.
 Memory access time (time to store or retrieve a word or data from memory).
Computer generations are usually categorized by dramatic improvement in the hardware,
typically refold or better increases in speed and reliability.
First Generation (1950s)
 Used vacuum tubes as components for the electronic circuit.
 Punched cards were the main source of inputs, and magnetic grams were used for
internal storage.
 Operate in a speed of milliseconds (thousands of a second) and could handle more
than 10,000 additions each second.
 Most applications were scientific calculations.
Has lot limitations.
Second Generations (Early 1960s)
 Transistors were the main circuit components. (Transistors are a solid state device
made from silicon which is smaller, cheaper, faster, dissipate less energy and more
reliable than vacuum tube but work in the same way with the vacuum tube.)
 Invented by Bell Labs.
 Magnetic tapes (similar with home tape caste), used for main storage,
 Operate in microseconds (millionths of a second) with more than 200,000 additions possible
each second.
 Business applications become more commonplace, with large data files stored on magnetic
tape and disk.
 High-level languages COBOL and FORTRAN were introduced during this period.
Batch operating systems are used that permitted rapid processing of magnetic tape
files.

Introduction To Computing and Software Engineering 5 Compiled by:


Tesfaye M
Third Generation (Late 1960s, Early 1970s)
 Characterized by solid-state logic and integrated circuit (IC). (A single, self-contained
transistor is called discrete component. In early 1960 electronic equipment composed of
discrete components transistors, capacitors, resistors, …. They are manufactured
separately
 Packed in their own containers and soldered (wired together) on a circuit board. So the entire
manufacturing process was cumbersome and expensive. Do to these and other problems in 1958
the achievement that revolutionized electronics started the era of microelectronics: the invention
of integrated circuit
 Computer storage switched from magnetic cores to integrated circuit boards that
provide modularity (expandable storage) and compatibility (interchangeable equipment
New input/output methods such as optical scanning and plotters.
 Software become more important with sophisticated operating systems, improved
programming languages
Fourth Generation (Late 1970s, Early 1989s)
 Greatly expanded storage capabilities and improved circuitry.
 Has a large-scale integrated circuits (LSI) which has several hundred thousands transistors
placed on one tiny silicon chip.
 Computer memory operates at speeds of nano seconds (billionths of a second) with large
computers capable of adding 15 million numbers per second.
 The introduction and popularity of networking
The fifth one is in progress and no border line with the fourth one. An architecture, which makes
use of the changes in technology and allows a simple and natural methodology for solving
problems, is being sought. These computers will have intelligent processors i.e., processors which
can draw inferences. Users will also be able to interact with them in natural languages such as
English.
Summary of 1st 2nd 3rd 4th
generation of
computers
Circuit element Vacuum tube Transistor IC LSI /VLSI
SSD Punched Magnetic Magnetic Mass storage device
card Tape disk
Language Machine & Fortran, Structured Application oriented
assembly COBOL etc language
Operating Operator Batch system Application Time sharing
system control oriented
Introduction To Computing and Software Engineering 6 Compiled by:
Tesfaye M
Memory Access 1ms 10μs 10ns 1ns
time

1.1.5 Types of Computers


Computers come in four sizes:
a. Microcomputers

A relatively compact type of computer, the most common of all, easily outsells all
other types of computers annually for use in business and at home.
Different types of Microcomputers:
Desktop Computers, Notebook Computers/Laptop Computers, Tablet PCs, Personal Digital
Assistants, Palm PCs
b. Midrange(Mini) computers

A computer uses to interconnect people and large sets of information. More powerful
than a microcomputer, the minicomputer is usually dedicated to performing specific
functions.
c. Mainframes
d. Supercomputers

The most powerful of all computers, supercomputers were designed to solve problems
consisting of long and difficult calculations.
1.2 The Computer System
Objectives: What a computer system is and how it works to process data

1.2.1 Computer Hardware


System is a group of components, consisting of subsystems or procedures that work in a
coordination fashion to achieve some objective. A computer system composed of components
that are classified either as Computer hardware or Computer software.
Computer hardware is the physical part of the computer that you see, you use to and the parts
you can touch. The computer and its associated equipment. The hardware part of a
computer system is composed of a number of interacting physical parts based on the need of the
information flow.
Introduction To Computing and Software Engineering 7 Compiled by:
Tesfaye M
The Central Processing Unit
In order to able to do its tasks the CPU needs to temporarily store some data to remember
the location of the last instruction to store instruction and data temporarily while execution
in other words, the CPU needs a small internal memory called registers.
The Arithmetic Logical Unit (ALU): It performs the arithmetic calculations of addition,
subtraction, multiplication and division and comparisons and it is used to keep track of and
execute instruction.
All modern digital computers can do is addition; multiplication is merely a continuous addition;
subtraction is the addition of the complements of the number to be subtracted; division is the
addition of complements.
Registers are paths or conduits that connect the Arithmetic Logical Unit to the main memory.
When an instruction loaded from main memory, it is placed first in the register to wait
instructions from the control unit. Data are also stored in registers prior to execution in the
ALU.
The Control Unit: As the name implies, it performs all the control functions of the computer. It
retrieves the instruction from memory. Translates those instructions into computer functions
and sends signals to other computer hardware units to carry out those functions. It is also
responsible for determining the next instruction to be executed by the computer.
Main Memory or Primary Memory or RAM
Is that the memory which is directly accessible by the control unit and ALU; Usually referred as
Random Access Memory (RAM), because each memory location can be accessed without having
to work sequentially through hundreds or even thousands of memory locations called
addresses; Each memory location can be referred by its memory location (address). Holds
instructions and data elements which are currently used by the computer.
The data in the main memory while be lost when the power is off;
Parts of the CPU may also contain Read Only Memory (ROM).
This type of memory is integrated into the circuitry of the computer and cannot be altered
without altering the computer circuitry;
Used to store programs and data those are used frequently and permanently
Due to high price of a primary storage memory of a computer system, the need to have other
type of storage to hold large amount of data in a less expensive and yet accessible manner is
evident. Hence secondary storage device were created with this need in mind.
Input Unit
Is the unit used to enter data into the computer so that it can be processed.

Introduction To Computing and Software Engineering 8 Compiled by:


Tesfaye M
It converts information from a form suitable to human beings to one understandable by the
computer.
Examples of input devices:
Keyboard (which is the most widely used input devices)
Disk derives (floppy and hard-disk derives)
Mouse, Scanner
Light pen (a photo cell to choose a displayed response to request further information).
Voice synthesizer
CD-ROM Drive, etc.
It is intensively used by U.S. banking industry to input information on checking account
transactions. It has been in use since the 1950s, allows checks and deposit slips to be read
both by people and by machines. The machines, called magnetic ink
OUTPUT UNIT
Used to retrieve information out of a computer so that it can be examined, analyzed or
distributed to others.
Convert the result of the only-machine understandable form to a form understandable by
human beings.
Examples
The Visual Display Unit (VDU) or monitor or screen
Printers (dot matrix, desy wheel, laser printers)
Plotters
Voice (audio) response unit
Disk drives
We have seen that there are different components of a computer and each performs a specific
function. But to perform a given task in synchronized form there should be some 2 Optical
Recognition Systems Interconnecting Components in a Macro Computer and Information
Movement in a Computer System.

Introduction To Computing and Software Engineering 9 Compiled by:


Tesfaye M
An electronic circuit which produces communication path between the different components of
a computer system along which data are transferred is Bus. The bus, which communicates the
different parts of the CPU is called Internal Bus. And the bus, which communicates the CPU
with memory and peripheral devices is called External Bus. The size of the bus determines the
speed of efficiency of the computer.
Address Bus: - is a unidirectional bus over which digital information is transferred to identify
either a particular memory location or particular I/O address.
Data Bus: - a bus system which interconnects the CPU, memory and all the peripheral Input /
Output devices of a computer system for the purpose of exchanging data.
Control Bus: - a bus used to select and enable an area of main storage and transmit signals
required to regulate the computer operation.
Secondary Storage:- secondary storage or auxiliary storage, can take many forms, which have
traditionally included punched cards, papers tape, magnetic tape, magnetic disk and magnetic
drum.
Magnetic Tapes
Magnetic tapes are a particularly popular form of secondary storage because of their high data
density (the number of bytes of instruction per inch of tape) and their convenience in handling.
Magnetic tapes are approximately one - half inch wide are made of Mylar – based plastic film
which can be magnetized. Data are stored on a magnetic tape by running the tape over the
electromagnetic called read/write head which magnetizes small spots on the tape. Seven-track
tapes store information as bytes of information, where each byte consists of a six-bit code and a
one-bit parity bit. Nine-track tape use an eight-bit and a parity bit. Random Processing Medias
Magnetic disks
Magnetic disks are metals or plastic platters coated with ferrous oxide, an easily magnetizable
material. Magnetic disks allow for random access of information and overcome the slow access
time commonly found in tape files.

1.2.2 Computer Software

The computer hardware is an electronic device which has the potential of performing
the task of solving a problem. However one has to give precise instructions to the
hardware in order to solve problem.
The finite set of instructions (steps) that the computer follow to perform a given job is
called a program.
Any program to be executed first it should reside / loaded/ in the memory.
Introduction To Computing and Software Engineering 10 Compiled
by: Tesfaye M
Software:- is a collection of programs and routines that support the operations of
performing a task using a computer. Software also includes documentations, rules
and operational procedures. Software makes the interface between the user and the
electronic components of the computer.
Computer software is classified into two
1. System software
2. Application software
3.2. 1.SYSTEM SOFTWARE

� Constitutes those programs which facilitates the work of the computer hardware.
� It organizes and manages the machine’s resources handles the input/output devices.
� It controls the hardware by performing functions that users shouldn’t have to or are
unable to handle.
� System programs make complex hardware more users friendly.
� It acts as intermediate between the user and the hardware.
�IIt enables the computer understand programming languages i.e. it serves as means
of communication between user and a computer.
The important categories of system software are:
a) Operating System
B) Language Software
a) Operating system
Operating system coordinates the activity between the user and the computer. An
operating system has huge tasks/ functions. These include:
Controlling operations (control program )
� Coordinates, or supervises the activity of the computer system.
� Decides where programs and data should be stored in the computer memory.
� Handles communications among the computer components, applications software
and the user.
� Controls the saving and retrieving of files to and from disks in the disk drive.
� It performs all its controlling tasks without the involvement or awareness of the
user.

Introduction To Computing and Software Engineering 11 Compiled


by: Tesfaye M
ii. I
Input/output Management
� The I/O manager coordinates the computers communication with outside world,
flow of data to the display screen and other output devices (printers/ plotters) and
from the key board or other input devices.
� Handles the flow of data to and from the disk drives (file management).
� Handles the process of preparing a disk for use, the copying, renaming, erasing task
of a file.
iii. Command Processing ( command Interpreter):
It interprets the commands or what you enter using the keyboard or other input
devices.
� If you write an internal command it carries out the function of that command if it is
external command or other executable file it searches for the corresponding file in
the default (current disk) or the user specified disk, loads the file into memory and
transfers control to that program. Once this program is terminated, control returns
to command.com and the program for that command or file is discarded from
memory.
Types of Operating Systems
Operating systems can be classified by:
� The number of programs they can handle at a time and
� The number of users they serve at once at one or different stations (i.e. terminals
or micro-computers connected to a central computer).
Single tasking operating systems: With single tasking operating systems only one
program can be run on a computer at a time.
� In order to run another program, one must remove the first program loaded in the
computers main memory and load the other one(i.e. it can’t handle two or more
programs at a time)
� These types of operating systems are single user or can serve only one user at a
time.
ii. Multi User Operating System : It supports a number of work stations connected
to a central system.
� A number of users can use the resources of one high capacity computer by the help
Introduction To Computing and Software Engineering 12 Compiled
by: Tesfaye M
of terminals.
iii. Real Time Operating System: A real time is a system that is capable of processing
data so quickly that the results are available to influence the activity currently
taking place.
Example: - Air plane seat reservations and computer controlled plant.
- Its primary characteristics is that it responds to an event within a well
defined time.
B) Language Software
- Are software which are used by programmers to develop application softwares
and translate programs to machine code.
- Language software is a generic name consisting of various programs that serve
as editors & translators to develop programs in a number of programming
languages.
- Includes:- Translators, general purpose routines and utilities & high level
languages
♦ Translator:- is a program that converts one or more languages to another
language. Three types of translators are assemblers, Compilers & interpreters.
♦ Assemblers:- is a program that translates assembly languages into machine
code.
♦ Compiler:- is a program that translates a high level language into machine code.
(Pascal, Fortran Cobol)
♦ Interpreter:- is a program that translates each instruction of high level language
& executes the instruction before translating the next instruction.
♦ The general-purpose routine and utilities include programs which are used to
handle file processing, editing and debugging.
♦ High level language software are software which have their own compilers to
detect syntax errors of the users program code. Example Cobol, Fortran, Pascal.
Etc.

Introduction To Computing and Software Engineering 13 Compiled


by: Tesfaye M
2. APPLICATION SOFTWARE

�Is a software that is designed to perform tasks for the specific area or areas. But for
use in more than one installation.
� Are usually called application packages as they may include a number of
programs along with operating instruction, documentation and so forth.
� Depending on their function or task they are categorized in to the following.

1.Word Processors/ Word processing

- is a computerized typewriter which permits the electronic creation, editing,


formatting, filing and printing text.
- Is the most common application of microcomputers.
- Until recently, word processing could be done only dedicated word processors. A
dedicated word processor is a computer that denies its users the opportunity to
execute any other program. Example: WordStar, WordPerfect, Microsoft word,…
2. Spreadsheet

- is an electronic worksheet display on the VDU.


- Until recently, financial analysis and other mathematical calculation were done by
entering numbers on pages of an accountants ruled ledger pad.
- You can quickly create a model of a situation on a spreadsheet by entering labels,
numbers & formulas.
- Using the programs built-in function you can perform complicated calculations
such as net percent value, internal rates of return, and monthly payments on a loan.
Example: Lotus 1-2-3, Microsoft Excel, Quatropro
3. Database Management System.

Allow you to store information on a computer, retrieve it when you need it and
update it when necessary. You can do this with index cards, but database

Introduction To Computing and Software Engineering 14 Compiled


by: Tesfaye M
management programs do them more quickly and easily.
Example: You can store large mailing list, inventory record or billing and collect
information in lists stored in files and manipulate this information, one file at a time
with database management program. You can record or create a database about
employee information as

Name, sex, Marital status, salary, Date of Birth, Date of employment, Post,
Department Level of education, Field of study etc.
Then you can ask the computer the following question
- How many female workers are there?
- List employees with a salary of birr 500 and above
- List those employees who are department head and have Bachelor degree or higher
and so on.
Example: Dbase IV, FoxPro, Microsoft Access.

Introduction To Computing and Software Engineering 15 Compiled


by: Tesfaye M
Chapter 2
Introduction to Computing and Software Engineering
2.1 Computer Science and IT as Disciplines
2.1.1 What is Computer Science?

 NOT about coding or hardware or software!

 Computer Science is the study of computers (??)

This leaves aside the theoretical work in CS, which does not make use of real
computers, but of formal models of computers
A lot of work in CS is done with pen and paper!
Actually, the early work in CS took place before the development of the first
computer
Computer Science is no more about computers than astronomy is about telescopes,
biology is about microscopes, or chemistry is about test tubes. Science is not about
tools. It is about how we use them, and what we find out we can do.
 Computer Science is the study of how to write computer programs
(programming) (??)
Programming is a big part of CS…but it is not the most important part.
 Computer Science is the study of the uses and applications of computers
and software (??)
Learning to use software packages is no more a part of CS than driver’s education
is part of automotive engineering.
CS is responsible for building and designing software.
 The study of algorithms:

a. Their formal properties:

 correctness, limits

 efficiency/cost
b. Their hardware realizations:

 computer design
c. Their linguistic realizations

Introduction To Computing & Software Engineering 1


Compiled by: Tesfaye M.
 programming languages
d. Their applications

 network design, ocean modeling, bioinformatics, ...

 a well-defined procedure that allows an agent to solve a problem.

 Computer Science is about PROBLEM SOLVING

 Computer Science is about DEVELOPING ALGORITHMS to solve complex


problems
 Computers are merely tools for solving problems!

 Computer Science is a science concerned with information i.e. representation,


storage, manipulation or processing and presentation of information. Like any
other science, which uses some devices for the practical aspect, computer
Science uses a special device called COMPUTER.
 is the systematic study of the feasibility, structure, expression, and
mechanization of the methodical processes (or algorithms) that underlie the
acquisition, representation, processing, storage, communication of, and access
to information, whether such information is encoded in bits and bytes in a
computer memory or transcribed in genes and protein structures in a human
cell. The fundamental question underlying all of computing is: what
computational processes can be efficiently automated and implemented?
 Well-developed, organized approaches to solving complex problems

 Test of a good algorithm:

o Does the algorithm solve the stated problem?

o Is the algorithm well-defined?

o Does the algorithm produce an output?

o Does the algorithm end in a reasonable length of time?


Computer science has different fields of specialization or sub-disciplines like other
sciences. These are sub-disciplines of computer science:
Software Engineering: It is concerned about the development of better quality
software by applying scientific & basic engineering principles. Software
engineering is concerned with theories, methods and tools for professional
software development.

Introduction To Computing & Software Engineering 2


Compiled by: Tesfaye M.
Computer Engineering (Architecture): deals with studying, analyzing and
designing of computer hardware (organization and interconnection of computer
system components) and its working principle.
Automata theory: Is the study of machines or devices which accept a certain inputs
such that the output or at least the probabilities of outputs are determined by the
input.
Formal Language Theory: Embraces the study of programs of programming
languages, which is important for the understanding, and construction of
compilers.
Complexity theory: Concerned with the study and analysis of algorithms, which
helps in measuring the efficiency of the algorithms.
Database Architecture: Involves the study and design of efficient methods for
information storage, process & retrieval.
Artificial Intelligence: Is concerned with means by which computers may perform
tasks that would be characterized as intelligent if performed by human beings.
2.1.2 What is IT? Components of IT, Functions and application of IT, Data and
Information
A. IT
Any tool for manipulating data, information
- electronic: computer software and hardware - our focus
is the hardware and software that make information systems possible.
: A term used to refer to a wide variety of items and abilities used in the creation,
storage, and dispersal of data and information. Its three main components are
computers, communications networks, and know-how.
B. Components of IT
1. Computers
2. Communications networks
• A set of locations, or nodes, consisting of hardware, programs, and
information linked together as a system that transmits and receives data and
information.
3. Know-how
• The capability to do something well.

Introduction To Computing & Software Engineering 3


Compiled by: Tesfaye M.
• Information technology know-how consists of:
– Familiarity with the tools of IT; including the Internet
– Possession of the skills needed to use these tools
– An understanding of when to use IT to solve a problem or create an opportunity
• System: A set of components that interact to accomplish a purpose.
• Information System: A business information system designed to produce the information
needed for successful management of a structured problem, process, department, or
business.

C. The Principles of Information Technology

1. Helping People

2. Solving Problems
– Problem: A perceived difference between an existing condition and a
desired condition.
– Problem Solving: The process of recognizing a problem, identifying
alternatives for solving it, and successfully implementing the chosen
solution.
3. Improving Our Lives

D. Data & Information


Data: Raw facts, figures, and details.
Introduction To Computing & Software Engineering 4
Compiled by: Tesfaye M.
The source of data can be primary or secondary based on its origin.
Information: An organized, meaningful, and useful interpretation of data.
Should be delivered to the right target at right time.
Remark: The one information/ primary for someone can be data/ secondary for
others.
Knowledge: An awareness and understanding of a set of information and how that
information can be put to the best use.

Data - Information – Knowledge – Wisdom

Fig 2-2: Data, Information, Knowledge and Occupations

 Knowledge
 Created based on the information/data or own expertise
 Answers How?
 Is dynamic & context based
 Helps in decision making

 Wisdom
 Gives detailed understanding
 Arriving at the judgment
 Helps finalize future decisions/actions

2.2 Software Engineering as a Discipline

 Systematic approach for developing software!

Introduction To Computing & Software Engineering 5


Compiled by: Tesfaye M.
 Methods and techniques to develop and maintain quality software to solve
problems. !
 Study of the principles and methodologies for developing and maintaining
software systems.
 Issues addressed by Software Engineering
 How do we ensure the quality of the software that we produce?!
 How do we meet growing demand and still maintain budget control?!
 How do we avoid disastrous time delays?!
 Size of programs continues to grow!
 Trivial: 1 month, 1 programmer, 500 LOC,!
Intro programming assignments!
 Very small: 4 months, 1 programmer, 2000 LOC!
Course project!
 Small: 2 years, 3 programmers, 50K LOC!
Nuclear power plant, pace maker!
 Medium: 3 years, 10s of programmers, 100K LOC!
Optimizing compiler!

2.2.1 Software

Software is defined as a collection of programs, procedures, rules, data and


associated documentation. The s/w is developed keeping in mind certain h/w and
operating system consideration commonly known as platform and engineering
means systematic procedure to develop software. Some of the software
characteristics are, it can be engineer or developed and second thing is software is
complex in nature.
Software cannot be built fast enough to keep up with!
 H/W advances!
 Rising expectations!
 Feature explosion!: Increasing need for high reliability software
Important of software are due to much reason as it is used in:
i) Business decision making
eg.- accounting s/w, billing s/w
ii)For scientific research & engineering problem solving.
eg.- weather forecasting system, space research s/w
Introduction To Computing & Software Engineering 6
Compiled by: Tesfaye M.
iii)It is embedded in multifunctional systems such as medical, telecom entertainment
etc.
Eg-s/w for medical patient automation, s/w of GSM/CDMA service provides.
Software Quality
Several quality factors associated with software quality are as following:
Portability: A software product is said to be portable, if it can be easily made to
work in different operating system environments, in different machines, with other
software products, etc.
Usability: A software product has good usability, if different categories of users (i.e.
both expert and novice users) can easily invoke the functions of the product.
Reusability: A software product has good reusability, if different modules of the
product can easily be reused to develop new products.
Correctness: A software product is correct, if different requirements as specified in
the SRS document have been correctly implemented.
Maintainability: A software product is maintainable, if errors can be easily
corrected, new functions can be easily added to the product, and the functionalities
of the product can be easily modified, etc.
Types of software:-
Computer s/w is can be divided into two types.
a) System s/w
. System s/w includes the operating system & all the utilities to enable the computer
to run. Eg. Windows operating system
b) Application s/w
Application s/w consists of programs to perform user oriented tasks. eg -word
processor, database management. Application s/w sits about the system s/w because
it needs help of the system s/w to run.

Program Vs Software Product


Programs: Set of instructions related to each other.
Products: Collection of program designed for specific task.
Programs are defined by individuals for their personal use.
A sum product is usually developed by a group of engineers working as a team.
Program Product
Usually small size …………………………..Usually large size.
Single user……………………………………Large no of users.
Single developer ……………………………Team of developer.
Introduction To Computing & Software Engineering 7
Compiled by: Tesfaye M.
Lack proper documentation……………….Good documentation support.
Adhoc development………………………..Systematic development.
Lack of UI……………………………………Good UI
Have limited functionality………………...Exhibit more functionality

Types of software products


Generic products: This type of software product are developed by an organization
and sold on open market to any customer eg. System software, application software
Customized (or bespoke) products: This type of software products are developed
by a software contractor and especially for a customer.
Embedded Product: Combination of both hardware and software

2.2.2 Why is software engineering needed?

The economies of ALL developed nations are dependent on software. More and
more systems are software controlled
Software engineering is concerned with theories, methods and tools for professional
software development. Software engineering expenditure represents a significant
fraction of budget in all developed countries. More and more, individuals and
society rely on advanced software systems. We need to be able to produce reliable
and trustworthy systems economically and quickly.
It is usually cheaper, in the long run, to use software engineering methods and
techniques for software systems rather than just write the programs as if it was a
personal programming project. For most types of system, the majority of costs are
the costs of changing the software after it has gone into use.
All software engineers use tools, and they have done so since the days of the first
assemblers. Some people use stand-alone tools, while others use integrated
collections of tools, called environments. Over time, the number and variety of tools
has grown tremendously. They range from traditional tools like editors, compilers
and debuggers, to tools that aid in requirements gathering, design, building GUIs,
Introduction To Computing & Software Engineering 8
Compiled by: Tesfaye M.
generating queries, defining messages, architecting systems and connecting
components, testing, version control and configuration management, administering
databases, reengineering, reverse engineering, analysis, program visualization, and
metrics gathering, to full-scale, process centered and software engineering
environments that cover the entire lifecycle, or at least significant portions of it.
Indeed, modern software engineering cannot be accomplished without reasonable
tool support.
The role of computers, their power, and their variety, are increasing at a dramatic
pace. Competition is keen throughout the computer industry, and time to market
often determines success. There is, therefore, mounting pressure to produce software
quickly and at reasonable cost. This usually involves some mix of writing new
software and finding, adapting and integrating existing software. Tool and
environment support can have a dramatic effect on how quickly this can be done, on
how much it will cost, and on the quality of the result. They often determine
whether it can be done at all, within realistic economic and other constraints, such as
safety and reliability. Software engineering tools and environments are therefore
becoming increasingly important enablers, as the demands for software, and its
complexity, grow beyond anything that was imagined at the inception of this field
just a few decades ago.
 To predict time, effort, and cost!
 To improve software quality!
 To improve maintainability!
 To meet increasing demands!
 To lower software costs!
 To successfully build large, complex software systems!
 To facilitate group effort in developing software!

It is clear that software is important:


Critical applications: Software has found its way into many applications where
failure has serious consequences. For example: car braking and steering, process
control, safety systems in hazardous processes, civilian avionics, communication
networks and telephony, . . .
Competitiveness: Software is seen as the key to competitiveness in many areas. In
retail, finance and entertainment, e-commerce is seen as a critical development; in
many other areas of economic activity good software is seen as a key element in the
competitiveness of firms.
Introduction To Computing & Software Engineering 9
Compiled by: Tesfaye M.
Economically: The estimated value of systems containing embedded software will
exceed 1012 dollars in the next few years. This is only one market for software, there
are many others.
This does not mean Software Engineering is important at the moment. Critics point
to well-publicized failures to supply well-engineered software systems by suppliers
who do attempt to use best practice.
These well-publicized failures mask many projects that are successful and are
delivered on time and on price. We can argue that the aims of Software Engineering
are important and in some contexts those aims can be realised.
Software Engineering
Application of engineering for development of software is known as software
engineering. It is the systematic, innovative technique and cost effective approach to
develop software. And person involved in developing software product is called
software engineer. S/w engineer is a licensed professional engineer who is skilled in
engineering discipline.
Qualities / Skills possessed by a good software engineer:
1. General Skill (Analytical skill, Problem solving skill, Group work skill)
2. Programming Skill (Programming language , Data structure , Algorithm ,
Tools(Compiler, Debugger))
3. Communication skill (Verbal , Written, Presentation)
4. Design Skill (s/w engineer must be familiar with several application domain)
IEEE definition of Software engineering: A systematic, disciplined and quantifiable
approach to the development, operation, maintenance and refinement of software.
Factor in emergence of software engineering:
1. People who are developing software were consistently wrong in their estimation
of time, effort and cost.
2. Reliability and maintainability had difficulty of achieved
3. Fixing bugs in delivered software was difficult
4. Delivered software frequently didn’t work
5. Increased cost of software maintenance
6. Increased demand of software
7. Increased demand for large and more complex software system
8. Increasing size of software

2.2.3 SOFTWARE ENGINEERING PRINCIPLES

Introduction To Computing & Software Engineering 10


Compiled by: Tesfaye M.
Software engineering is a layered technology. The bedrock that supports software
engineering is a quality focus. The foundation for software engineering is the process
layer. Software engineering process is the glue that holds the technology layers
together and enables rational and timely development of computer software. Process
defines a framework for a set of key process areas that must be established for effective
delivery of software engineering technology. The key process areas form the basis
for management control of software projects and establish the context in which
technical methods are applied, work product (models, documents, data, reports,
forms, etc.) are produced, milestones are established, quality is ensured, and change
is properly managed.
Software engineering methods provide the technical how-to's for building software
that encompasses requirements analysis, design, program construction, testing, and
support.
Software engineering methods rely on a set of basic principles that govern each area
of the technology and include modeling activities and other descriptive techniques.
Software engineering tools provide automated or semi-automated support for the
process and the methods. When tools are integrated so that information created by
one tool can be used by another, a system for the support of software development,
called computer-aided software engineering (CASE), is established. CASE
combines software, hardware, and a software engineering database (a repository
containing important information about analysis, design, program construction, and
testing) to create a software engineering environment analogous to CAD/CAE
(computer-aided design/engineering) for hardware.

2.2.4 SOFTWARE CHARACTERISICS

Characteristics of s/w can be easily distinguished as of from the h/w. For hardware
products, it can be observed that failure rate is initially high but decreases as the
faulty components are identified and removed. The system then enters its useful life.
After some time (called product life time) the components wear out, and the failure
rate increases. This gives the plot of hardware reliability over time their
characteristic is like “bath tub” shape.

Introduction To Computing & Software Engineering 11


Compiled by: Tesfaye M.
On the other hand, for software the failure rate is at its highest during integration
and test. As the system is tested, more and more errors are identified and removed
resulting in reduced failure rate. This error removal continues at a slower pace
during the useful life of the product. As the software becomes obsolete no error
corrections occurs and the failure rate remains unchanged.
Therefore after analyzing the facts we can write the key characteristics as follows:-
a) Most s/w s are custom built rather than assembled from existing components.
b) s/w is developed or engineered not manufactured c) s/w is flexible d) s/w
does not wear out.

2.2.5 CAUSES AND SOLUTION FOR S/W CRISIS

Software engineering appears to be among the few options available to tackle the
present software crisis.
Let us explain the present software crisis in simple words, by considering the
following.
The expenses that organizations all around the world are incurring on software
purchases compared to those on hardware purchases have been showing a worrying
trend over the years
Organizations are spending larger and larger portions of their budget on software not only are the
software products turning out to be more expensive than hardware, but also presented lots of
other problems to the customers such as: software products are difficult to alter, debug, and
enhance; use resources non optimally; often fail to meet the user requirements; are far from being
reliable; frequently crash; and are often delivered late.
Due to ineffective development of the product characterized by inefficient resource
usage and time and cost over-runs. Other factors are larger problem sizes, lack of
adequate training in software engineering, increasing skill shortage, and low
productivity improvements.

S/W crisis from programmer point of view:


i) Problem of compatibility.
ii) Problem of Portability.
iii) Proclaiming documentation.
iv) Problem of pirated s/w.
iv) Problem in co-ordination of work of different people.
v) Problem of proper maintenance.
S/W crisis from user point of view:
Introduction To Computing & Software Engineering 12
Compiled by: Tesfaye M.
i) s/w cost is very high.
ii) Price of h/w grows down.
iii) Lack of development specification.
iv) Problem of different s/w versions.
iv) Problem of bugs or errors.
S/W Application: S/W applications can be grouped into 8 different areas as given
below.
System s/w, Real-time , Embeded , Business , PC , AI , Web-based, Engineering &
scientific s/w
S/W engineering processes:-
Process: The process is a series of states that involves activities, constraints,
resources that produce an intended output of some kind. Or it is a state that takes
some input and produced output
Software process: A s/w process is a related set of activities & sub processes that are
involved in developing & involving a s/w system. There are four fundamental
process activities carried out by s/w engineering while executing the s/w process are:
i) S/W Specification: The functionality of s/w & constraints on its operation must be
defined.
ii) S/W Development: The s/w that mixes the specification must be produced.
iii) S/W Validation: The s/w must be validated to ensure that it performs desired
customer activities.
iv) S/W Evolution: The s/w must evolve to meet changing customer needs with
time.
The s/w industry considers the entire s/w development task as a process according
to Booch & Rumbaugh. According to them a process defines who is doing what,
when & how to reach a certain goal.
Generic quality attributes in a software process:
1. Understandability
2. Visibility
3. Reliability
4. Robustness
5. Adaptability
6. Rapidity
7. Maintainability
8. Supportability
Software Project:
Introduction To Computing & Software Engineering 13
Compiled by: Tesfaye M.
1. A project is a temporary endeavor undertaken to create a unique product.
2. Temporary means every project has a definite beginning and a definite end.
3. Unique means the product must be different in some ways from all similar
products.
 Why is software development difficult?
 Personnel characteristics!
o Ability!, Prior experience, Communication skills, Team cooperation, Training!
 Facilities and resources!
o Identification!, Acquisition!
 Management issues!
o Realistic goals!, Cost estimation!, Scheduling!, Resource allocation!
o Quality Assurance!, Version Control!, Contracts,…

2.2.6 Frequently Asked Questions about Software Engineering


1. What is software?

Computer programs and associated documentation such as requirements, design


models and user manuals. Software products may be developed for a particular
customer or may be developed for a general market. Software products may be:
1. Generic: Developed to be sold to a range of different customers e.g. PC
software such as Excel.
2. Custom (Bespoke): Developed for a single customer according to their
specification.
New software can be created by developing new programs, configuring generic
software systems or reusing existing software.
2. What is the difference between software engineering and computer science?
Computer science is concerned with theory and fundamentals; software engineering
is concerned with the practicalities of developing and delivering useful software.
Computer science theories are currently insufficient to act as a complete
underpinning for software engineering (unlike e.g. physics and electrical
engineering).

3. What is the difference between software engineering and system


engineering?
System engineering is concerned with all aspects of computer-based systems
development including hardware, software and process engineering. Software
engineering is part of this process concerned with developing the software

Introduction To Computing & Software Engineering 14


Compiled by: Tesfaye M.
infrastructure, control, applications and databases in the system. System engineers
are involved in system specification, architectural design, integration and
deployment.

4. What is a software process?


A set of activities whose goal is the development or evolution of software. Generic
activities in all software processes are:
Specification: What the system should do and its development constraints
Development: Production of the software system
Validation: Checking that the software is what the customer wants
Evolution: Changing the software in response to changing demands.

5. What is a software process model?


A simplified representation of a software process, presented from a specific
perspective.Examples of process perspectives are: Workflow Perspective: Sequence
of activities, Data-Flow Perspective: Information flow. Role/Action Perspective:
Who does what?
Generic process models
 Waterfall
 Iterative development
 Component-based software engineering
 Spiral
6. What are the costs of software engineering?
Roughly 60% of costs are development costs, 40% are testing costs. For custom
software, evolution costs often exceed development costs. Costs vary depending on
the type of system being developed and the requirements of system attributes such
as performance and system reliability. Distribution of costs depends on the
development model that is used. Figure 2-3 shows the Cost Distribution of models.

Introduction To Computing & Software Engineering 15


Compiled by: Tesfaye M.
W at er fall m o del
0 25 50 75 10 0

Sp ec i f i c at i o n D esi gn D ev el o p m en t I n t egr at i o n an d t est i n g

I t er at iv e dev elo p m e n t

0 25 50 75 1 00

Sp ec i f i c at i o n I t er at i v e dev el o p m en t Sy st em t est i n g

Co m p o n en t - based so ft war e en g in e erin g

0 25 50 75 1 00

Sp ec i f i c at i o n D ev el o p m en t I n t egr at i o n an d t est i n g

D ev e lo p m en t an d ev o lut io n co st s fo r lo n g- lifet im e sy st em s
0 10 20 0 30 400

Sy st em dev el o p m en t Sy st em ev o l ut i o n

Figure 2-3: Cost Distribution

7. What are software engineering Methods?


Structured approaches to software development which include system models,
notations, rules, design advice and process guidance.

Model Descriptions: Descriptions of graphical models which should be produced


Rules: Constraints applied to system models
Recommendations: Advice on good design practice
Process guidance: What activities to follow.

8. What is CASE (Computer-Aided Software Engineering)

Software systems that are intended to provide automated support for software
process activities. CASE systems are often used for method support. Support
routine activities in the software process such as editing design diagrams, checking
diagram consistency and keeping track of program tests which have been run.
There are 2 categories.
Upper-CASE: Tools to support the early process activities of requirements and
design such as Use Case,…
Introduction To Computing & Software Engineering 16
Compiled by: Tesfaye M.
Lower-CASE: Tools to support later activities such as programming, debugging and
testing like Java, C++,.

9. What are the attributes of good software?


The software should deliver the required:
A) functionality and performance to the user
B) Maintainability: Software must evolve to meet changing needs.
C) Dependability: Software must be trustworthy.
D) Efficiency: Software should not make wasteful use of system resources.
E) Acceptability: Software must accepted by the users for which it was designed.
This means it must be understandable, usable and compatible with other systems.

10. What are the key challenges facing software engineering?


Heterogeneity, delivery and trust are the major challenges.
Heterogeneity: Developing techniques for building software that can cope with
heterogeneous platforms and execution environments
Delivery: Developing techniques that lead to faster delivery of software
Trust: Developing techniques that demonstrate that software can be trusted by its
users.

2.2.7 Professional and Ethical Responsibility

Software engineering involves wider responsibilities than simply the application of


technical skills. Software engineers must behave in an honest and ethically
responsible way if they are to be respected as professionals. Ethical behavior is more
than simply upholding the law.

Issues of Professional Responsibility

Confidentiality: Engineers should normally respect the confidentiality of their


employers or clients irrespective of whether or not a formal confidentiality
agreement has been signed.
Competence: Engineers should not misrepresent their level of competence. They
should not knowingly accept work which is out with their competence.
Intellectual property rights: Engineers should be aware of local laws governing the
use of intellectual property such as patents, copyright, etc. They should be careful to
ensure that the intellectual property of employers and clients is protected.

Introduction To Computing & Software Engineering 17


Compiled by: Tesfaye M.
Computer misuse: Software engineers should not use their technical skills to
misuse other people’s computers. Computer misuse ranges from relatively trivial
(game playing on an employer’s machine, say) to extremely serious (dissemination
of viruses). In general, you should respect the Code of Ethics (read it).

2.2.8 Software Engineering Statistics


 The U.S. spends $2.3 trillion on projects every year, an amount equal to one-
quarter of the nation’s gross domestic product.
 The world as a whole spends nearly $10 trillion of its$40.7 trillion gross product
on projects of all kinds.
 More than sixteen million people regard project management as their profession;
on average, a project manager earns more than $82,000 per year.
 More than half a million new information technology (IT) application
development projects were initiated during 2001, up from 300,000 in 2000.
 Famous business authors and consultants are stressing the importance of project
management. As Tom Peters writes in his book, Reinventing Work: the Project 50,
“To win today, you must master the art of the project!”

2.2.9 Success and Failure Factors


Why Software is delivered Late?
 An unrealistic deadline
 Changing but unpredicted customer requirements
 Underestimation of efforts needed
 Risks not considered at the project start
 Unforeseen technical difficulties
 Unforeseen human difficulties
 Miscommunication among project staff
 Failure to recognize that project is falling behind schedule
Why IT Projects Fail?
“The project team, the suppliers, the customers and others stakeholders can all
provide a source of failure, but the most reasons for project failure are rooted in the
project management process itself and the aligning of IT with organizational
cultures” (Tilmann and Weinberger, 2004).

Introduction To Computing & Software Engineering 18


Compiled by: Tesfaye M.
Based on a research carried out by the Coverdale Organization (Cushing, 2002),
respondents identified:
 Estimation mistakes,
 Unclear project goals and objectives, and
 Project objectives changing during the project as key factors in project failures.
The following list the primary causes for the failure of complex IT projects:
 Poor planning
 Unclear goals and objectives
 Objectives changing during the project
 Unrealistic time or resource estimates
 Lack of executive support and user involvement
 Failure to communicate and act as a team
 Inappropriate skills
In specific terms - Reasons why Projects Fail:
Don’t manage risks: “Management must actively attack a project risks, otherwise
they will actively attack you” (Gilb 1988)
 Building the wrong thing
 Don’t involve users at all stages
Technology Fails: Don’t use system architecture to reduce impact of technology
failure
IT Cortex
The statistics presented here all converge to establish that:
 IT project is more likely to be unsuccessful than successful
 About 1 out of 5 IT projects is likely to bring full satisfaction
 The larger the project the more likely the failure
This raises, of course, a series of questions:
 Would an organization be better off without undertaking IT projects?
 Does the attention shown by top management for strategic projects reflect the
actual stakes?
 What will increase the chances of success?
 What edge does my project have with respect to those on the casualty list?
1.7 Software Crisis
Crisis: is a turning point in the course of anything.
The software crisis:
 It becomes clear in the mid-60s that:
 Software systems were developed far too slowly.

Introduction To Computing & Software Engineering 19


Compiled by: Tesfaye M.
 Many software projects failed
 Most projects were delivered late and cost far more than was budgeted.
 Delivered systems were often of very low quality
 The term "software crisis" was coined by some attendees at the first NATO
Software Engineering Conference in 1968 at Garmisch, Germany.
• The aim of this conference was already to tame the “software crisis”. Since this era,
software development seems to have been continuously in crisis and we still debate
today if we are
software engineers or software craftsmen. Many reports exist on software projects
have difficulties to respect initial budget and schedule, which is confirmed by real
life experience. Multiple approaches have been devised and promoted to change this
situation.
• Do you see a debate about the fact that tunnel or road building is not engineering?
Have you read about the” building crisis”? I don’t.
• Construction engineering has been presented in the past as a model for software
engineering. If we could define precisely the requirements like the construction
industry blueprints, we would be able to achieve the same reliable results.
• This was the foundation of the methodologies crafted in the 20th century (SSADM,
Information Engineering, Merise, RUP, etc.) that rely on a complete initial analysis
and architecture of software projects.
• It is true that you don’t see a lot of abandoned half-built bridges or roads as you
can witness canceled software projects. However, you can see examples where the
final price is really higher than the initial estimation. The main tunnel through the
Swiss Alps still under construction is expected to cost the double of its initial
budget…. and there are 8 years left to make this worse. We can then wonder if
construction engineering should really be an example for software development.
• The “software crisis” of the 1960s and 1970s was so called because of a string of
high profile software project failures: over budget, overdue, etc.
• The crisis arose in part because the greater power available in computers meant
that larger software projects were tackled with techniques developed on much
smaller projects.
• Techniques were needed for software project management.
Good project management cannot guarantee success, but poor management on
significant projects always leads to failure.
 Software projects have several properties that make them very different to
other kinds of engineering project.
Introduction To Computing & Software Engineering 20
Compiled by: Tesfaye M.
(1) The product is intangible.
It’s hard to claim a bridge is 90% complete if there is not 90% of the bridge there.
It is easy to claim that a software project is 90% complete, even if there are no visible
outcomes.
(2) We don’t have much experience.
Software engineering is a new discipline, and so we simply don’t have much
understanding of how to engineer large scale software projects.
(3) Large software projects are often “bespoke” (made to order).
Most large software systems are one-off, with experience gained in one project being
of little help in another.
(4) The technology changes very quickly: Most large software projects employ new
technology
1.8 Software Project Failure Costs Billions
Better Estimation & Planning Can Help: There are so many studies attempting to
quantify the cost of software failures. They don’t agree on percentages but they
generally agree that the number is at least 50 to 80 billion dollar range annually.
Standish Chaos Reports: Standish is probably the most referenced. They define
success as projects on budget, of cost, and with expected functionality. There are
several updates to the Standish “Chaos” reports.
The 2004 report shows:
 Successful Projects: 29%
 Canceled projects cost $55 Billion Annually?
 Challenged Projects: 53%
 Failed Projects: 18%
Standish Findings By Year Update for 2009
Succeeded: 32%, Failed: 24%, Challenged: 44%
Most projects cost more than they return, Mercer Consulting:
When the true costs are added up, as many as 80% of technology projects actually
cost more than they return. It is not done intentionally but the costs are always
underestimated and the benefits are always overestimated.
Dosani, 2001 Oxford University Regarding IT Project Success (Saur &
Cuthbertson, 2003)
Successful: 16%, Challenged: 74%, Abandoned: 10%
British Computer Society: Successful: 16%, Failure Costs Tens of Billions of British
Pounds in the European Union National Institute of Standards and Technology

Introduction To Computing & Software Engineering 21


Compiled by: Tesfaye M.
(NIST), Software defects cost nearly $60 Billion Annually, 80% of development costs
involve identifying and correcting defects
Tata Consultancy 2007
62% of organizations experienced IT projects that failed to meet their schedules
49% suffered from budget overruns, 47% had higher-than-expected maintenance
costs, 41% failed to deliver the expected business value and ROI, 33% file to perform
against expectations
Note: For all the above problems: late, failure, cost and quality issues strictly
following software engineering principles has ultimate solutions to develop large
software.

Introduction To Computing & Software Engineering 22


Compiled by: Tesfaye M.
CHAPTER 3
DATA REPRESENTATION AND COMPUTER
ARITHMETIC

Compiled by: Lemma Nigussie


12/19/2014
Number Systems, Base Conversions, and Computer Data Representation

Decimal and Binary Numbers


When we write decimal (base 10) numbers, we use a positional notation system. Each digit is multiplied
by an appropriate power of 10 depending on its position in the number:

For example:
843 = 8 x 102 + 4 x 101 + 3 x 100
= 8 x 100 + 4 x 10 + 3 x 1
= 800 + 40 + 3

For whole numbers, the rightmost digit position is the one’s position (10 0 = 1). The numeral in that
position indicates how many ones are present in the number. The next position to the left is ten’s, then
hundred’s, thousand’s, and so on. Each digit position has a weight that is ten times the weight of the
position to its right.

In the decimal number system, there are ten possible values that can appear in each digit position, and
so there are ten numerals required to represent the quantity in each digit position. The decimal numerals
are the familiar zero through nine (0, 1, 2, 3, 4, 5, 6, 7, 8, 9).

In a positional notation system, the number base is called the radix. Thus, the base ten system that we
normally use has a radix of 10. The term radix and base can be used interchangeably. When writing
numbers in a radix other than ten, or where the radix isn’t clear from the context, it is customary to
specify the radix using a subscript. Thus, in a case where the radix isn’t understood, decimal numbers
would be written like this:

12710 1110 567310

Generally, the radix will be understood from the context and the radix specification is left off.

The binary number system is also a positional notation numbering system, but in this case, the base is
not ten, but is instead two. Each digit position in a binary number represents a power of two. So, when
we write a binary number, each binary digit is multiplied by an appropriate power of 2 based on the
position in the number:

For example:
101101 = 1 x 25 + 0 x 24 + 1 x 23 + 1 x 22 + 0 x 21 + 1 x 20
= 1 x 32 + 0 x 16 + 1 x 8 + 1 x 4 + 0 x 2 + 1 x 1
= 32 + 8 + 4 + 1

In the binary number system, there are only two possible values that can appear in each digit position
rather than the ten that can appear in a decimal number. Only the numerals 0 and 1 are used in binary
numbers. The term ‘bit’ is a contraction of the words ‘binary’ and ‘digit’, and when talking about binary
numbers the terms bit and digit can be used interchangeably. When talking about binary numbers, it is
often necessary to talk of the number of bits used to store or represent the number. This merely
describes the number of binary digits that would be required to write the number. The number in the
above example is a 6 bit number.

2
Prepared for AASTU

The following are some additional examples of binary numbers:


1011012 112 101102

Conversion between Decimal and Binary


Converting a number from binary to decimal is quite easy. All that is required is to find the decimal value
of each binary digit position containing a 1 and add them up.

For example: convert 101102 to decimal.

10110
\ \ \___________1 x 21 = 2
\ \____________1 x 22 = 4
\_______________1 x 24 = 16
22

Another example: convert 110112 to decimal

11011
\ \ \ \_________1 x 20 = 1
\ \ \__________1 x 21 = 2
\ \_____________1 x 23 = 8
\______________1 x 24 = 16
27

The method for converting a decimal number to binary is one that can be used to convert from decimal
to any number base. It involves using successive division by the radix until the dividend reaches 0. At
each division, the remainder provides a digit of the converted number starting with the least significant
digit.

An example of the process: convert 3710 to binary

37 / 2 = 18 remainder 1 (least significant digit)


18 / 2 = 9 remainder 0
9/2=4 remainder 1
4/2=2 remainder 0
2/2=1 remainder 0
1/2=0 remainder 1 (most significant digit)

The resulting binary number is: 100101

Another example: convert 9310 to binary

93 / 2 = 46 remainder 1 (least significant digit)


46 / 2 = 23 remainder 0
23 / 2 = 11 remainder 1
11 / 2 = 5 remainder 1
5/2=2 remainder 1
2/2=1 remainder 0
1/2=0 remainder 1 (most significant digit)
3
The resulting binary number is: 1011101

Hexadecimal Numbers
In addition to binary, another number base that is commonly used in digital systems is base 16. This
number system is called hexadecimal, and each digit position represents a power of 16. For any number
base greater than ten, a problem occurs because there are more than ten symbols needed to represent
the numerals for that number base. It is customary in these cases to use the ten decimal numerals
followed by the letters of the alphabet beginning with A to provide the needed numerals. Since the
hexadecimal system is base 16, there are sixteen numerals required. The following are the hexadecimal
numerals:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

The following are some examples of hexadecimal numbers:

1016 4716 3FA16 A03F16

The reason for the common use of hexadecimal numbers is the relationship between the numbers 2 and
16. Sixteen is a power of 2 (16 = 24). Because of this relationship, four digits in a binary number can be
represented with a single hexadecimal digit. This makes conversion between binary and hexadecimal
numbers very easy, and hexadecimal can be used to write large binary numbers with much fewer digits.
When working with large digital systems, such as computers, it is common to find binary numbers with
8, 16 and even 32 digits. Writing a 16 or 32 bit binary number would be quite tedious and error prone.
By using hexadecimal, the numbers can be written with fewer digits and much less likelihood of error.

To convert a binary number to hexadecimal, divide it into groups of four digits starting with the rightmost
digit. If the number of digits isn’t a multiple of 4, prefix the number with 0’s so that each group contains
4 digits. For each four digit group, convert the 4 bit binary number into an equivalent hexadecimal digit.

For example: Convert the binary number 10110101 to a hexadecimal number

Divide into groups for 4 digits 1011 0101


Convert each group to hex digit B 5
B516

Another example: Convert the binary number 0110101110001100 to hexadecimal

Divide into groups of 4 digits 0110 1011 1000 1100


Convert each group to hex digit 6 B 8 C
6B8C16

To convert a hexadecimal number to a binary number, convert each hexadecimal digit into a group of 4
binary digits.

Example: Convert the hex number 374F into binary

3 7 4 F
Convert the hex digits to binary 0011 0111 0100 1111

4
Prepared for AASTU

00110111010011112

There are several ways in common use to specify that a given number is in hexadecimal representation
rather than some other radix. In cases where the context makes it absolutely clear that numbers are
represented in hexadecimal, no indicator is used. In much written material where the context doesn’t
make it clear what the radix is, the numeric subscript 16 following the hexadecimal number is used. In
most programming languages, this method isn’t really feasible, so there are several conventions used
depending on the language. In the C and C++ languages, hexadecimal constants are represented with a
‘0x’ preceding the number, as in: 0x317F, or 0x1234, or 0xAF. In assembler programming languages that
follow the Intel style, a hexadecimal constant begins with a numeric character (so that the assembler
can distinguish it from a variable name), a leading ‘0’ being used if necessary, with the letter ‘h’ suffixed
onto the number. In Intel style assembler format: 371Fh and 0FABCh are valid hexadecimal constants.
Note that: A37h isn’t a valid hexadecimal constant. It doesn’t begin with a numeric character, and so will
be taken by the assembler as a variable name. In assembler programming languages that follow the
Motorola style, hexadecimal constants begin with a ‘$’ character. So in this case: $371F or $FABC or $01
are valid hexadecimal constants.

Binary Coded Decimal Numbers


Another number system that is encountered occasionally is Binary Coded Decimal. In this system,
numbers are represented in a decimal form, however each decimal digit is encoded using a four bit
binary number.

For example: The decimal number 136 would be represented in BCD as follows:

136 = 0001 0011 0110


1 3 6

Conversion of numbers between decimal and BCD is quite simple. To convert from decimal to BCD,
simply write down the four bit binary pattern for each decimal digit. To convert from BCD to decimal,
divide the number into groups of 4 bits and write down the corresponding decimal digit for each 4 bit
group.

There are a couple of variations on the BCD representation, namely packed and unpacked. An unpacked
BCD number has only a single decimal digit stored in each data byte. In this case, the decimal digit will
be in the low four bits and the upper 4 bits of the byte will be 0. In the packed BCD representation, two
decimal digits are placed in each byte. Generally, the high order bits of the data byte contain the more
significant decimal digit.

An example: The following is a 16 bit number encoded in packed BCD format:


01010110 10010011
This is converted to a decimal number as follows:
0101 0110 1001 0011
5 6 9 3
The value is 5693 decimal

Another example: The same number in unpacked BCD (requires 32 bits)


00000101 00000110 00001001 00000011
5 6 9 3

5
The use of BCD to represent numbers isn’t as common as binary in most computer systems, as it is not
as space efficient. In packed BCD, only 10 of the 16 possible bit patterns in each 4 bit unit are used. In
unpacked BCD, only 10 of the 256 possible bit patterns in each byte are used. A 16 bit quantity can
represent the range 0-65535 in binary, 0-9999 in packed BCD and only 0-99 in unpacked BCD.

Fixed Precision and Overflow


So far, in talking about binary numbers, we haven’t considered the maximum size of the number. We
have assumed that as many bits are available as needed to represent the number. In most computer
systems, this isn’t the case. Numbers in computers are typically represented using a fixed number of bits.
These sizes are typically 8 bits, 16 bits, 32 bits, 64 bits and 80 bits. These sizes are generally a multiple of
8, as most computer memories are organized on an 8 bit byte basis. Numbers in which a specific number
of bits are used to represent the value are called fixed precision numbers. When a specific number of
bits are used to represent a number that determines the range of possible values that can be
represented. For example, there are 256 possible combinations of 8 bits, therefore an 8 bit number can
represent 256 distinct numeric values and the range is typically considered to be 0-255. Any number
larger than 255 can’t be represented using 8 bits. Similarly, 16 bits allows a range of 0-65535.

When fixed precision numbers are used, (as they are in virtually all computer calculations) the concept
of overflow must be considered. An overflow occurs when the result of a calculation can’t be represented
with the number of bits available. For example when adding the two eight bit quantities: 150 + 170, the
result is 320. This is outside the range 0-255, and so the result can’t be represented using 8 bits. The
result has overflowed the available range. When overflow occurs, the low order bits of the result will
remain valid, but the high order bits will be lost. This results in a value that is significantly smaller than
the correct result.

When doing fixed precision arithmetic (which all computer arithmetic involves) it is necessary to be
conscious of the possibility of overflow in the calculations.

Signed and Unsigned Numbers


So far, we have only considered positive values for binary numbers. When a fixed precision binary
number is used to hold only positive values, it is said to be unsigned. In this case, the range of positive
values that can be represented is 0 – (2n–1), where n is the number of bits used. It is also possible to
represent signed (negative as well as positive) numbers in binary. In this case, part of the total range of
values is used to represent positive values, and the rest of the range is used to represent negative values.

There are several ways that signed numbers can be represented in binary, but the most common
representation used today is called two’s complement. The term two’s complement is somewhat
ambiguous, in that it is used in two different ways. First, as a representation, two’s complement is a way
of interpreting and assigning meaning to a bit pattern contained in a fixed precision binary quantity.
Second, the term two’s complement is also used to refer to an operation that can be performed on the
bits of a binary quantity. As an operation, the two’s complement of a number is formed by inverting all
of the bits (also called one’s complement) and adding 1. In a binary number being interpreted using the
two’s complement representation, the high order bit of the number indicates the sign. If the sign bit is
0, the number is positive, and if the sign bit is 1, the number is negative. For positive numbers, the rest
of the bits hold the true magnitude of the number. For negative numbers, the lower order bits hold the
complement (or bitwise inverse) of the magnitude of the number. It is important to note that two’s
complement representation can only be applied to fixed precision quantities, that is, quantities where
there are a set number of bits.
6
Prepared for AASTU

Two’s complement representation is used because it reduces the complexity of the hardware in the
arithmetic-logic unit of a computer’s CPU. Using a two’s complement representation, all of the
arithmetic operations can be performed by the same hardware whether the numbers are considered to
be unsigned or signed. The bit operations performed are identical, the difference comes from the
interpretation of the bits. The interpretation of the value will be different depending on whether the
value is considered to be unsigned or signed.

For example: Find the 2’s complement of the following 8 bit number
00101001

11010110 First, invert the bits (One’s complement)


+ 00000001 Then, add 1
= 11010111

The 2’s complement of 00101001 is 11010111

Another example: Find the 2’s complement of the following 8 bit number
10110101

01001010 Invert the bits (One’s complement)


+ 00000001 then add 1
= 01001011

The counting sequence for an eight bit binary value using 2’s complement representation appears as
follows:
01111111 7Fh 127 largest magnitude positive number
01111110 7Eh 126
01111101 7Dh 125

00000011 03h
00000010 02h
00000001 01h
00000000 00h
11111111 0FFh -1
11111110 0FEh -2
11111101 0FDh -3

10000010 82h -126
10000001 81h -127
10000000 80h -128 largest magnitude negative number

Notice in the above sequence that counting up from 0, when 127 is reached, the next binary pattern in
the sequence corresponds to -128. The values jump from the greatest positive number to the greatest
negative number, but that the sequence is as expected after that. (i.e. adding 1 to –128 yields –127, and
so on.). When the count has progressed to 0FFh (or the largest unsigned magnitude possible) the count
wraps around to 0. (i.e. adding 1 to –1 yields 0).

7
Binary Coding
Data in the computer are represented by a coding system. These include
• numeric data (digits 0, 1, …, 9)
• alphanumeric data (A … Z, a … z) and
• special characters (such as +, %, #, /, …)

The most common coding schemes used are


a) Binary Coded Decimal (BCD)
• Uses 4 bits (nibble) to represent digits 0 to 9.
• Numbers, letters and special characters can be coded in binary form
• With BCD, only 24 = 16 representations are possible.

Ex: 5310 can be represented/coded as 01010011 in BCD.

b) ASCII Character Encoding


The name ASCII is an acronym for: American Standard Code for Information Interchange. It is a character
coding standard developed several decades ago to provide a standard way for digital machines to encode
characters. The ASCII code provides a mechanism for encoding alphabetic characters, numeric digits, and
punctuation marks for use in representing text and numbers written using the Roman alphabet. As
originally designed, it was a seven bit code. The seven bits allows the representation of 128 unique
characters, all of the alphabet, numeric digits and standard English punctuation marks are encoded.

The ASCII standard was later extended to an eight bit code (which allows 256 unique code patterns) and
various additional symbols were added, including characters with diacritical marks (such as accents) used
in European languages which don’t appear in English.

ASCII Character Set

High Order Bits


Low Order 0000 0001 0010 0011 0100 0101 0110 0111
Bits 0 1 2 3 4 5 6 7
0000 0 NUL DLE Space 0 @ P ` p
0001 1 SOH DC1 ! 1 A Q a q
0010 2 STX DC2 “ 2 B R b r
0011 3 ETX DC3 # 3 C S c s
0100 4 EOT DC4 $ 4 D T d t
0101 5 ENQ NAK % 5 E U e u
0110 6 ACK SYN & 6 F V f v
0111 7 BEL ETB ‘ 7 G W g w
1000 8 BS CAN ( 8 H X h x
1001 9 HT EM ) 9 I Y i y
1010 A LF SUB * : J Z j z
1011 B VT ESC + ; K [ k {
1100 C FF FS , < L \ l |
1101 D CR GS - = M ] m }
1110 E SO RS . > N ^ n ~
1111 F SI US / ? O _ o DEL

8
Prepared for AASTU

c) EBCDIC (Extended Binary Coded Decimal Interchange Code)


• Uses 8 bits and can represent 256 different characters.
• Uses zone-bit combination, each of which is 4 bit.

Ex:
Character Zone Digit Hex. Value
A 1100 0001 C1
B 1100 0010 C2

a 1000 0001 81
b 1000 0010 82

LOGIC GATES

A digital signal: This is a signal that can only have two finite values, usually at the minimum and
maximum of the power supply. Changes between these two values occur instantaneously. Graphically
this is represented by a graph similar to that shown below.
Voltage (V)

Max

Min time (s)

When an input or output signal is at the minimum power supply voltage (usually 0V) this is referred to
as a LOW signal or LOGIC 0 signal. When an input or output signal is at the maximum power supply
voltage this is referred to as a HIGH signal or LOGIC 1 signal.

Below we discuss the basic building block of all digital systems, the logic gate.

Logic Gates: The term logic gate actually gives a clue as to the function of these devices in an electronic
circuit. ‘Logic’ implies some sort of rational thought process taking place and a ‘gate’ in everyday
language allows something through when it is opened.

A Logic Gate in an electronic sense makes a ‘logical’ decision based upon a set of rules, and if the
appropriate conditions are met then the gate is opened and an output signal is produced.

Logic gates are therefore the decision making units in electronic systems and there are many different
types for different applications. The different type of gates and the rules each one uses to decide an
appropriate output follow.

Basic Logic Gates


There are three basic logic gates each of which performs a basic logic function, they are called NOT, AND
and OR. All other logic functions can ultimately be derived from combinations of these three. For each
of the three basic logic gates a summary is given including the logic symbol, the corresponding truth
table and the Boolean expression.

9
1) The NOT gate
The NOT gate is unique in that it only has one input. It looks like

The input to the NOT gate is inverted i.e the binary input state of 0 gives an output of 1 and the binary
input state of 1 gives an output of 0.
is known as "NOT A" or alternatively as the complement of .
The truth table for the NOT gate appears as below

0 1

1 0
2 The AND gate
The AND gate has two or more inputs. The output from the AND gate is 1 if and only if all of the inputs
are 1, otherwise the output from the gate is 0. The AND gate is drawn as follows

The output from the AND gate is written as (the dot can be written half way up the line as here
or on the line. Note that some textbooks omit the dot completely).
The truth table for a two-input AND gate looks like

0 0 0

0 1 0

1 0 0

1 1 1

It is also possible to represent an AND gate with a simple analogue circuit, this is illustrated as an
animation.

3 The OR Gate
The OR gate has two or more inputs. The output from the OR gate is 1 if any of the inputs is 1. The gate
output is 0 if and only if all inputs are 0. The OR gate is drawn as follows

The output from the OR gate is written as .


The truth table for a two-input OR gate looks like

0 0 0

0 1 1
10
Prepared for AASTU

1 0 1

1 1 1

Other Logic Gates


The three basic logic gates can be combined to provide more complex logical functions. Four important
logical functions are described here, namely NAND, NOR, XOR and XNOR. In each case a summary is
given including the logic symbol for that function, the corresponding truth table and the Boolean
expression.

4 The NAND gate


The NAND gate has two or more inputs. The output from the NAND gate is 0 if and only if all of the inputs
are 1 otherwise the output is 1. Therefore the output from the NAND gate is the NOT of A AND B (also
known as the complement or inversion of . ). The NAND gate is drawn as follows:

where the small circle immediately to the right of the gate on the output line is known as an invert
bubble.

The output from the NAND gate is written as (the same rules apply regarding the placement and
appearance of the dot as for the AND gate - see the section on basic logic gates). The Boolean expression
reads as "A NAND B".
The truth table for a two-input NAND gate looks like

0 0 1

0 1 1

1 0 1

1 1 0
5 The NOR gate
The NOR gate has two or more inputs. The output from the NOR gate is 1 if and only if all of the
inputs are 0, otherwise the output is 0. This output behaviour is the NOT of A OR B. The NOR gate
is drawn as follows

The output from the NOR gate is written as which reads "A NOR B".
The truth table for a two-input NOR gate looks like

0 0 1

11
0 1 0

1 0 0

1 1 0
6 The eXclusive-OR (XOR) gate
The exclusive-OR or XOR gate has two or more inputs. For a two-input XOR the output is similar to that
from the OR gate except it is 0 when both inputs are 1. This cannot be extended to XOR gates comprising
3 or more inputs however.
In general, an XOR gate gives an output value of 1 when there are an odd number of 1's on the inputs to
the gate. The truth table for a 3-input XOR gate below illustrates this point.
The XOR gate is drawn as

The output from the XOR gate is written as which reads "A XOR B".
The truth table for a two-input XOR gate looks like

0 0 0

0 1 1

1 0 1

1 1 0

7 The eXclusive-NOR (XNOR) gate


The exclusive-NOR or XNOR gate has two or more inputs. The output is equivalent to inverting the output
from the exclusive-OR gate described above. Therefore an equivalent circuit would comprise an XOR
gate, the output of which feeds into the input of a NOT gate.
In general, an XNOR gate gives an output value of 1 when there are an even number of 1's on the inputs
to the gate. The truth table for a 3-input XNOR gate below illustrates this point.
The XNOR gate is drawn using the same symbol as the XOR gate with an invert bubble on the output line
as is illustrated below

The output from the XNOR gate is written as which reads "A XNOR B".
The truth table for a two-input XNOR gate looks like

0 0 1

0 1 0

1 0 0

12
Prepared for AASTU

1 1 1

13

You might also like