Download as pdf or txt
Download as pdf or txt
You are on page 1of 105

Instructional Material

Post Graduate Diploma in Computer


Applications
Semester – I
ELEMENTS OF INFORMATION TECHNOLOGY
Paper-II

Editor
Dr. Suresh Pabboju
Professor & Head,
Department of IT, CBIT, Gandipet, Hyderabad-500 075.

Course Writers
Mrs. Pragnavi Erva
Assistant Professor,
Department of Computer Science Engineering,
University College of Engineering, OU, Hyderabad.
Mrs. V. Sukanya, M.Tech., IIIT
Assistant Professor,
Department of Computer Science Engineering,
University College of Engineering, OU, Hyderabad.

Director
Prof. Chintha Ganesh

Prof. G. Ram Reddy Centre for Distance Education


OSMANIA UNIVERSITY,HYDERABAD – 500 007
2018-2019
With effect from the academic year 2017-2018

PC 103 IT ELEMENTS OF INFORMATION TECHNOLOGY


Credits: 4

Instruction: (4L) hrs per week Duration of SEE: 3 hours

CIE: 30 marks SEE: 70 marks

UNIT –I
Information Concepts and Processing: Definition, Need, Qualities, value of information.
Categories of information in business organization, levels of information, data concepts, logical
and physical concepts, data processing, Introduction to office automation.
Number Systems: Binary numbers, octal numbers, hexadecimal numbers, Radix- decimal, octal,
hexadecimal, conversion from one from to another-Examples, Representation of decimal, octal,
hexadecimal numbers: fractional numbers and signed numbers, 1’s and 2’s complement forms,
Binary arithmetic –addition, subtraction ,multiplication and division-Examples. Codes –Various
types-ASCII and 8 bit EBCDIC.
UNIT –II
An overview of Computer Systems: Component of a computer systems, various I/O and
auxiliary storage devices, system software, Introduction to system software, Distinction between
system software and Application software. Introductory ideas of loaders and linkers, High level
languages. Different language, Introduction to Assemblers, Compilers and Interpreters, relative
merits of compilers v/s interpreters.
UNIT –III
Operating System: Evolution, introduction to Operating System, function and facilities,
single tasking and multitasking OS, single user and multi-user OS, characteristics of MS-DOS
and Unix operating systems, DOS and UNIX commands for file and process management.
UNIT –IV
Text editors: Overview of editing process Graphical User Interfaces-Introduction to Windows,
Word processing software packages and features, spread sheet packages and features.
Database: Introduction to database and database packages. Desktop Publishing: Introduction to
Desktop publishing and desk top publishing packages.
With effect from the academic year 2017-2018

UNIT –V
Computer Communications: Computer to computer communication through networking.
Introduction to computer networks and networking software, types of Networks, Internet and
Intranet, Electronic mail.
Multimedia and Virtual reality: Introduction to Multimedia and Virtual reality Specifications
of a typical desktop computer systems, Recent Developments in ICT Recommended.

Suggested Reading:
1. Satish Jain, Information Technology, BPB Publications, 2015.
2. Alexis Leon and Mathews Leon , Fundamentals of Information Technology,2nd Edition,
Vikas publishers, 2009.
3. V. Rajaraman, Fundamentals of Computers, 5th Edition, Prentice Hall India, 2011.
TABLE OF CONTENTS

Title Page No.


UNIT - I 1-24
1. Information concepts and processing 1
1.1 Definition of Data, Information, and Knowledge 1
1.2 Data Processing 2
1.3 What is an Information System? 2
1.4 Characteristics of valuable Information 4
1.5 The Value of Information 5
1.6 Categories of Information in Business Organization 5
1.7 Levels of Information 7
1.8 Introduction to Office Automation 8
2. Number systems 10
2.1 Positional Number Systems 10
2.2 Binary Number System (Base 2) 11
2.3 Octal Number System (Base 8) 11
2.4 Hexadecimal Number System (Base 16) 11
2.5 Base Conversion 11
2.6 Fractional Conversion 12
2.7 Converting from Decimal 12
2.8 Converting Between 2n Bases 15
2.9 1's and 2's Complement of Binary Number 18
2.10 Binary Arithmetic 19
2.11 Unsigned and Signed Numbers 20
2.12 Binary Code 21
UNIT - II 25-36
3. An Overview of Computer System 25
3.1 What is a Computer? 25
3.2 Computer Organization 25
3.3 Peripheral Devices 27
3.4 Software 32
3.5 Computer Languages 34
3.6 Compilers, Assemblers and Interpreters 35
UNIT - III 37-62
4. Operating systems 37
4.1 Evolution of Operating System 37
4.2 Introduction to Operating System 39
4.3 Functions of OS 41
4.4 OS Tasks 43
4.5 Objectives of OS 45
4.6 Single and Multitasking OS 45
4.7 Single and Multi User OS 46
4.8 Characteristics of MS-DOS 47
4.9 Characteristics of UNIX Operating Systems 48
4.10 Unix Commands for Process Management 48
4.11 DOS Commands for Process Management 56
UNIT – IV 63-72
5. Text Editor 63
5.1 Overview of Editing Process Graphical User Interface 63
5.2 Introduction to Windows 63
5.3 Word Processing Software 64
5.4 Features 65
5.5 Spreadsheet and its Features 66
6. Database 68
6.1 Database Packages 68
6.2 Introduction to Desktop Publishing and Desktop Publishing 71
Packages
UNIT - V 73-94
7. Computer Communications 73
7.1 Basic Elements of a Communication System 74
7.2 Introduction to Computer Networks 74
7.3 Introduction to Networking Software 76
7.4 Types of Networks 76
7.5 Internet and Intranet 80
7.6 Electronic Mail (Email) 83
8. Multimedia 86
8.1 Components of Multimedia 86
8.2 Introduction to Multimedia Technology 87
8.3 Multimedia Technology Applications 87
8.4 Virtual Reality 88
8.5 Virtual Reality Concepts 91
UNIT - I
UNIT-I
1. INFORMATION CONCEPTS AND PROCESSING

Need of Information Systems:

Information systems are used in almost every imaginable profession. Small and medium
scale business owners use information systems to reach customers. Sales representatives use
information systems to advertise products, communicate with customers, and analyse sales trends.
From a small scale sector to huge multinational companies, businesses of all sizes could not survive
without information systems to perform their operations. Regardless of your college major or
chosen career, information systems are indispensable tools to help you achieve your career goals.

1.1. Definition of Data, Information, and Knowledge

Data consists of raw facts, such as employee ID number, total hours worked in a week. As shown
in Table 1.1, several types of data can represent these facts. When facts are arranged in a
meaningful manner, they become information.

Information is a collection of facts organized so that they have additional value beyond the value
of the individual facts. For example, sales managers might find that knowing the total monthly
sales suits their purpose more (i.e., is more valuable) than knowing the number of sales for each
sales representative. Providing information to customers can also help companies increase revenues
and profits.
Table 1.1: Types of data
Data Represented By
Alphanumeric data Numbers, letters and other characters
Image data Graphic images and pictures
Audio data Sound, Noise, or tones
Video data Moving images or pictures

Data represents real-world things. Hospitals and healthcare organizations, for example,
maintain patient medical data, which represents actual patients with specific health situations. In
many cases, hospitals and healthcare organizations are converting data to electronic form.
However, data—raw facts—has little value beyond its existence.
Data and information work the same way. Rules and relationships can be set up to organize
data into useful, valuable information. The type of information created depends on the relationships
defined among existing data. For example, a sales manager could add specific product data to his
sales data to create monthly sales information organized by product line. The manager could use
this information to determine which product lines are the most popular and profitable.

1
1.2 Data Processing
Data processing is the act of handling or manipulating data in some fashion. Regardless of
the activities involved in it, processing tries to assign meaning to data. Thus, the ultimate goal of
processing is to transform data into information. Data processing is the process through which facts
and figures are collected, assigned meaning, communicated to others and retained for future use.
Therefore, data processing can be defined as a series of actions or operations that converts data into
valuable information.
The Data processing activities are distinguished in four functional categories i.e., data input, data
processing, data output and storage, constituting is known as data processing cycle.
Input: The term input refers to the activities required to record data and to make it available for
processing. The input can also include the steps necessary to check, verify and validate data
contents.
Processing: The term processing denotes the actual data manipulation techniques such as
classifying, sorting, calculating, summarizing, comparing, etc. that convert data into information.
Output: It is a communication function which transmits the information, generated after processing
of data, to persons who need the information. Sometimes output also includes decoding activity
which converts the electronically generated information into human-readable form.
Storage: It involves the filing of data and information for future use.
The above mentioned four basic functions are performed in a logical sequence as shown in Fig. 1.1.
in all data processing systems

Processing
(Sorting,
Raw data calculating) Useful data and
Information

Input Data and Output


(Collection, information (Reproduce)
Recording)

Storage

Fig. 1.1 Data Processing Cycle


1.3 What is an Information System?
An Information System (IS) is a set of interrelated elements or components that collect
(input), manipulate (process), store, and disseminate (output) data and information, and provide a
corrective reaction (feedback mechanism) to meet an objective (see Figure 1.2). The feedback
mechanism is the component that helps organizations achieve their goals, such as increasing profits
or improving customer service.

2
Feedback

Input Processing Output

Fig. 1.2 Components of an Information System

Elements of an information system are as follows:


Input
In Information Systems, input is the activity of gathering and capturing raw data. In
producing paychecks, for example, the number of hours every employee works must be collected
before paychecks can be calculated or printed. In a university grading system, instructors must
submit student grades before a summary of grades for the semester or quarter can be compiled and
sent to the students.
Processing
In Information Systems, processing means converting or transforming data into useful
outputs. Processing can involve making calculations, comparing data and taking alternative actions,
and storing data for future use. Processing data into useful information is critical in business
settings.
Processing can be done manually or with computer assistance. In a payroll application, the
number of hours each employee worked must be converted into net, or take-home, pay. Other inputs
often include employee ID number and department. After these calculations and comparisons are
performed, the results are typically stored. Storage involves keeping data and information available
for future use, including output.
Output
In Information Systems, output involves producing useful information, usually in the form
of documents and reports. Outputs can include paychecks for employees, reports for managers, and
information supplied to stockholders, banks, government agencies, and other groups. In some cases,
output from one system can become input for another. For example, output from a system that
processes sales orders can be used as input to a customer billing system.
Feedback
In Information Systems, feedback is information from the system that is used to make
changes to input or processing activities. For example, errors or problems might make it necessary
to correct input data or change a process. Consider a payroll example. Perhaps the number of hours
an employee worked was entered as 400 instead of 40. The feedback is used to check and correct
the input on the number of hours worked to 40. If undetected, this error would result in a very high
net pay on the printed paycheck!. Feedback is also important for managers and decision makers.

3
1.4 Characteristics of valuable Information:
To be valuable to the decision makers, information should have the characteristics described
in Table 1.2. These characteristics make the information more valuable to an organization. Many
shipping companies, for example, can determine the exact location of inventory items and packages
in their systems, and this information makes them responsive to their customers. In contrast, if an
organization’s information is not accurate or complete, people can make poor decisions, which
leads to failure of an organization. Furthermore, if information is not relevant, not delivered to
decision makers in a timely fashion, or too complex to understand, it can be of little value to the
organization.

Depending on the type of data you need, some characteristics become more valuable than
others.
Table 1.2: Characteristics of Valuable information
Characteristics Definition
Accessible Information should be easily accessible by authorized users so they can
obtain it in the right format and at the right time to meet their needs.
Accurate Accurate information is error free. In some cases, inaccurate information
is generated because inaccurate data is fed into the transformation
process. (This is commonly called garbage in, garbage out [GIGO].)
Complete Complete information contains all the important facts. For example, an
investment report that does not include all important costs is not
complete.
Economical Information should also be relatively economical to produce. Decision
makers must always balance the value of information with the cost of
producing it.
Flexible Flexible information can be used for a variety of purposes. For example,
information on how much inventory is on hand for a particular part can
be used by a sales representative in closing a sale.
Relevant Relevant information is important to the decision maker. Information
showing that lumber prices might drop might not be relevant to a
computer chip manufacturer.
Reliable Reliable information can be trusted by users. In many cases, the
reliability of the information depends on the reliability of the data-
collection method. In other instances, reliability depends on the source of
the information.
Secure Information should be secure from access by unauthorized users.
Simple Information should be simple, not overly complex. Sophisticated and
detailed information might not be needed. In fact, too much information
can cause information overload, whereby a decision maker has too much
information and is unable to determine what is really important.

4
Timely Timely information is delivered when it is needed. Knowing last week’s
weather conditions will not help when trying to decide what coat to wear
today.
Verifiable Information should be verifiable. This means that you can check it to
make sure it is correct, perhaps by checking many sources for the same
information.

1.5 The Value of Information


The value of information is directly linked to how it helps decision makers to achieve their
organization’s goals. Valuable information can help people and their organizations perform tasks
more efficiently and effectively. Consider a market forecast that predicts a high demand for a new
product. If you use this information to develop the new product and your company makes an
additional profit. For e.g a new computerized ordering system might cost Rs. 30,000, but generate
an additional Rs.50,000 in sales. The value added by the new system is the additional revenue
generated from the increased sales of Rs. 20,000.

1.6 Categories of Information in Business Organization


Businesses tend to have several “information systems” operating at the same time.
For most businesses, there are a variety of requirements for information:

 Senior managers need information to help with their business planning


 Middle management need more detailed information to help them monitor and control
business activities
 Employees with operational roles need information to help them carry out their duties
The main categories of information system are as follows
1.6.1 Executive support systems (ESS)
Designed to help senior management make strategic decisions. An ESS gathers, analyses
and summarises the key internal and external information used in the business. ESS typically
involve lots of data analysis and modelling tools, such as "what-if" analysis, to help strategic
decision-making. ESS, contains predefined reports that help small-business owners and managers
identify long-term trends in support of strategic planning and non-routine decision making.
A good way to think about an ESS is to imagine the senior management team in an aircraft
cockpit, with the instrument panel showing them the status of all the key business activities.
1.6.2 Management Information Systems (MIS)
A management information system (MIS) is an organized collection of people, procedures,
software, databases, and devices that provides routine information to managers and decision
makers. An MIS focuses on operational efficiency. Marketing, production, finance, and other
functional areas are supported by MISs and linked through a common database. MISs typically
provide standard reports generated with data and information from the Transaction Processing
Systems.

5
MISs were first developed in the 1960s and typically use information systems to produce
managerial reports. In many cases, these early reports were produced periodically—daily, weekly,
monthly, or yearly. Because of their value to managers, MISs have proliferated throughout the
management ranks. For instance, the total payroll summary report produced initially for an
accounting manager might also be useful to a production manager to help monitor and control
labour and job costs.
1.6.3 Decision Support Systems (DSS)
A Decision Support Systems (DSS) is an organized collection of people, procedures,
software, databases, and devices that support operations planning and problem-specific decision
making. Whereas an MIS helps an organization “do things right,” a DSS helps to “do the right
thing.”
A DSS goes beyond a traditional MIS by providing immediate assistance in solving
problems. A DSS can help by suggesting alternatives and assisting in final decision making. To
conduct an analysis, business owners and managers use an interface -- a dashboard -- to select a
particular graphic representation of a key performance indicator that measures the progress toward
meeting a specific goal. For example, a manufacturing dashboard might display a graphic
representing the number of products manufactured on a particular line
Decision support systems are used when the problem is complex and the information needed
to determine appropriate action is difficult to obtain and use. A DSS recognizes that different
managerial styles and decision types require different systems. For example, two production
managers in the same position trying to solve the same problem might require different information
and support.
A DSS can include a collection of models used to support a decision maker or user (model
base), a collection of facts and information to assist in decision making (database), and systems and
procedures (user interface or dialogue manager) that help decision makers and other users interact
with the DSS.
1.6.4 Transaction Processing Systems (TPS)
Since the 1950s, computers have been used to perform common business applications. Many
of these early systems were designed to reduce costs by automating routine, labor-intensive
business transactions. A transaction is any business-related exchange such as payments to
employees, sales to customers, or payments to suppliers. Thus, processing business transactions was
the first computer application developed for most organizations. A transaction processing system
(TPS) is an organized collection of people, procedures, software, databases, and devices used to
record completed business transactions.
One of the first business systems to be computerized was the payroll system. Other routine
applications include sales ordering, customer billing and customer relationship management, and
inventory control. Because these systems handle and process daily business exchanges, or
transactions, they are all classified as TPSs.
The TPS, unlike a batch system, requires that users interact with the system in real time to
direct the system to collect, store, retrieve and modify data. A user enters transaction data by means
of a terminal, and the system immediately stores the data in a database and produces any required
output.

6
1.7 Levels of Information
Within an organisation planning, control and decision-making is carried out at various levels
within the structure of the organisation.
The three levels at which information can be used are strategic, tactical and operational and
there is a direct correlation between the levels of importance of individuals or groups within an
organisation and the level of information that is being communicated.
1.7.1 Strategic Information
Strategic information is used at the very top level of management within an organisation.
These are chief executives or directors who have to make decisions for the long term.
Strategic information is broad based and will use a mixture of information gathered from
both internal and external sources.
In general a timescale may be from one to five years or even longer depending on the
project. Some oil related projects are planned from the outset to last for 25 or more years. A
supermarket building a new superstore will look at a timescale of 20 years or so, whilst even a small
business may have a five-year strategy.
Strategic plans will have little or no detail in them and more detailed strategic plans will be
made slightly lower down the managerial ladder. A good strategic plan will be easier to flesh out
lower down than a poor or vague strategic plan. Similarly, well-constructed and more detailed
plans will be easier to implement than poorly constructed plans.
1.7.2 Tactical Information
The next level down is the tactical level, and tactical planning and decision-making takes
place within the guidelines set by the strategic plan.
Tactical information will be mostly internal with a few external sources being used. Internal
information is likely to be function related: for example, how much ‘down time’ a production line
must allocate for planned maintenance.
Tactical information is used by middle management (employees) when managing or
planning projects.
The timescale is usually at least between 6 months and 5 years (depending on the scale of
the strategic project). Circumstances vary but a small project may have a tactical timescale of
between one and six months.
Tactical plans have a medium level of detail and will be very specific; they deal with such
matters as who is doing what and within what specific budgets and timescales.
These plans have medium scope and will address details at the operational level. They will
generally have specific objectives and be geared towards implementation by operational level
employees.
1.7.3 Operational Information
The lowest level is operational and operational planning takes place based on the tactical

7
plans.
The lowest level of management or workers in an organisation implements operational
plans. These may be section leaders or foremen in a large organisation or workers such as shop
assistants, waiting staff, and kitchen staff, etc., in smaller businesses where there is no supervisory
layer.
The timescale is usually very short, anything from immediately, daily or at most a week or
month.
Results of operational work will usually be passed upwards to let the tactical planners
evaluate their plans.
1.8 Introduction to Office Automation
Office automation technologies offer significant opportunities to increase the productivity
and effectiveness of professional, administrative and clerical personnel. The availability of these
technologies, range of capabilities, and low cost in comparison to traditional technologies have
encouraged to maximize the use of office automation technology whenever practical.
The office automation is defined from a functional perspective as any information
technology application, Office automation is intended to provide elements which make it possible to
simplify, improve, and automate the organization of the activities of a company or a group of
people (management of administrative data, synchronization of meetings, etc.).
Considering that company organizations require increased communication, today, office
automation is no longer limited to simply capturing handwritten notes. In particular it also includes
multiple functions that emphasize:
 Enhancing communications of information/messages among components or individuals
 Providing personal services such as calendaring or decision support tools to management or
professionals
 Providing analytical tools (such as spreadsheets and related graphics) for managerial and
professional personnel
 Providing support for the creation, communication, storage, retrieval, distribution and
control of office information (such as correspondence and reports).
Accordingly, an office automation design concept may incorporate traditional hardware and
software, telecommunications and/or more specialized office automation equipment such as word
processors and micro/mini computers. An office systems design may also incorporate ancillary
technologies such as reprographics (copiers and facsimile), dictation systems or optical character
readers.
1.8.1 Office suite tools
The term "office suite" refers to all software programs which make it possible to meet office
needs. In particular, an office suite therefore includes the following software programs:

 Word processing
 Spreadsheet
 Presentation tool
 Database

8
 Scheduler
The main office suites are:

 OpenOffice (freeware)
 AppleWorks
 Corel WordPerfect
 IBM/Lotus SmartSuite
 Microsoft Office
 Sun StarOffice

9
2. NUMBER SYSTEMS
(UNIT-I)
Introduction
A number system in computer ideology is regarded as the method or system of
representation of digits to be understood by the machine/computer. The digital computer represents
all kinds of data and information in binary numbers. This implies every value/number that you are
giving as input to the computer system and getting the data as output has a defined number system.
The value/data the total number of digits used in a number system is called its base or radix. The
base is written after the number as subscript; for instance (1000110)2 (1000110 base 2), 5610 (56 to
base of 10), (71)8 (71 base 8) etc.
Computer architecture supports following number systems.
i. Binary number system (Base 2)
ii. Octal number system (Base 8)
iii. Decimal number system (Base 10)
iv. Hexadecimal number system (Base 16)

2.1 Positional Number Systems


A positional number system allows the expansion of the original set of symbols so that they
can be used to represent any arbitrarily large (or small) value.
For example, our decimal number system is said to be base 10, or have a radix of 10 because it
consists of 10 unique numerals or symbols:
Radix ¼ Base the number of numerals in the number system

2.1.1 Generic Structure


In order to represent larger or smaller numbers than the lone numerals in a number system
can represent, we adopt a positional system. In a positional number system, the relative
position of the numeral within the overall number dictates its value.

Fig. 2.1 Definition of radix point


Next, we need to define the position of each numeral with respect to the radix point. The
position of the numeral is assigned a whole number with the number to the left of the radix point
having a position value of 0. The position number increases by 1 as numerals are added to
the left (2, 3, 4 .. .) and decreased by 1 as numerals are added to the right ( 1, 2, 3).

Fig. 2.2 Definition of position number (p) within the number


For example, the binary system uses the term bit instead of digit; however, using the term
digit to describe a generic numeral in any system is still acceptable. Figure 2.3 shows the generic
subscript notation used to describe the position of each digit in the number.

10
Fig. 2.3 Digit Notation

2.2 Binary Number System (Base 2)


The binary number system contains two unique numerals (0 and 1). This system is thus a
base 2 or a radix 2 system. The relative magnitudes of the symbols are 0 < 1. At first glance, this
system looks very limited in its ability to represent large numbers due to the small number of
numerals

2.3 Octal Number System (Base 8)


The octal number system contains 8 unique numerals (0, 1, 2, 3, 4, 5, 6, 7). This system is
thus a base 8 or a radix 8 system. The relative magnitudes of the symbols are 0 < 1 < 2 < 3 < 4 < 5 <
6 < 7. We use the generic term digit to describe the numerals within an octal number.

2.4 Hexadecimal Number System (Base 16)


The hexadecimal number system contains 16 unique numerals. This system is most often
referred to in spoken word as “hex” for short. Since we only have 10 Arabic numerals in our
familiar decimal system, we need to use other symbols to represent the remaining 6 numerals. We
use the alphabetic characters A–F in order to expand the system to 16 numerals. The 16 numerals in
the hexadecimal system are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.

Table 2.1: Number System Equivalency

2.5 Base Conversion


The weight of each position in decimal is defined as Weight = (Radix)p

11
Fig. 2.4 Weight definition
2.5.1 Converting Binary to Decimal
Example 1: Convert (10110) 2 into a decimal number.
The binary number given is 1 0 1 1 0
Positional weights 43210
The positional weights for each of the digits are written below each digit. Hence the decimal
equivalent number is given as:
1 × 24 + 0 × 23 + 1 × 22 + 1 × 21 + 0 × 20
= 16 + 0 + 4 + 2 + 0
= (22)10.
Hence we find that here, for the sake of conversion, we have to multiply each bit with its positional
weights depending on the base of the number system.
2.5.2 Converting Octal to Decimal
Example 2: Convert (3462)8 into a decimal number.
The octal number given is 3 4 6 2
Positional weights 3210
The positional weights for each of the digits are written below each digit. Hence the decimal
equivalent number is given as:
3 × 83 + 4 × 82 + 6 × 81 + 2 × 80
= 1536 + 256 + 48 + 2
= (1842)10.
2.5.3 Converting Hexadecimal to Decimal
Example 3: Convert (42AD)16 into a decimal number.
The hexadecimal number given is 4 2 A D
Positional weights 3210
The positional weights for each of the digits are written in below each digit. Hence the decimal
equivalent number is given as:
4 × 163 + 2 × 162 + 10 × 161 + 13 × 160
= 16384 + 512 + 160 + 13
= (17069)10.

2.6 Fractional Conversion


So far we have dealt with the conversion of integer numbers only. Now if the number contains the
fractional part we have to deal in a different way when converting the number from a different
number system (i.e., binary, octal, or hexadecimal) to a decimal number system or vice versa. We
illustrate this with examples.
Example 4 Convert (1010.011)2 into a decimal number.
The binary number given is 1 0 1 0. 0 1 1
Positional weights 3 2 1 0 -1-2-3

12
The positional weights for each of the digits are written in italics below each digit. Hence the
decimal equivalent number is given as:
1 × 23 + 0 × 22 + 1 × 21 + 0 × 20 + 0 × 2 –1 + 1 × 2 –2 + 1 × 2 –3
= 8 + 0 + 2 + 0 + 0 + 0.25 + 0.125
= (10.375)10.

Example 5 Convert (362.35)8 into a decimal number.


The octal number given is 3 6 2. 3 5
Positional weights 2 1 0 -1-2
The positional weights for each of the digits are written in italics below each digit. Hence the
decimal equivalent number is given as:
3 × 82 + 6 × 81 + 2 × 80 + 3 × 8 –1 + 5 × 8 –2
= 192 + 48 + 2 + 0.375 + 0.078125
= (242.453125)10.

Example 6 Convert (42A.12)16 into a decimal number.


The hexadecimal number given is 4 2 A. 1 2
Positional weights 2 1 0 -1-2
The positional weights for each of the digits are written in italics below each digit. Hence the
decimal equivalent number is given as:
4 × 162 + 2 × 161 + 10 × 160 + 1 × 16 –1 + 1 × 16 –2
= 1024 + 32 + 10 + 0.0625 + 0.00390625
= (1066.06640625)10.

2.7 Converting from Decimal


The process of converting from decimal to another base consists of two separate algorithms.
There is one algorithm for converting the whole number portion of the number and another
algorithm for converting the fractional portion of the number.
For example, the conversion would be stated as “convert this decimal number to binary with a
fractional accuracy of 4 bits.” This means the algorithm would stop once 4-bits of fraction had been
achieved in the conversion.
2.7.1 Converting Decimal to Binary
Fig. 2.5 shows the step-by-step process converting a decimal number to binary.

13
Fig. 2.5 Converting Decimal to Binary

2.7.2 Converting Decimal to Octal


Fig. 2.6 shows the step-by-step process converting a decimal number to Octal.

Fig. 2.6 Converting Decimal to Octal

14
2.7.3 Converting Decimal to Hexadecimal
Let’s convert 254.65510 to hexadecimal with an accuracy of three fractional digits. When
doing this conversion, all of the divisions and multiplications are done using decimal. If the results
end up between 1010 and 1510, then the decimal numbers are substituted with their hex symbol
equivalent (i.e., A to F). Fig. 2.7 shows the step-by-step process of converting a decimal number to
hex with a fractional accuracy of three digits.

Fig. 2.7 Converting Decimal to Hexadecimal

2.8 Converting Between 2n Bases


Converting between 2n bases (e.g., 2, 4, 8, 16) takes advantage of the direct mapping that
each of these bases has back to binary. Base 8 numbers take exactly 3 binary bits to represent all 8
symbols (i.e., 08 ¼ 0002, 78 ¼ 1112). Base 16 numbers take exactly 4 binary bits to represent all 16
symbols (i.e., 016 ¼ 00002, F16 ¼ 11112).

2.8.1 Binary to Octal


Example 7: Convert (101101010)2 into an equivalent octal number.
The binary number given is 101101010
Starting with LSB and grouping 3 bits 101 101 010
Octal equivalent 552
Hence the octal equivalent number is (552)8

15
Fig. 2.8 shows the step-by-step process of converting a fractional binary number to octal.

Fig.2.8 Converting Binary to Octal

2.8.2 Binary to Hexadecimal


Example 8: Convert (11010110)2 into an equivalent hexadecimal number.
The binary number given is 11010110
Starting with LSB and grouping 4 bits 1101 0110
Hexadecimal equivalent D 6
Hence the hexadecimal equivalent number is (D6)16.
Fig. 2.9 shows the step-by-step process of converting a fractional binary number to hexadecimal.

Fig.2.9 Converting Binary to Hexadecimal

2.8.3 Octal to Binary


Example 9: Convert (235)8 into an equivalent binary number.
The octal number given is 235
3-bit binary equivalent 010 011 101
Hence the binary number is (010011101)2.

16
Fig. 2.10 shows the step-by-step process of converting fractional octal number to binary.

Fig. 2.10 Converting Octal to Binary

2.8.4 Hexadecimal to Binary


Example 10: Convert (29C)16 into an equivalent binary number.
The hexadecimal number given is 2 9 C
4-bit binary equivalent 0010 1001 1100
Hence the equivalent binary number is (001010011100)2.

Fig. 2.11 shows the step-by-step process of converting a fractional hexadecimal number to binary.

Fig. 2.11 Converting Hexadecimal to Binary

2.8.5 Octal to Hexadecimal


When converting between 2n bases (excluding binary) the number is first converted into
binary and then converted from binary into the final 2n base using the algorithms described before.

Example 11: Convert (247)8 into an equivalent hexadecimal number.


Given octal number is 2 4 7
Binary equivalent is 010 100 111= 010100111
Forming groups of 4 bits from the LSB 1010 0111
Hexadecimal equivalent A 7
Hence the hexadecimal equivalent of (247)8 is (A7)16.
Fig. 2.12 shows the step-by-step process of converting fractional octal number to hexadecimal.

17
Fig. 2.12 Converting Octal to Hexadecimal

2.8.6 Hexadecimal to Octal


Example 12: Given hexadecimal number is A 7 2 E
Binary equivalent is 1010 0111 0010 1110= 1010011100101110
Forming groups of 3 bits from the LSB 001 010 011 100 101 110
Octal equivalent 123456
Hence the octal equivalent of (A72E)16 is (123456)8.
Fig. 2.13 shows the step-by-step process of converting fractional hexadecimal number to octal.

Fig. 2.13 Converting Hexadecimal to Octal

2.9 1's and 2's Complement of Binary Number


The 1's complement and the 2's complement of binary number are important because they
permit the representation of negative numbers.

18
Binary Number 1 0 1 1 0 0 1 0

1's Complement 0 1 0 0 1 1 0 1

2's Complement of a binary number is found by adding 1 to the LSB of the 1's Complement.
2's Complement= (1's Complement) +1
Binary number 10110010
1'scomplement 01001101
Add 1 + 1
____________________________
2's complement 01001110

2.10 Binary Arithmetic


Arithmetic is the process of applying a mathematical operator (such as negation or addition)
to one or more operands (the values being operated upon). Binary arithmetic works exactly like
decimal arithmetic, except that base 2 (not 10) governs how individual digits are interpreted and
manipulated.
2.10.1 Addition (Carries)

Fig. 2.14 Single bit Addition

Fig. 2.15 shows the process when adding two 4-bit numbers.

Fig. 2.15 Multiple-Bit Binary Addition

19
2.10.2 Subtraction (Borrows)
Fig. 2.16 shows how subtraction is performed on two individual bits.

Fig. 2.16 Single-Bit Binary Subtraction

Fig. 2.17 shows this process when subtracting two 4-bit numbers.

Fig. 2.17 Multiple-Bit Binary Subtraction

2.11 Unsigned and Signed Numbers

Unsigned Numbers
The range would be defined as 0 < Nunsigned < (2n - 1):
Fig. 2.18 shows the process for a 16-bit number.

Fig. 2.18 Finding the Range of an Unsigned Number

20
Signed Numbers - Signed Magnitude

Fig. 2.19 Decimal Values That a 4-bit, Signed Magnitude Code Can Represent

Fig. 2.20 Finding the Range of a Signed Magnitude Number

Fig. 2.21 Finding the Decimal Value of a Signed Magnitude Number

2.12 Binary Code


In the coding, when numbers, letters or words are represented by a specific group of
symbols, it is said that the number, letter or word is being encoded. The group of symbols is called

21
as a code. The digital data is represented, stored and transmitted as group of binary bits. This group
is also called as binary code. The binary code is represented by the number as well as alphanumeric
letter.

Advantages of Binary Code


Following is the list of advantages that binary code offers.
Binary codes are suitable for the computer applications.
Binary codes are suitable for the digital communications.
Binary codes make the analysis and designing of digital circuits if we use the binary codes.
Since only 0 & 1 are being used, implementation becomes easy.
Classification of binary codes: The codes are broadly categorized into following four categories.
 Weighted Codes
 Non-Weighted Codes
 Binary Coded Decimal Code
 Alphanumeric Codes
2.12.1 Weighted Codes
Weighted binary codes are those binary codes which obey the positional weight principle.
Each position of the number represents a specific weight. Several systems of the codes are used to
express the decimal digits 0 through 9. In these codes each decimal digit is represented by a group
of four bits.

Fig. 2.22 Binary Code Representation


2.12.2 Non-Weighted Codes
In this type of binary codes, the positional weights are not assigned. The examples of non-
weighted codes are Excess-3 code and Gray code.

Excess-3 code
The Excess-3 code is also called as XS-3 code. It is non-weighted code used to express
decimal numbers. The Excess-3 code words are derived from the 8421 BCD code words adding
(0011)2 or (3)10 to each code word in 8421. The excess-3 codes are obtained as follows −

22
Fig. 2.23 Excess-3 code
Gray Code
It is the non-weighted code and it is not arithmetic codes. That means there are no specific
weights assigned to the bit position. It has a very special feature that, only one bit will change each
time the decimal number is incremented as shown in fig. As only one bit changes at a time, the gray
code is called as a unit distance code. The Gray code is a cyclic code. Gray code cannot be used for
arithmetic operation.

Fig. 2.24 Gray code


Application of Gray code
Gray code is popularly used in the shaft position encoders.
A shaft position encoder produces a code word which represents the angular position of the shaft.

2.12.3 Binary Coded Decimal (BCD) code


In this code each decimal digit is represented by a 4-bit binary number. BCD is a way to
express each of the decimal digits with a binary code. In the BCD, with four bits we can represent
sixteen numbers (0000 to 1111). But in BCD code only first ten of these are used (0000 to 1001).
The remaining six code combinations i.e. 1010 to 1111 are invalid in BCD.

23
Fig. 2.25 BCD code
Advantages of BCD Codes
 It is very similar to decimal system.
 We need to remember binary equivalent of decimal numbers 0 to 9 only.
Disadvantages of BCD Codes
 The addition and subtraction of BCD have different rules.
 The BCD arithmetic is little more complicated.
 BCD needs more number of bits than binary to represent the decimal number. So BCD is
less efficient than binary.

2.12.4 Alphanumeric codes


A binary digit or bit can represent only two symbols as it has only two states '0' or '1'. But
this is not enough for communication between two computers because there we need many more
symbols for communication. These symbols are required to represent 26 alphabets with capital and
small letters, numbers from 0 to 9, punctuation marks and other symbols.
The alphanumeric codes are the codes that represent numbers and alphabetic characters.
Mostly such codes also represent other characters such as symbol and various instructions necessary
for conveying information. An alphanumeric code should at least represent 10 digits and 26 letters
of alphabet i.e. total 36 items. The following three alphanumeric codes are very commonly used for
the data representation.
American Standard Code for Information Interchange (ASCII).
Extended Binary Coded Decimal Interchange Code (EBCDIC).
Five bit Baudot Code.
ASCII code is a 7-bit code whereas EBCDIC is an 8-bit code. ASCII code is more
commonly used worldwide while EBCDIC is used primarily in large IBM computers.

24
UNIT - II
UNIT-II
3. An Overview of Computer System

INTRODUCTION
In this lesson we present an overview of the basic design of a computer system: how the
different parts of a computer system are organized and various operations performed to perform
a specific task. You would have observed that instructions have to be fed into the computer in a
systematic order to perform a specific task. Computer components are divided into two major
categories, namely, hardware and software. In this lesson we will discuss about hardware, i.e.,
the machine itself and its connected devices such as monitor, keyboard, mouse etc., as well as
software that makes use of hardware for performing various functions.

OBJECTIVES
After going through this topic you would be able to:
 Explain basic organization of computer system
 Explain different types of input and output devices
 Define Software and its classification
 Distinguish between system software and application software.
 Describe computer language and its classification
 Describe the differences between assembler, compiler and interpreter

3.1 What is a Computer?


Computer is a device that transforms data into meaningful information. Data can be
anything like marks obtained by you in various subjects. It can also be name, age, sex, weight,
height, etc. of all the students in a class.
Computer can also be defined in terms of functions it can perform. A computer can
i) accept data, ii) store data, iii) process data as desired, and iv) retrieve the stored data as and
when required and v) print the result in desired format.
The major characteristics of a computer are high speed, accuracy, diligence versatility
and storage.

3.2 Computer Organization


The block diagram of computer is shown in fig. 3.1

25
Fig. 3.1 Block diagram of Computer Organisation

The computer performs basically five major operations of functions irrespective of their
size and make. These are a) it accepts data or instruction by way of input, b) it stores data, c) it
can process data as required by the user, d) it gives results in the form of output, and e) it
controls all operations inside a computer. We discuss below each of these operations.

Input: this is the process of entering data and programs into the computer system.

Control Unit (CU): The process of input, output, processing and storage is performed under the
supervision of a unit called 'Control Unit'. It decides when to start receiving data, when to stop it,
where to store data, etc. It takes care of step-by-step processing of all operations in side the
computer.

Memory Unit: Computer is used to store data and instructions.

Arithmetic Logic Unit (ALU): The major operations performed by the ALU are addition,
subtraction, multiplication, division, logic and comparison.

Output: This is the process of producing results from the data for getting useful information.

The ALU and the CU of a computer system are jointly known as the central processing unit
(CPU). You may call CPU as the brain of any computer system.

26
3.3 Peripheral Devices

Peripheral devices are connected to the computer externally. These devices are used for
performing some specific functions. Peripheral devices are as follows:
 Input Devices
 Output Devices
 Other Peripherals.

Fig. 3.2 Different peripheral devices of Computer

3.3.1 Input Devices


Input devices accept data and instructions from the user.
Following are the examples of various input devices, which are connected to the computer for
this purpose.

i. Keyboard
ii. Mouse
iii. Optical/magnetic Scanner
iv. Touch Screen
v. Light Pen
vi. Microphone for voice as input
vii. Track Ball

i. Keyboard
A keyboard (as shown in figure 3.3) is the most common input device. Several kinds of
keyboards are available, but they resemble each other with minor variations. The key board in
most common use is the QWERTY board. Generally standard keyboard has 104 keys. In these
keyboards, the cursor control keys are duplicated to allow easier use of the numeric pad.

27
Fig. 3.3 Keyboard

ii. Mouse
A mouse is an electro-mechanical, hand-held device (as shown in figure 3. 4). It is used
as a pointer. It can perform functions like selecting menu commands, moving icons, resizing
windows, starting programs, and choosing options.

Fig. 3.4 Mouse

The most common mouse uses an internal, magnetically coated ball, to detect the
movement of the mouse across a flat surface, usually a desktop. Now a days Optical or laser
mouse is used to detect the movement. All windows based applications today are designed to
work with a mouse. A mouse is used to replace hard -to-remember key combinations with easier
"Point and Click" actions. However, it cannot substitute all keyboard operations. It can be
alternative for commands based operations.

iii. Optical Scanner


These devices are used for automatic data collection. The devices of this category
completely eliminate manual input of data. For example, the bar-code reader is actually just a
special type of image scanner. An image scanner translates printed images into an electronic
format that can be stored in a computer’s memory, and with the right kind of software, one can

28
alter a stored image. Another example of scanner is optical character recognition (OCR) device,
used by banks to convert the scanned image of a typed or printed page into text that can be

Fig. 3.5 Scanner


iv. Touch Screen
Touch panel displays and pads are now being offered as alternatives to keyboard. Here
the input can be given through the computer screen, that accepts the input through monitor; users
touch electronic buttons displayed on the screen or they may use light pen.

Fig. 3.6 Touch Screen Monitor


3.3.2 Output Devices
Output devices return processed data that is information, back to the user. Some of the
commonly used output devices are
i. Monitor (Visual Display Unit)
ii. Printers
iii. Plotter
iv. Speakers

i. Monitor
Out of all the output devices, monitor (as shown in figure 1.7) is perhaps the most
important output device because people interact with this device most intensively than others.

29
Fig. 3.7 CRT and LCD Monitor

Computer information is displayed, visually with a video adapter card and monitor.
Information processed within the CPU, that needs to be visually displayed, is sent to video
adapter. The video adapter converts information from the format used, in the same manner as a
television displays information sent to it by a cable service. `
Two basic types of monitors are used with microcomputers, which are as follows:
 CRT
 LCD

Cathode Ray Tube (CRT):


CRT or Cathode Ray Tube Monitor is the typical monitor that you see on a desktop
computer. It looks a lot like a television screen, and works the same way. This type uses a large
vacuum tube, called cathode ray tube (CRT).

Liquid Crystal Displays (LCD):


This type of monitors are also known as flat panel monitor. Most of these employ liquid
crystal displays (LCDs) to render images. These days LCD monitor are very popular. When
people talk about the capabilities of various monitors, one critical statistic is the resolution of the
monitor. Most monitors have a resolution of at least 800 x 600 pixels. High-end monitors can
have resolutions of 1024 x 768 pixels or even 1280 x 1024 pixels. Thus monitors are available
either in low resolution or in high resolution.

ii. Printer
After a document is created on the computer, it can be sent to a printer for a hard copy
(printout). Some printers offer special features such as colored and large page formats. Some of
the most commonly used printers are:
 Laser Printer
 Ink Jet Printer
 Dot Matrix Printer
 Line Printer

30
Laser Printer:
A laser printer produces high quality print that one normally finds in publishing. It is
extremely fast and quiet. Moreover, the operation of a laser printer is easy with automatic paper
loading and no smudging or messing up of ink ribbons. The fastest laser printer can print up to
200 pages per minute in monochrome (black and white) and up to 100 pages per minute in
color.

Fig. 3.8 Laser Printer


Ink-Jet Printer:
An ink-jet printer creates an image directly on paper by spraying ink through as many as
64 tiny nozzles. Although the image it produces is not generally quite as sharp as the output of a
laser printer, the quality of ink-jet images is still high. In general, ink-jet printer offers an
excellent middle ground between dot matrix and laser printer. Like laser printer, an ink-jet
printer is quiet and convenient, but not particularly fast.

Dot Matrix Printer:


The dot matrix printer was very popular at one point of time. It is a very versatile and
inexpensive output device. In dot matrix printer the print head physically "hits" the paper
through the ribbon and produces text (or images) by combinations of dots; hence the name dot
matrix printer. Its speed is measured in characters per second (CPS). Although it is less
expensive, it is louder, slower and produces lower print quality.

Line Printer:
A line printer is generally used with large computer systems to produce text based data
processing reports. Line printers are high-speed printers with speeds ranging anywhere from 100
to about 3800 lines per minute. In the past, print quality on line printers was not high.
Developments in technology are improving the print quality on line printers.

iii. Plotter
A plotter is a special kind of output device that, like a printer, produces images on paper,
but does so in a different way. Plotters are designed to produce large drawings or images, such as
construction plans for buildings or blueprints for mechanical objects. A plotter can be connected
to the port normally used by a printer.

31
An array of different colored pens in a clip rack and a robotic arm is part of plotter. The
instructions that a plotter receives from a computer consist of a color, and beginning and ending
coordinates for a line. With that information, the plotter picks up the appropriate pen through its
arm, positions it at the beginning coordinates drops the pen down to the surface of the paper and
draws to the ending coordinates. Plotters draw curves by creating a sequence of very short
straight lines.

Plotters usually come in two designs:


Flat Bed: Plotters of small size to be kept on table with restriction of paper size.
Drum: These plotters are of big size using rolls of paper of unlimited length.

iv. Speaker
Speakers are another type of output device, which allow you to listen to voice like music,
and conversation with people.

3.4 Software
As you are aware, computer cannot do anything on its own. It is the user who instructs
computer; what to do, how to do and when to do. In order to perform any task, you have to give a
set of instructions in a particular sequence to the computer. These sets of instructions are called
Programs. Software refers to a set of programs that makes the hardware perform a particular set
of tasks in particular order. Software can be classified mainly into following categories and sub-
kcategories are shown in fig. 3.9

Fig. 3.9 Classification of Software

32
3.4.1 System Software
When you switch on the computer the programs stored in ROM are executed which
activates different units of your computer and makes it ready for you to work on it. This set of
programs can be called system software.
System softwares are sets of programs, responsible for running the computer, controlling
various operations of computer systems and management of computer resources.

Operating System (OS) falls under this category.


An operating system is a system software that provides an interface for a user to
communicate with the computer, manages hardware devices (disk drives, keyboard, monitor,
etc), manages and maintains disk file systems and supports application programs. Some popular
Operating systems are UNIX, Windows and Linux.
Although operating system provides all the features users need to use and maintain their
systems, inevitably, they still do not meet everyone’s expectations. This has led to another type
of system software called "Utilities". These are programs that bridge the gap between the
functionality of an OS and the needs of users. Utility programs are a broad category of software
such as compress (zip)/uncompress (unzip) files software, anti virus software, split and join files
software, etc.

3.4.2 Application Software


Application software is a set of programs, which are written to perform specific tasks, for
example: An application package for managing library known as library information system is
used to manage information of library such as: keeping book details, account holder details, book
issue details, book return details etc. Another application package for managing student details is
called student’s information system, manages student’s roll no, name, parents name, address,
class, section, processing of examination results etc. Application software can be broadly
classified into two types:
i. Generalized packages.
ii. Customized packages.

i. Generalized Packages
These are user friendly softwares written to cater to user’s very general needs such as
preparing documents, drawing pictures, database to manage data/information, preparing
presentations, play games etc. It is a group of programs that provide general purpose tools to
solve specific problems. Some of the generalized packages are listed below:

 Word Processing Software(for preparing documents): Word Perfect, MS-Word,


OpenOffice.org Writer
 Spreadsheets (Data Analysis): Lotus Smart suites, MS-Excel, OpenOffice.org Calc,
Apple Numbers.

33
 Presentations : Presentation Graphics, MS-Power Point, OpenOffice.org Impress
 Database Management System: MS-Access, OpenOffice.org Base, MS-SQL Server,
ORACLE
 Graphics Tools: Paint shop pro, Adobe Photo shop

ii. Customized Packages


These are the applications that are customized (or developed) to meet the specific
requirements of an organization/institution. For Example: Student information details, Payroll
packages, inventory control etc.
These packages are developed using high-level computer.

3.5 Computer Languages


Languages are a means of communication. Normally people interact with each other
through a language. On the same pattern, communication with computers is carried out through a
language. This language is understood both by user and the machine. Just as every language like
English, Hindi has its grammatical rules; every computer language is bound by rules known as
SYNTAX of that language. The user is bound by that syntax while communicating with the
computer system.

Computer languages are broadly classified as:


3.5.1 Low Level Language:
The term low level means closeness to the way in which machine understand. The low
level languages are:

i. Machine Language:
This is the language (in the form of 0’s and 1’s, called binary numbers) understood
directly by the computer. It is machine dependent. It is difficult to learn and even more difficult
to write programs.

ii. Assembly Language:


This is the language where the machine codes comprising of 0’s and 1’s are substituted
by symbolic codes (called mnemonics) to improve their understanding. It is the first step to
improve programming structure.
Assembly language programming is simpler and less time consuming than machine level
programming, it is easier to locate and correct errors in assembly language than in machine
language programs. It is also machine dependent. Programmers must have knowledge of the
machine ok2n which the program will run.

34
iii. High Level Language:
You know that low level language requires extensive knowledge of the hardware since it
is machine dependent. To overcome the limitation, high level language has been evolved
which uses normal English like, easy to understand statements to solve any problem. Higher
level languages are computer independent and programming becomes quite easy and simple.

Various high level languages are given below:


 BASIC (Beginners All Purpose Symbolic Instruction Code):
It is widely used, easy to learn general purpose language. Mainly used in microcomputers
in earlier days.
 COBOL (Common Business Oriented language): A standardized language used for
commercial applications.
 FORTRAN (Formula Translation): Developed for solving mathematical and scientific
problems. One of the most popular languages among scientific community.
 C: Structured Programming Language used for all purpose such as scientific application,
commercial application, developing games etc.
 C++: Popular object oriented programming language, used for general purpose.

3.6 Compilers, Assemblers and Interpreters


As you know that High Level language is machine independent and assembly language
though it is machine dependent yet mnemonics that are being used to represent instructions are
not directly understandable by machine. Hence to make the machine understand the instructions
provided by both the languages, Compiler and Assembler are required to convert these
instructions into machine language.
The software (set of programs) that reads a program written in high level language and
translates it into an equivalent program in machine language is called as Compiler.
The program written by the programmer in high level language is called source program
and the program generated by the compiler after translation is called as object program.

Fig. 3.10 Compiler


3.6.1 Interpreter
An interpreter, like a compiler, translates high-level language into low-level machine
language. The difference lies in the way they read the source code or input. A compiler reads the
whole source code at once, creates tokens, checks semantics, generates intermediate code,

35
executes the whole program and may involve many passes. In contrast, an interpreter reads a
statement from the input, converts it to an intermediate code, executes it, then takes the next
statement in sequence. If an error occurs, an interpreter stops execution and reports it. whereas a
compiler reads the whole program even if it encounters several errors.
The software (set of programs) that reads a program written in assembly language and
translates it into an equivalent program in machine language is called as Assembler.

Fig. 3.11 Assembler

3.6.2 Linker
Linker is a computer program that links and merges various object files together in order
to make an executable file. All these files might have been compiled by separate assemblers. The
major task of a linker is to search and locate referenced module/routines in a program and to
determine the memory location where these codes will be loaded, making the program
instruction to have absolute references.

3.6.3 Loader
Loader is a part of operating system and is responsible for loading executable files into
memory and execute them. It calculates the size of a program (instructions and data) and creates
memory space for it. It initializes various registers to initiate execution.

3.6.4 Relative merits of Compiler and Interpreters


The main difference between an interpreter and a compiler is that compilation requires
analysis and the generation of machine code only once, whereas an interpreter may need to
analyses and interpret the same program statements each time it meets them e.g. instructions
appearing within a loop.
When an interpreter encounters an error it reports it to the user immediately and halts
further execution of the program. Such instant feedback, pinpointing the exact location of the
error, helps the programmer to find and remove errors.
Compilers, on the other hand, analyses the entire program, taking note of where errors
have occurred, and places these in an error/diagnostic file. If errors have occurred then the
program cannot run. Programmers must then use the error messages to identify and remove the
errors in the source code. Some compilers assist by adding line numbers to the source listing to
help pinpoint errors and all compilers will describe the nature of the error e.g. missing semi-

36
colon, expected keyword, etc. - although interpreting some compiler diagnostics is a skill in
itself.
Error correction can be very time-consuming and frustrating, particularly in the case
where spurious errors occur, e.g. many errors are highlighted in the source but the cause of the
error is a single, simple mistake. An example of this would be errors that are generated by, say, a
compiler, if a programmer simply misses out a semi-colon.
Another important difference is that interpreters can be 2 to 10 times slower than
compilers. One reason for this is that they translate the same statements within a loop over and
over again. Compilers can produce much more efficient object code than interpreters thus
making the compiled programs to run faster.
Interpreters however are easier to use, particularly for beginners, since errors are
immediately displayed, corrected by the user, until the program is able to be executed. On the
whole compilers tend to be more difficult to use.

37
UNIT - III
UNIT-III
4. OPERATING SYSTEMS

4.1 EVOLUTION OF OPERATING SYSTEM


Computer software is roughly divided into two main categories - application software and
operating system software. Applications are programs used by people to carry out various tasks, such
as writing a letter, creating a financial spreadsheet, or querying a customer database. Operating
systems, on the other hand, manage the computer system on which these applications run. Without an
operating system, it would be impossible to run any of the application software we use every day, or
even to boot up the computer.
An operating system functions in much the same way as other software. It is a collection of
programs that are loaded into memory and executed by the processor. When the computer is powered
down it exists only as a collection of files on a disk drive. The main difference is that, once it is
running, it has a large measure of control over both the processor itself and other system resources. An
application program is frequently given control of the processors for short periods of time in order to
carry out its allotted task, but control always reverts to the operating system, which can then either use
the processor itself or allocate it to another program.
The operating system, then, controls the operation of the computer. This includes determining
which programs may use the processor at any given time, managing system resources such as working
memory and secondary storage, and controlling access to input and output devices. In addition to
controlling the system itself, the operating must provide an interface between the system and the user
which allows the user to interact with the system in an optimal manner.

4.1.1 Batch Process


In the early days of computing, scheduling computing tasks was a problem because time on the
computer had to be booked in advance, typically in half-hour blocks or multiples thereof. If the
operator encountered problems and the program did not successfully run to completion in the allotted
time, a new time slot had to be booked and the program would have to be run again from the
beginning. Each program had to be loaded into memory and compiled before it could run, which could
involve a significant amount of setup time. Gradually, the software tools that would automate some of
the setup and troubleshooting tasks were evolved, including linkers, loaders, compilers, assemblers and
debuggers.
In order to improve the utilisation of computing resources, the concept of a batch operating
system was devised. Such an operating system was known as the monitor. The operator now batched
individual jobs together sequentially and placed them on an input device. The monitor would load and
run one job at a time. On completion, each job returned control to

37
the monitor, which would then load the next job.Control would also return to the monitor if an error
was encountered.
It improved utilisation of computing resources, enabling jobs to be executed quickly, with little
or no idle time and a greatly reduced setup time. One issue that came to the fore at this time was the
need to protect the memory occupied by the monitor program from a running program. In addition, the
execution of certain machine level instructions, such as I/O instructions, was deemed to be the preserve
of the monitor.

Fig. 4.1 The monitor program was an early form of operating system

4.1.2 Multiprogramming and Time Sharing


Even with batch operating systems, the processor was often idle because I/0 devices were slow
by comparison with the processor. The computer spent much of its time waiting for I/O operations to
finish. At that time, the memory held the operating system and the currently executing user program. If
it were possible for memory to hold a second program, then the processor could be used by the second
program while the first program was waiting for I/O operations to finish, making more effective use of
the processor. If enough memory was available, a number of programs could be accommodated
allowing the processor to be utilised continuously. This multiprogramming or multitasking is a
characteristic of modern operating systems.
In a multiprogramming system, a running application can request an I/O operation by sending a
system call to the operating system. The operating system will issue the necessary commands to the I/O
device controller, and then initiate or continue the execution of another program. Multiprogramming
systems rely on the generation of interrupts, which are basically signals sent by a hardware device to
inform the processor that it has completed a task (or has encountered an error). On receipt of an
interrupt, the processor passes control back to the operating system, which executes the necessary
interrupt-handling routine. Multiprogramming operating systems require a high degree of

38
sophistication, since they are responsible for managing memory usage for, and scheduling the
execution of, multiple programs.
In order for the processor's time to be divided fairly between the programs competing for its
use, the operating system interleaves the execution of each program in short time slots. This process is
known as time-sharing, and it prevents one program from hogging the processor to the detriment of
other programs.

4.1.3 Personal Computer Systems


In the early days of commercial computing, the cost of both computer hardware and software
greatly outweighed the cost of employing the data entry personnel who operated the computers.
Programmers therefore wrote programs with a view to creating the most efficient code, and little
consideration was given to the convenience of the operator, or to the suitability of the human-computer
interface. Operators had therefore to learn a number of obscure commands in order to be able to carry
out their data entry duties. Despite a steady decline in the cost of hardware and software, this situation
persisted, even though the economic factors that had created it no longer applied.
Alan Kay formulated the idea of a graphical user interface (or GUI). The interface he envisaged
had all of the features we can now see in a modern desktop environment, including a separate window
for each application, a menu-driven application environment, and many other features now in common
use.
Apple developed the Macintosh, which was far cheaper and consequently more successful. For
the first time, an operating system had been created that reflected the economic reality that the operator
was now a far greater cost factor than the computer hardware or software. The computer was adapted
to suit the operator rather than the other way round. Almost all operating systems now offer a
sophisticated, event-driven, graphical desktop environment designed primarily for ease of use.

4.2 Introduction to Operating System


An operating system acts as an intermediary between the user of a computer and computer
hardware. The purpose of an operating system is to provide an environment in which a user can
execute programs in a convenient and efficient manner.
An operating system is software that manages the computer hardware. The hardware must
provide appropriate mechanisms to ensure the correct operation of the computer system and to prevent
user programs from interfering with the proper operation of the system.

4.2.1 Definition
An operating system is a program that controls the execution of application programs and acts
as an interface between the user of a computer and the computer hardware.
• A more common definition is that the operating system is the one program running at all times
on the computer (usually called the kernel), with all else being application programs.
• An operating system is concerned with the allocation of resources and services, such as
memory, processors, devices and information. The operating system correspondingly includes

39
programs to manage these resources, such as a traffic controller, a scheduler, memory
management module, I/O programs, and a file system.

4.2.2 OS as User Interface


 User
 System and application programs
 Operating system
 Hardware
Every general purpose computer consists of the hardware, operating system, system programs,
and application programs. The hardware consists of memory, CPU, ALU, and I/O devices, peripheral
device and storage device. System program consists of compilers, loaders, editors, OS etc. The
application program consists of business programs, database programs.

Fig. 4.2 Conceptual view of a computer system

Every computer must have an operating system to run other programs. The operating system
coordinates the use of the hardware among the various system programs and application programs for a
various users. It simply provides an environment within which other programs can do useful work.
The operating system is a set of special programs that run on a computer system that allows it
to work properly. It performs basic tasks such as recognizing input from the keyboard, keeping track
of files and directories on the disk, sending output to the display screen and controlling peripheral
devices.

40
OS is designed to serve two basic purposes:
 It controls the allocation and use of the computing System’s resources among the various user
and tasks.
 It provides an interface between the computer hardware and the programmer that simplifies and
makes feasible for coding, creation, debugging of application programs.
The Operating system must support the following tasks.
 Provides the facilities to create, modification of programs and data files using an editor.
 Access to the compiler for translating the user program from high level language to machine
language.
 Provide a loader program to move the compiled program code to the computer’s memory for
execution.
 Provide routines that handle the details of I/O programming.

4.2.3 History of OS
Operating system has been evolving through the years.

Table 4.1: History of OS


Generation Year Electronic device used Types of OS Device
First 1945-55 Vaccum Tubes Plug Boards

Secondt 1955-65 Transistors Batch Systems

Third 1965-80 Integerated Circuits(IC) Multiprogramming


Fourth Since 1980 Large Scale Integration PC

4.2.4 Examples of OS
• Windows (GUI based, PC)
• GNU/Linux (Personal, Workstations, ISP, File and print server, Three-tier client/Server)
• MacOS (Macintosh), used for Apple’s personal computers and work stations (MacBook, iMac).
• Android (Google’s Operating System for smartphones/tablets/smartwatches)
• iOS (Apple’s OS for iPhone, iPad and iPod Touch)

4.3 Functions of OS

4.3.1 Program development:


 The OS provides a variety of facilities and services, such as editors and debuggers, to assist the
programmer in creating programs.
 Typically, these services are in the form of utility programs that, while not strictly part of the
core of the OS, are supplied with the OS and are referred to as application program
development tools.

41
4.3.2 Program Execution:
 A number of steps need to be performed to execute a program. Instructions and data must be
loaded into main memory, I/O devices and files must be initialized, and other resources must be
prepared.
 The OS handles these scheduling duties for the user.
4.3.3 Access to I/O Devices:
 Each I/O device requires its own peculiar set of instructions or control signals for operation.
 The OS provides a uniform interface that hides these details so that programmers can access
such devices using simple reads and writes.
4.3.4 Controlled access to files:
 For file access, the OS must reflect a detailed understanding of not only the nature of the I/O
device (disk drive, tape drive) but also the structure of the data contained in the files on the
storage medium.
 In the case of a system with multiple users, the OS may provide protection mechanisms to
control access to the files.
4.3.5 System access:
 For shared or public systems, the OS controls access to the system as a whole and to specific
system resources.
 The access function must provide protection of resources and data from unauthorized users and
must resolve conflicts for resource contention.
4.3.6 Error detection and response:
 A variety of errors can occur while a computer system is running. These include internal and
external hardware errors, such as a memory error, or a device failure or malfunction; and
various software errors, such as division by zero, attempt to access forbidden memory location,
and inability of the OS to grant the request of an application.
 In each case, the OS must provide a response that clears the error condition with the least
impact on running applications.
 The response may range from ending the program that caused the error, to retrying the
operation, to simply reporting the error to the application.
4.3.7 Accounting:
 A good OS will collect usage statistics for various resources and monitor performance
parameters such as response time.
 On any system, this information is useful in anticipating the need for future enhancements and
in tuning the system to improve performance.
 On a multiuser system, the information can be used for billing purposes.

42
4.4 OS Tasks
Operating system performs the following tasks
● Process management
● Main memory management
● File management
● Secondary storage management
● I/O system management

4.4.1 PROCESS MANAGEMENT


A process can be thought of as a program in execution.
A process needs certain resources including CPU time, memory, files and I/O devices to
accomplish its task. There resources are given to process when it is created or allocated to it when it
is running.
The cpu executes instructions of the process one after another, until the process completes.
At any point in time at most one instruction is executed on behalf of the process.
A process is the unit of work in a system.A system consist of a collection of processes.
Those are operating system process, which executes system code and user processes which
executeds user code.
Operating system shares CPU among the processes.
The operating system is responsible for the following activities in connection with process
management
● Creating and Deleting of user and system processes
● Suspension and Resumption of processes
● Process Synchronization
● Process Communication

4.4.2 Main Memory Management


The Operating system is responsible for the following activities in connection with
memory management.
● Operating system keeps track of which parts of memory are currently being used and by
what processes
● OS decides which processes are to be loaded into memory when memory space becomes
available.
● OS allocates and deallocates memory space as needed.

More than one program is kept in main memory simultaneously. So operating system will
note down beginning and starting address for each program in memory. When some space is free
in memory OS loads new program into memory.
When a program completes its execution, space occupied by that program is deallocated,
means it becomes available.

43
4.4.3 File Management
Computer store information on several types of storage media in form of files
The operating system provides uniform logical view of information storage called file.A file
is allocation of related information defined by its creator.
The OS performs the following activities in connection with file management.
● Creation and deletion of files
● Support of printers for manipulating files.
● Mapping of files on to secondary storage.
● Creation of directories for files.

4.4.4 Secondary Storage Management


When a program is executing it should in main memory.but all the programs when entered
into the computer are not kept in main memory as it is too small to accommodate all programs and
data.
Because of this system provides secondary storage to back up main memory.
Most programs are kept in secondary storage and they are loaded into main memory.
Disks provide secondary storage.
● Free space management
● Storage allocation
● Disk schedule

4.4.5 I/O System Management


OS hides the peculiarities of specific hardware devices from the user. OS provides the
following features for I/O system
● Memory management component including buffering,caching and spooling
● General device driver interface.
● Drivers for specific hardware device.

Only the device driver known the peculiarities of specific devices to which it is assigned.
● Operating system manages all
● I/O devices
● Data transfer and
● Delete I/O completion

In addition to these OS also performs other tasks like


● Protection of process and
● interpretation of commands issued by user

44
4.5 Objectives of OS
 Convenience: An OS makes a computer more convenient to use.
 Efficiency: An OS allows the computer system resources to be used in an efficient manner.
 Ability to evolve: An OS should be constructed in such a way as to permit the effective
development, testing, and introduction of new system functions without interfering with
service.

4.6 Single and Multitasking OS

4.6.1 Single Tasking


Single-tasking refers to focusing on one thing until it is completed. For example, if you are
responding to emails, you block out time to concentrate on that task alone. Single-tasking can seem
inefficient if you are accustomed to juggling multiple tasks. However, the increased focus needed to
single-task can result in your completing a task faster than you would if you multitasked, according to
Psychology Today’s “The Power of Prime.

Fig. 4.3 Single Tasking


4.6.2 Multitasking
Sending emails while talking on the phone is an example of multitasking. When you do several
tasks at one time, you might feel more effective and productive. However, the opposite is true,
according to a Harvard Business Review article. While multitasking, efficiency is reduced by as much
as 40 percent. This is because the brain needs time -- up to 15 minutes -- to refocus on a task after a
distraction. Psychology Today reports that what people think of as multitasking is better described as
“serial tasking,” because you are actually shifting quickly from one task to another.

45
Fig. 4.4 Multi-Tasking
4.7 Single and Multi User OS
Single-user operating systems have no facilities to distinguish users, but may allow multiple
programs to run in tandem.A multi-user operating system extends the basic concept of multi-tasking
with facilities that identify processes and resources, such as disk space, belonging to multiple users,
and the system permits multiple users to interact with the system at the same time. Time-sharing
operating systems schedule tasks for efficient use of the system and may also include accounting
software for cost allocation of processor time, mass storage, printing, and other resources to multiple
users.

Table 4.2: Comparison between Single User and Multi-User Operating System:
Single User Multi-User
Definition A single user Operating A multi-user operating system
system provides facilities to has been designed for more
be used on one computer by than one user to access the
only one user. computer at the same or
Single user, single task: A different time.
single task is performed by Time sharing systems: These
one user at a time. systems multi-user systems in
Example-The Palm OS for which CPU time is divided
Palm handheld computers. among the users. The division
made on the basis of a
schedule.
Types Simple Complex

Examples Windows 95, WindowsNT Unix, Linux and mainframes


Workstation and Windows such as the IBM AS400.
2000
professional.

46
4.8 Characteristics of MS-DOS
MS-DOS is an operating system created by Microsoft in 1982 to run on X86 systems and was
the dominant operating system on the market until the rise of Windows. Microsoft produced several
different versions of the OS which culminated with version 6.22 in 1994, but Windows still carries an
updated version of the code as its command-line interface. Many of the operating system’s
characteristics have survived into modern systems and influence OS design even today.

4.8.1 Command Line Interface


MS-DOS uses a command line interface, forcing the user to input commands at a prompt. The
command set for DOS is limited. It consists mainly of navigation and file manipulation commands.
Most complex operations are handled by the programs themselves. Since users have to enter
commands in sequence, they could create batch files, which are text files listing a series of commands
that the OS would execute in order. One common example of this is AUTOEXEC.BAT, a batch file
that the OS runs on first boot and contains commands to set up the computing environment.
4.8.2 Single Tasks
Microsoft intended MS-DOS to run on early PCs without much in the way of RAM, MS-DOS
features no ability for programs to multitask. When the user runs a program, that program consumes
system resources until it stops, and then another program may access memory. Certain types of
programs called TSRs, for Terminate and Stay Resident, can park themselves in memory, but these
programs are vulnerable to memory overlap and frequently crashed. The first versions of Windows
introduced true multitasking to PCs.
4.8.3 File Names
One distinctive characteristic of MS-DOS is its “8+3” file naming system. File names are
limited to eight characters, with a three-character suffix denoting the type of file. For instance, TXT
and DOC denote text files, while COM and EXE indicate executables and SYS is reserved for system
files. Windows has since done away with the eight-character limit, although file suffixes still indicate
to the OS how to handle each type of file, and many of the original suffixes from the early days of MS-
DOS still exist
4.8.4 Drive Letters
Another prominent characteristic of MS-DOS is its use of letters to refer to drives. Typically, A
and B designate floppy drives, while C and anything later in the alphabet refers to hard drives or
optical drives. Users have the ability to map any drive letter they wish, although typically they would
assign them in alphabetical order. Today, Windows still uses drive letters, and still reserves A and B by
default, despite the fact that modern PCs typically do not contain floppy drives.

47
4.9 Characteristics of UNIX Operating Systems
In general most UNIX operating systems have the following characteristics…

Multi-user & Multi-tasking - most versions of UNIX are capable of allowing multizple users to log
onto the system each capable of running multiple tasks. This is standard for almost any OS now-a-days.

Over 30 Years Old - There is something to be said for the fact that UNIX is over 30 years old and it's
popularity and use are at all time highs. Over these 30 years many variations have spawned off and
many have died off, but much of today’s modern UNIX systems can be traced back to the original
versions. It has endured the test of time. For reference, Windows at best is half as old (Windows 1.0
was released in the mid 80's, but many would argue that it was not by any means stable or complete
enough until the 3.x family which was released in the early 90's).

Large Number of Applications - Although it may not seem it, there is an enormous amount of
applications available for UNIX operating systems. They range from commercial applications such as
CAD, Maya, Word-perfect, to many free applications.

Free Applications and Even Free Operating System - All of the applications available under UNIX,
many of them are free. The compilers and interpreters that we use in most of the programming courses
here at UMBC now these free versions that can be downloaded off of the Internet free of charge. As
well, most of the development that we do in programming courses is done under the Linux OS. Since
Linux is one of the free versions of UNIX, it too can be downloaded and installed free of charge.

Less Resource Intensive - In general, most UNIX installations tend to be much less demanding on the
system resources. In many cases the old family computer that can barely run whatever version of
windows is more than sufficient to run the latest version of Linux.

Internet Development - Much of the backbone of the Internet is run by UNIX servers of one type or
another. Many of the more general web-servers out there also run UNIX with the Apache webserver -
another free application.

4.10 UNIX COMMANDS FOR PROCESS MANAGEMENT


Finding Where You Are with the "pwd" Command
When you log into your server, you are typically dropped into your user account's home
directory. A home directory is a directory set aside for your user to store files and create directories. It
is the location in the filesystem where you have full dominion.
To find out where your home directory is in relationship to the rest of the filesystem, you can
use the pwdcommand. This command displays the directory that we are currently in:
pwd
You should get back some information that looks like this:

48
/home/demo
The home directory is named after the user account, so the above example is what the value
would be if you were logged into the server with an account called demo. This directory is within a
directory called /home, which is itself within the top-level directory, which is called "root" but
represented by a single slash "/".

Looking at the Contents of Directories with "ls"


Now that you know how to display the directory that you are in, we can show you how to look
at the contents of a directory.
Currently, your home directory that we saw above does not have much to see, so we will go to
another, more populated directory to explore. Type the following in your terminal to move to this
directory (we will explain the details of moving directories in the next section). Afterward, we'll use
pwd to confirm that we successfully moved:

cd /usr/share

pwd

/usr/share
Now that we are in a new directory, let's look at what's inside. To do this, we can use the ls command:

ls

Adduser groff pam-configs


applications grub perl
Apport grub-gfxpayload-lists perl5
Apps hal pixmaps
Apt i18n pkgconfig
Aptitude icons polkit-1
apt-xapian-index info popularity-contest
...

As you can see, there are many items in this directory. We can add some optional flags to the
command to modify the default behavior. For instance, to list all of the contents in an extended form,
we can use the -lflag (for "long" output):

49
ls -l
total 440
drwxr-xr-x 2 root root 4096 Apr 17 2014 adduser
drwxr-xr-x 2 root root 4096 Sep 24 19:11 applications
drwxr-xr-x 6 root root 4096 Oct 9 18:16 apport
drwxr-xr-x 3 root root 4096 Apr 17 2014 apps
drwxr-xr-x 2 root root 4096 Oct 9 18:15 apt
drwxr-xr-x 2 root root 4096 Apr 17 2014 aptitude
drwxr-xr-x 4 root root 4096 Apr 17 2014 apt-xapian-index
drwxr-xr-x 2 root root 4096 Apr 17 2014 awk
...

This view gives us plenty of information, most of which looks rather unusual. The first block
describes the file type (if the first column is a "d" the item is a directory, if it is a "-", it is a normal file)
and permissions. Each subsequent column, separated by white space, describes the number of hard
links, the owner, group owner, item size, last modification time, and the name of the item. We will
describe some of these at another time, but for now, just know that you can view this information with
the -l flag of ls.
To get a listing of all files, including hidden files and directories, you can add the -a flag. Since
there are no real hidden files in the /usr/share directory, let's go back to our home directory and try that
command. You can get back to the home directory by typing cd with no arguments:

cd ls -a
. .. .bash_logout .bashrc .profile
As you can see, there are three hidden files in this demonstration, along with . and .., which are
special indicators. You will find that often, configuration files are stored as hidden files, as is the case
here.
For the dot and double dot entries, these aren't exactly directories as much as built- in methods
of referring to related directories. The single dot indicates the current directory, and the double dot
indicates this directory's parent directory. This will come in handy in the next section.

Moving Around the Filesystem with "cd"


We have already made two directory moves in order to demonstrate some properties of ls in the
last section. Let's take a better look at the command here.
Begin by going back to the /usr/share directory by typing this:

cd /usr/share
This is an example of changing a directory by giving an absolute path. In Linux, every file and
directory is under the top-most directory, which is called the "root" directory, but referred to by a single
leading slash "/". An absolute path indicates the location of a directory in relation to this top-level

50
directory. This lets us refer to directories in an unambiguous way from any place in the filesystem.
Every absolute path mustbegin with a slash.
The alternative is to use relative paths. Relative paths refer to directories in relation to the
currentdirectory. For directories close to the current directory in the hierarchy, this is usually easier and
shorter. Any directory within the current directory can be referenced by name without a leading slash.
We can change to the locale directory within /usr/share from our current location by typing:

cd locale
We can likewise move multiple directory levels with relative paths by providing the portion of
the path that comes after the current directory's path. From here, we can get to the LC_MESSAGES
directory within the en directory by typing:

cd en/LC_MESSAGES
To go back up, travelling to the parent of the current directory, we use the special double dot
indicator we talked about earlier. For instance, we are now in the /usr/share/locale/en/LC_MESSAGES
directory. To move up one level, we can type:
cd ..
This takes us to the /usr/share/locale/en directory.
A shortcut that you saw earlier that will always take you back to your home directory is to use cd
without providing a directory:

cd pwd /home/demo
To learn more about how to use these three commands, you can check out our guide on
exploring the Linux filesystem.

Viewing Files
In the last section, we learned a bit about how to navigate the filesystem. You probably saw
some files when using the ls command in various directories. In this section, we'll discuss different
ways that you can use to view files. In contrast to some operating systems, Linux and other Unix-like
operating systems rely on plain text files for vast portions of the system.
The main way that we will view files is with the less command. This is what we call a "pager",
because it allows us to scroll through pages of a file. While the previous commands immediately
executed and returned you to the command line, less is an application that will continue to run and
occupy the screen until you exit.
We will open the /etc/services file, which is a configuration file that contains service
information that the system knows about:

less /etc/services
The file will be opened in less, allowing you to see the portion of the document that fits in the
area of the terminal window:

51
# Network services, Internet style
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, officially ports have two entries
# even if the protocol doesn't support UDP operations.
# Updated from http://www.iana.org/assignments/port-numbers and other
# Sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services.
# New ports will be added on request if they have been officially assigned
# By IANA and used in the real-world or are needed by a debian package.
# If you need a huge list of used numbers please install the nmap package.

tcpmux 1/tcp # TCP port service multiplexer

echo 7/tcp
...
 To scroll, you can use the up and down arrow keys on your keyboard. To page down one whole
screens-worth of information, you can use either the space bar, the "Page Down" button on your
keyboard, or the CTRL-f shortcut.
 To scroll back up, you can use either the "Page Up" button, or the CTRL-b keyboard shortcut.
 To search for some text in the document, you can type a forward slash "/" followed by the search
term. For instance, to search for "mail", we would type:

/mail
This will search forward through the document and stop at the first result. To get to another
result, you can type the lower-case n key:

n
To move backwards to the previous result, use a capital N instead:

N
When you wish to exit the less program, you can type q to quit:
q
While we focused on the less tool in this section, there are many other ways of viewing a file
that come in handy in certain circumstances. The cat command displays a file's contents and returns
you to the prompt immediately. The head command, by default, shows the first 10 lines of a file.
Likewise, the tailcommand shows the last 10 lines by default. These commands display file contents in
a way that is useful for "piping" to other programs.
Feel free to see how these commands display the /etc/services file differently.

52
File and Directory Manipulation
We learned in the last section how to view a file. In this section, we'll demonstrate how to
create and manipulate files and directories.

Create a File with "touch"


Many commands and programs can create files. The most basic method of creating a file is
with the touch command. This will create an empty file using the name and location specified.
First, we should make sure we are in our home directory, since this is a location where we have
permission to save files. Then, we can create a file called file1 by typing:

cd touch file1
Now, if we view the files in our directory, we can see our newly created file:
ls file1
If we use this command on an existing file, the command simply updates the data our
filesystem stores on the time when the file was last accessed and modified. This won't have much use
for us at the moment.
We can also create multiple files at the same time. We can use absolute paths as well. For
instance, if our user account is called demo, we could type:
touch /home/demo/file2 /home/demo/file3
ls
file1 file2 file3

Create a Directory with "mkdir"


Similar to the touch command, the mkdir command allows us to create empty directories.
For instance, to create a directory within our home directory called test, we could type:

cd mkdir test
We can make a directory within the test directory called example by typing:

mkdir test/example
For the above command to work, the test directory must already exist. To tell mkdir that it
should create any directories necessary to construct a given directory path, you can use the - p option.
This allows you to create nested directories in one step. We can create a directory structure that looks
like some/other/directories by typing:

mkdir -p some/other/directories
The command will make the some directory first, then it will create the other directory inside of
that. Finally it will create the directories directory within those two directories.

53
Moving and Renaming Files and Directories with "mv"
We can move a file to a new location using the mv command. For instance, we can move file1
into the test directory by typing:

mv file1 test
For this command, we give all of the items that we wish to move, with the location to move
them at the end. We can move that file back to our home directory by using the special dot reference to
refer to our current directory. We should make sure we're in our home directory, and then execute the
command:
cd mv test/file1 .
This may seem unintuitive at first, but the mv command is also used to rename files and
directories. In essence, moving and renaming are both just adjusting the location and name for an
existing item.
So to rename the test directory to testing, we could type:
mv test testing
Note: It is important to realize that your Linux system will not prevent you from certain destructive
actions. If you are renaming a file and choose a name that already exists, the previous file will be
overwritten by the file you are moving. There is no way to recover the previous file if you accidentally
overwrite it.

Copying Files and Directories with "cp"


With the mv command, we could move or rename a file or directory, but we could not duplicate
it. The cpcommand can make a new copy of an existing item.
For instance, we can copy file3 to a new file called file4:
cp file3 file4

Unlike a mv operation, after which file3 would no longer exist, we now have both file3 and file4.
Note: As with the mv command, it is possible to overwrite a file if you are not careful about the
filename you are using as the target of the operation. For instance, if file4 already existed in the above
example, its content would be completely replaced by the content of file3.
In order to copy directories, you must include the -r option to the command. This stands for
"recursive", as it copies the directory, plus all of the directory's contents. This option is necessary with
directories, regardless of whether the directory is empty.
For instance, to copy the some directory structure to a new structure called again, we could
type:

cp -r some again
Unlike with files, with which an existing destination would lead to an overwrite, if the target is
an existing directory, the file or directory is copied into the target:

54
cp file1 again
This will create a new copy of file1 and place it inside of the again directory.

Removing Files and Directories with "rm" and "rmdir"


To delete a file, you can use the rm command.
Note: Be extremely careful when using any destructive command like rm. There is no "undo"
command for these actions so it is possible to accidentally destroy important files permanently.

To remove a regular file, just pass it to the rm command:


cd rm file4

[ Read 0 lines ]

^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C


Cur Pos ^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Text
^T To Spell

Along the top, we have the name of the application and the name of the file we are editing. In
the middle, the content of the file, currently blank, is displayed. Along the bottom, we have a number
of key combinations that indicate some basic controls for the editor. For each of these, the ^ character
means the CTRL key.
To get help from within the editor, type:

CTRL-G
When you are finished browsing the help, type CTRL-X to get back to your document.
Type in or modify any text you would like. For this example, we'll just type these two sentences:
Hello there.
Here is some text.
To save our work, we can type:
CTRL-O
This is the letter "o", not a zero. It will ask you to confirm the name of the file you wish to save
to:
File Name to Write: file1

^G Get Help M-D DOS Format M-A Append

^C Cancel M-M Mac Format M-P Prepend M-B Backup File

55
As you can see, the options at the bottom have also changed. These are contextual, meaning
they will change depending on what you are trying to do. If file1 is still the file you wish to write to, hit
"ENTER".
If we make some additional changes and wish to save the file and exit the program, we will see
a similar prompt. Add a new line, and then try to exit the program by typing:

CTRL-X
If you have not saved after making your modification, you will be asked whether you wish to
save the modifications you made:
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?

Y Yes

N No ^C Cancel
You can type "Y" to save your changes, "N" to discard your changes and exit, or "CTRL-C" to
cancel the exit operation. If you choose to save, you will be given the same file prompt that you
received before, confirming that you want to save the changes to the same file. Press ENTER to save
the file and exit the editor.
You can see the contents of the file you created using either the cat program to display the
contents, or the less program to open the file for viewing. After viewing with less, remember that you
should hit qto get back to the terminal.

less file1

Hello there.
Here is some text.
Another line.
Another editor that you may see referenced in certain guides is vim or vi. This is a more
advanced editor that is very powerful, but comes with a very steep learning curve. If you are ever told
to use vim or vi, feel free to use nano instead. If you wish to learn how to use vim, read our guide to
getting started with vim.

4.11 DOS Commands for Process Management

4.11.1 How to view your system information


Command Prompt allows you to view system information by using a simple command called
system info. Open Command Prompt, type system info and press Enter. Do you s ee what's happening?
Just like in screenshot below, a complete list of information about your operating system and computer
hardware and software components is displayed.

56
You will see details such as the version of the operating system installed on your computer, the
status of your RAM memory or the processor you have. There's also some network information, like
the IP and the MAC addresses of your network cards.
4.11.2. Display the list of currently running processes
To view the list of currently running processes, you have to use the tasklist command. Type
tasklist and press Enter. Command Prompt should display a list similar to the one below, where you see
details about the names of running processes, theirPID (Process identifier) and the memory they use.
4.11.3. Stop a process using taskkill
To kill or stop a running process, you have to use the taskkill command. Let's assume that you
want to stop the Snipping Tool application t hat is running on your computer. Its process is called
SnippingTool.exe . In order to kill it, you should use Command Prompt to run the command "taskkill
/im snippingtool.exe" . The /im parameter is used to identify and stop a process by typing its name.
There are times when you need to open a program twice or even several times. Every new
window of a specific program (for example, Internet Explorer) creates a separate process called
instance that has attached a unique PID (Process identifier).
To stop a single instance of a process, you need to specify its PID (Process identifier). Let's
assume that there are two instances of Internet Explorer open on your computer. The process' name is
iexplore.exe , but you want to close only one of its two running instances.
If you want to kill the process that has a PID of 6984, you will type taskkill /PID 6984 and then
press Enter .
Another interesting parameter that you can use for the command taskkill is /t . This parameter
allows you to terminate a specified process and any child processes which were started by it.
Take the same example: the Internet Explorer process. Let's assume that you have three
processes and you want to kill all of them using the parameter /t . You should type the command
"taskkill /t /im iexplore.exe" and then press Enter . Check the screenshot below to see the confirmation
of the command you just typed.
Note that if you misuse the commands listed in this article, you can risk losing the data opened
in the running processes. It is important to be careful and have a backup available for your data.
Therefore proceed carefully and don't say we did not warn you. :)
Also, keep in mind that, in order to kill any running process, you need to have administrative
permissions and run the Command Prompt as administrator. Check out the

4.11.4 Change the Default Drive


To change the default drive, simply type the letter of the your choice. The new default will be
listed in subsequent DOS prompts.
Example:
 C> A: [enter]
 Changes the default drive from C to A.
 C: [enter]
 Changes the default drive from A to C.
[enter] means that you must press the Enter Key before the format command will execute.

57
[Enter] is required after any DOS command, it is assumed in all commands found below.

4.11.5 CHDIR (CD) Change Directory Command


Once you have located the directory you want, you may move from directory to directory using
the CD command (change directory)
Example:
 C> cd furniture
 Moves you to the directory called 'FURNITURE'
 C> cd \furniture\chairs
 Moves you to the directory called 'CHAIRS' under the directory called 'FURNITURE'.
 C> cd ..
 Moves you up one level in the path.
 C> cd \
 Takes you back to the root directory (c: in this case).

4.11.6 COPY Command


The COPY command can be used both to copy files from disk to disk or to create a second
copy of a file on a single disk. (There are many more uses of the COPY command, but only the basic
operation is discussed here.)
Example:
 C> copy c:kermit.exe a:
 Copies the file 'KERMIT.EXE' from the C drive to the A drive and gives it the same name.
 C> copy a:brazil1.dat b:\south\brazil2.dat
 Creates a copy of 'BRAZIL1.DAT' from drive A on drive B, putting it in the 'SOUTH'
subdirectory and renaming it 'BRAZIL2.DAT'.
The key to use this command correctly is to remember that the first file specified after the COPY
command is the source file, the second is the target:ehp1 file. The source is the file to be copied. The
target will be the location and name of the new file. If the file name and extension are omitted after the
target's drive specification, the new file will have exactly the same name as the source file.
Example:
 C> copy a:myfile.txt b:
 C> copy c:command.com b:com.com
 C> copy b:golly.gee a:whao.boy
 C> copy command.* a:
 C> copy a:mymap.dwg c:\maps
Note: It is always good practice to us the complete file specifications for both source and target files,
Be very sure of yourself before you accept defaults or employ wild-card characters. Otherwise you may
end up with some interesting results. Incomplete or incorrect source names

58
may result in errors, such as the command: copy edlin a:myomy.bat. Try it and see what happens.

4.11.7 DIR (Directory) Command


The DIRECTORY command lists the names and sizes of all files located on a particular disk.
Example:
 C> dir a:
Shows directory of drive A
 C> dir b:
Shows directory of drive B
 C> dir \agis
Shows files in a subdirectory on drive C (default)
 C> dir
Shows directory of drive C
 C> dir /w
Shows directory in wide format, as opposed to a vertical listing.
All the files are listed at the screen, you can stop the display by typing CTRL-BREAK. If you
ask for a directory on the A or B drives, be sure there is a diskette in the drive and that the diskette has
been formatted. If the drive is empty, or if the diskette is unformatted, the DOS will respond with an
error message.

4.11.8 DIR Options


Two little characters, '*' and '?', will make your life with computers much easier. Their use is
illustrated below.
Example:
 C> dir a:*.ex
Lists all files on the A drive with an extension of 'EXE'.
 C> dir b:kermit.*
Lists all files on the B drive with a filename of 'KERMIT'.
The asterisk is a wild-card character which allows the user to enter only a limited part of a file
specification to find a file. It is useful when you wish to locate a group of files with the same filename
or the same extension. On other occasions you may have forgotten part of a file specification. You can
use '*' in place of the parts of the specification you have forgotten. Similarly, '?' permits wild-card
searches keyed to single characters.
Example:
 C> dir a:labe?.com
Lists all five-letter files with the first four letters 'LABE' and an extension of 'COM'.
 C> dir b:format.c??

59
Lists all files with a filename of 'FORMAT' and an extension beginning with 'C'.
Wild-card characters can be used in combination.
Example:
 C> dir a:labe?.*
Lists all five-letter files with the first four letters 'LABE' and any extension.
 C> dir c:*.ex?
Lists all files with an extension beginning with 'EX'.
Experiment with '*' and '?' to improve your ability to find files quickly. These wild-card
characters can also be used with several other DOS commands.

4.11.9 ERASE Command


The ERASE command deletes specified files.
Example:
 C> erase a:myfile.txt
Erases the file MYFILE.TXT from the diskette in the A drive. If no drive specification is
entered, the system looks to delete the specified file form drive C (in this case).

IMPORTANT WARNING: This command is easy to use, but it is the most dangerous one you
will encounter in DOS (apart form FORMAT). If you aren't careful, you may delete a file which you--
or someone else-- needs. And, unless you have saved a backup of that file, the erased file is gone for
good. For this reason it is good practice to use only complete file specifications with the ERASE
command (and to keep backups of your most valuable files). As a safety precaution, never use the
wild-card characters '*' and '?' in ERASE commands.

BEWARE: I will rescind your laboratory privileges for a full week if you ever knowingly use
either the command: erase c:*.*, or the command: erase *.*. Guess what happens?

4.11.10 File-Naming Conventions


Careful file naming can save time. Always choose names which provide a clue to the file's
contents. If you are working with a series of related files, use a number somewhere in the name to
indicate which version you have created. This applies only to the filename parameter; most of the file
extension parameters you will be using are predetermined (or reserved by DOS for certain types of
file).
Example:
 WORLD.DAT
An ATLAS*GRAPHICS file containing data for a world map. The DAT extension is
required by ATLAS*GRAPHICS.
 BRAZIL.BNB
A boundary file of Brazil in binary form.

60
BRIT1.DAT
BRIT2.DAT
BRIT3.DAT
Three versions of a data file for a map of Britain.

4.11.11 FORMAT Command


You must format new disks before using them on the IBM computers. The format command
checks a diskette for flaws and creates a directory where all the names of the diskette's files will be
stored.
Example:
 C> format a:
Formats the diskette in the A drive.
 C> format b:
After entering this command, follow the instructions on the screen. When the FORMAT operation
is complete, the system will ask if you wish to FORMAT more diskettes. If you are working with only
one diskette, answer N (No) and carry on with you work. If you wish to FORMAT several diskettes,
answer Y (Yes) until you have finished formatting all your diskettes.
BEWARE: Executing the format command with a diskette which already contains files will result
in the deletion of all the contents of the entire disk. It is best to execute the format command only on
new diskettes. If you format an old diskette make sure it contains nothing you wish to save.

4.11.12 MKDIR (MD) Make Directory Command


This command creates a new directory.
Example:
 C> mkdir mine
Creates a directory called 'MINE'

4.11.13 Rebooting the computer (Ctrl-Alt-Del)


In some cases, when all attempts to recover from a barrage of error messages fails, as a last
resort you can reboot the computer. To do this, you press, all at once, the control, alternate and delete.
BEWARE: If you re-boot, you may loose some of your work--any data active in RAM which
has not yet been saved to disk.

4.11.14 RENAME (REN) Command


The RENAME command permits users to change the name of a file without making a copy of
it.
Example:
 C> ren a:goofy.txt pluto.txt
Changes the name of 'GOOFY.TXT' on the A drive to 'PLUTO.TXT'.

61
This command is very simple to use, just remember two points: the file name and extension
must be complete for the source file and no drive specification is given for the target. Renaming can
only occur on a single disk drive (otherwise COPY must be used).

4.11.15 RMDIR (RD) Remove Directory Command


This command removes a directory. It is only possible to execute this command if the directory
you wish to remove is empty.
Example:
 C> rd mine
Removes directory called 'MINE'.

4.11.16 Stop Execution (Ctrl-Break)


If you wish to stop the computer in the midst of executing the current command, you may use
the key sequence Ctrl-Break. Ctrl-Break does not always work with non-DOS commands. Some
software packages block its action in certain situations, but it is worth trying before you re-boot

62
UNIT - IV
UNIT-IV
5. TEXT EDITOR
Introduction
A text editor is a type of computer program that edits plain text. Such programs are
sometimes known as "notepad" software, following the naming of Microsoft Notepad. Text
editors are provided with operating systems and software development packages, and can be
used to change configuration files, documentation files and programming language source code.

5.1 Overview of Editing Process Graphical User Interface


The Graphical User Interface (GUI), is a form of user interface that allows users to
interact with electronic devices through graphical icons and visual indicators such as secondary
notation, instead of text-based user interfaces, typed command labels or text navigation. GUI
were introduced in reaction to the perceived steep learning curve of Command-Line Interfaces
(CLIs), which require commands to be typed on a computer keyboard.
The actions in a GUI are usually performed through direct manipulation of the graphical
elements. Beyond computers, GUIs are used in many hand held mobile devices such as MP3
players, portable media players, gaming devices, smart phones and smaller household, office and
industrial controls.

5.2 Introduction to Windows


Microsoft Windows is a group of several graphical operating system families, all of
which are developed, marketed, and sold by Microsoft. Each family caters to a certain sector of
the computing industry. Active Windows families include Windows NT and Windows
Embedded; these may encompass subfamilies, e.g. Windows Embedded Compact (Windows
CE) or Windows Server. Defunct Windows families include Windows 9x, Windows Mobile and
Windows Phone.
Microsoft introduced an operating environment named Windows on November 20, 1985,
as a graphical operating system shell for MS-DOS in response to the growing interest in
graphical user interfaces (GUIs). Microsoft Windows came to dominate the world's personal
computer (PC) market with over 90% market share, overtaking Mac OS, which had been
introduced in 1984.Apple came to see Windows as an unfair encroachment on their innovation in
GUI development as implemented on products such as the Lisa and Macintosh (eventually
settled in court in Microsoft's favor in 1993). On PCs, Windows is still the most popular
operating system. However, in 2014, Microsoft admitted losing the majority of the overall
operating system market to Android, because of the massive growth in sales of Android smart
phones. In 2014, the number of Windows devices sold was less than 25% that of Android
devices sold. This comparison however may not be fully relevant, as the two operating systems

63
traditionally target different platforms. Still, numbers for server use of Windows (that are
comparable to competitors) show one third market share, similar to that for end user use.

5.3 Word Processing Software


It is used to manipulate a text document, such as a resume or a report. You typically enter
text by typing, and the software provides tools for copying, deleting and various types of
formatting. Some of the functions of word processing software include:
 Creating, editing, saving and printing documents.
 Copying, pasting, moving and deleting text within a document.
 Formatting text, such as font type, bolding, underlining or italicizing.
 Creating and editing tables.
 Inserting elements from other software, such as illustrations or photographs.
 Correcting spelling and grammar.
Word processing includes a number of tools to format your pages. For example, you can
organize your text into columns, add page numbers, insert illustrations, etc. However, word
processing does not give you complete control over the look and feel of your document. When
design becomes important, you may need to use desktop publishing software to give you more
control over the layout of your pages.
Word processing software typically also contains features to make it easier for you to
perform repetitive tasks. For example, let's say you need to send a letter to all your customers
regarding a new policy. The letter is the same for all customers except for the name and address
at the top of the letter. A mail merge function allows you to produce all the letters using one
template document and a table with customer names and addresses in the database.
Text editors shouldn't be confused with word processing software. While they do also
allow you to create, edit and save text documents, they only work on plain text. Text editors
don't use any formatting, such as underlined text or different fonts. Text editors serve a very
different purpose from word processing software. They are used to work with files in plain text
format, such as source code of computer programs or configuration files of an operating system.
An example of a text editor would be Notepad on the Windows platform.
Microsoft Word is the most widely used word processing software. Microsoft estimates
that over 500,000,000 people use the Microsoft Office suite, which includes Word. Many other
word processing applications exist, including Word Perfect and open source applications
OpenOffice.org Writer, LibreOffice Writer, AbiWord, KWord, and LyX. Web-based word
processors, such as Office Web Apps or Google Docs, are a relatively new category of
application software. Where is Word Processing Software Used? Word processors have a variety
of uses and applications within the business world, home, and education. Businesses tend to have
their own format and style for any documents produced. In Business word processing is used for:
legal copies, letters and letterhead, memos, reference documents.

64
Many homes have word processors on their computers, in the home word processing
tends to be educational, planning or business related, dealing with assignments or work being
completed at home, or recreational. Examples include: writing short stories, letter writing,
resume, CV creation, card creation, In education word processing is used in a variety of different
ways in the production of assignments, notes, exams, and for practicing its uses.

5.4 Features
Word processing typically implies the presence of text manipulation functions that extend
beyond a basic ability to enter and change text. For the purpose of this module when discussing
and explaining word processing features the software Microsoft Office Word (*Word) will be
used as the example. Text Manipulation Describe how to change the appearance of a document
by text manipulation Text manipulation usually refers to the ability to change words, sentences
and paragraphs which have been typed. The manipulation can involve the changing of the
characters (letters and symbols), adding line breaks, direction of the text and changing the case
(CAPITAL letter or small letter) of the characters.

5.4.1 Document Formatting


Document formatting The text within a document can be formatted in terms of how the
actual text appears. Formatting improves the readability of documents. A useful function with
Word is that of the Styles which allow text to be automatically formatted allowing consistent
formatting of text within body, titles, subtitles, etc. of a document. The most common formatting
which are applied in Word are Bold, Italic, Underline, font styles, font size and colored font. So
much so, that all of these formatting tools have their own buttons.
5.4.2 Graphics
Describe the uses of graphics in a word document Pictures, images or graphics are a very
useful way of brightening up a document and making it more appealing and interesting for the
end user. Graphics can be added to Word in a variety of ways, including inserting; Pictures, Clip
Art, Shapes and SmartArt. When images are added to a document it is important to consider the
graphic formatting options available, such as cropping, wrapping, styles, effects and position.
5.4.3 Tabs
Understand the uses of tabs e.g. decimal tabs. Tabs allow the setup of text on a page in
the exact position it should appear in, by allowing the cursor to advance to the next stop or set
position. This is achieved by setting up tabs and using the tab key (to the left of the Q key) on the
keyboard, to jump from one position to the next, instead of having to use the space bar again and
again and again! Tabs are a very useful tool which is often left unused by most word processing
users.
A table is a grid of cells arranged in rows and columns. It can be useful to present data in
a table inside a word processing document because it is displayed in an organized and easy to
read format. Tables can be sorted, formatted, merged, aligned, shaded, colored, etc.

65
A) Data Tables Ordinary tables containing data relevant to the topic discussed in the word
processing document. B) Pre-set Tables or Internal Cross-referencing Internal Cross-referencing
within documents is completed in pre-set tables. Examples include: a. Contents tables include
section titles listed next to their page numbers (like the first page of these notes). b. Tables of
figures with caption titles and their page numbers. c. Cross-referencing with section or page
numbers. d. Footnote numbering.
5.4.4 Mail Merge and Label Printing
Describe the uses of mail merge and the benefits of label printing Mail merge is the batch
mailing of letters - using a letter template and a data file or address database. Instead of a
business or college creating multiple copies of the same letter to send out in the post, one letter
and one data file is created. The letter and data file are merged together - which means the names
and address are automatically added to each of the letters and envelopes from the database or
data file.
Mail merge can automatically create a batch of labels for the data file and print the labels
to labels stickers or directly to envelopes depending on the capacity of a printer.
5.4.5 Other word processing functions include:
 Spell checking (actually checks against word lists),
 Grammar Checking (checks for what seem to be simple grammar errors),
 Thesaurus function (finds words with similar or opposite meanings Shift F7).
 Collaborative editing, which allows two people to work on one document,
automatically leaving each other notes to show where editing has taken place.

5.5 Spreadsheet and its Features

5.5.1 Spreadsheet: It is a computer application that simulates a paper, accounting worksheet. It


displays multiple cells that together make up a grid containing alphanumeric text, numeric values
or formulas. A spreadsheet also known as “Worksheet” contains rows and columns and is used to
record and compare financial and numerical data.
5.5.2 Features:
 A spreadsheet allows user to enter and calculate numerical data.
 Spreadsheet greatly increases productivity for anyone who needs to manage receipts,
create ‘budgets’ generate financial reports.
 It combines the features of a general ledger with the flexibility of powerful data analysis
and reporting function.
5.5.3 Spreadsheet Packages: Business applications require a lot of calculation work. In manual
system, it is done on a sheet of paper with rows and columns, which is called a “spreadsheet”.
Spreadsheet packages use the concept of an electronic spreadsheet. An electronic spreadsheet (or
worksheet) is a very big sheet consisting of thousands of rows and columns, which is used to
store information in the memory of a computer. Like databases, electronic spreadsheets have

66
now become an essential tool in developing a computerized management information system.
Income statements, annual reports, balance sheet, cost analysis and budgets are some of the
applications where worksheets are typically used.

67
6. DATABASE
(UNIT-IV)
Introduction to Database and Packages
A database is an organized collection of data, stored and accessed electronically.
Database designers typically organize the data to model aspects of reality in a way that supports
processes requiring information, such as (for example) modeling the availability of rooms in
hotels in a way that supports finding a hotel with vacancies.
The database management system (DBMS) is the software that interacts with end users,
applications, and the database itself to capture and analyze data. A general-purpose DBMS
allows the definition, creation, querying, update, and administration of databases. A database is
generally stored in a DBMS-specific format which is not portable, but different DBMSs can
share data by using standards such as SQL and ODBC or JDBC. The sum total of the database,
the DBMS and its associated applications can be referred to as a "database system".
Often the term "database" is used to loosely refer to any of the DBMS, the database
system or an application associated the database.

6.1 Database Packages


In Oracle, packages encapsulate related procedures, functions, and associated cursors and
variables together as a unit in the database. Packages usually have two parts, a specification and
a body. The specification is the interface with your applications; it declares the types, variables,
constants, exceptions, cursors, and subprograms available for use. The body fully defines cursors
and subprograms, and so implements the specification.
Packages provide advantages in the following areas:
 Encapsulation of related procedures and variables in a single named, stored unit in the
database. This provides for better organization during the development process and makes
privilege management easier.
 Separation of public and private procedures, variables, constants, and cursors.
 Improved performance since the entire package is loaded into memory when an object
from the package is called for the first time.
You can generate and reverse engineer database packages in the same way as other
database objects. When you reverse engineer a database package, the sub-objects (variable,
procedure, cursor, exception, and type) are created from the specification and the body of the
database package.

6.1.1 Creating a Database Package


You can create a database package in any of the following ways:
 Select Model Database Packages to access the List of Database Packages, and click the
Add a Row tool.

68
 Right-click the model (or a package) in the Browser, and select New Database Package.

6.1.2 Database Package Properties


To view or edit a database package's properties, double-click its Browser or list entry.
The property sheet tabs and fields listed here are those available by default, before any
customization of the interface by you or an administrator.

Table 6.1: The General tab contains the following properties


Property Description
Name/Code/ Identify the object. The name should clearly convey the object's purpose to non-
Comment technical users, while the code, which is used for generating code or scripts, may
be abbreviated, and should not normally include spaces. You can optionally add
a comment to provide more detailed information about the object. By default the
code is generated from the name by applying the naming conventions specified
in the model options. To decouple name-code synchronization, click to release
the = button to the right of the Code field.

Stereotype Extends the semantics of the object. You can enter a stereotype directly in this
field, or add stereotypes to the list by specifying them in an extension file.
Owner Specifies the name of the database package owner, which you choose from the
list of users.
Privilege Lets you specify whether the functions and procedures in the database package
execute with the privileges and in the schema of the user who owns it (definer),
or with the privileges and in the schema of CURRENT_USER (invoker).
Table Specifies the table with which the database package is associated.
Template Specifies the template on which the ;8database package is based. If you use a
template, then the remaining tabs of the property sheet will be completed by the
template. If you make any modifications to the other tabs, then the User-Defined
button to the right of the field is depressed and the package is detached from the
template and will no longer be automatically updated when you modify the
definition of the table with which it is associated.
Keywords Provide a way of loosely grouping objects through tagging. To enter multiple
keywords, separate them with commas.

69
The following tabs are also available:
i. Procedures – Lists the procedures associated with the database package.
ii. Variables - Lists the variables associated with the database package.
iii. Cursors - Lists the cursors associated with the database package.
iv. Exceptions – Lists the exceptions associated with the database package.
v. Types - Lists the types associated with the database package.
vi. Initialization - Lets you define initialization code for the database package body. Typically
initialization holds statements that initialize database package variables. Initialization takes
place after database package creation and compilation in the server.
vii. Specification - [hidden by default] Contains the public specification of the database.
viii. Preview - Displays the SQL code that will be generated for the database package.

i. Database Package Procedures


You create database package procedures on the Procedures tab of a database package
using the Add a Row tool. To copy a procedure from elsewhere in the model, use the Create
from Procedure tool.
ii. Database package Variables
Variables can be declared within a package, and can be used in a SQL or PL/SQL
statement to capture or provide a value when one is needed. For example, you can define the
variable in_stock with a boolean data type to verify if a product is available or not. You create
database package variables on the Variables tab of a database package using the Add a Row tool.
iii. Database Package Cursors
A cursor is a multi-row query, which lets you name a work area and access its stored
information. You create database package cursors on the Cursors tab of a database package using
the Add a Row tool.
iv. Database Package Exceptions
PL/SQL allows you to explicitly handle internal and user-defined error conditions, called
exceptions, that arise during processing of PL/SQL code. You create database package exceptions
on the Exceptions tab of a database package using the Add a Row tool.
v. Database Package Types
A type is a user-defined composite data type that encapsulates a data structure along with
the functions and procedures needed to manipulate the data. You create database package types on
the Types tab of a database package using the Add a Row tool.
vi. Database Package Parameters
Database package procedures and cursors can use input and output parameters. For
example, in a CREDIT procedure, you could define the parameters Account Number and Amount.
You create database package parameters on the Parameters tab of a database package procedure or
cursor using the Add a Row or Insert a Row tools.

70
vii. Database Package Templates
Instead of modeling each individual database package by hand, you can use a template
and have Power Designer generate packages specific to each table. Database packages defined
through a template are updated automatically when you make changes to the table definition, and
you can quickly create packages for multiple tables from the Rebuild Table Database Packages
dialog.

6.2 Introduction to Desktop Publishing and Desktop Publishing Packages

6.2.1 Desktop publishing (DTP)


DTP is the creation of documents using page layout skills on a personal ("desktop")
computer primarily for print. Desktop publishing software can generate layouts and produce
typographic quality text and images comparable to traditional typography and printing. This
technology allows individuals, businesses, and other organizations to self-publish a wide range
of printed matter. Desktop publishing is also the main reference for digital typography. When
used skillfully, desktop publishing allows the user to produce a wide variety of materials, from
menus to magazines and books, without the expense of commercial printing.
Desktop publishing combines a personal computer and WYSIWYG page layout software
to create publication documents on a computer for either large scale publishing or small scale
local multifunction peripheral output and distribution. Desktop publishing methods provide more
control over design, layout, and typography than word processing. However, word processing
software has evolved to include some, though by no means all, capabilities previously available
only with professional printing or desktop publishing.
The same DTP skills and software used for common paper and book publishing are
sometimes used to create graphics for point of sale displays, promotional items, trade show
exhibits, retail package designs and outdoor signs. Although what is classified as "DTP software"
is usually limited to print and PDF publications, DTP skills aren't limited to print. The content
produced by desktop publishers may also be exported and used for electronic media. The job
descriptions that include "DTP", such as DTP artist, often require skills using software for
producing e-books, web content, and web pages, which may involve web design or user interface
design for any graphical user interface.

6.2.2 Desktop Publishing Packages


Desktop publishing (DTP) packages are used primarily for designing and
publishing professional looking documents. They offer you a wide variety of publishing
applications. Typical applications include newsletters, advertisements, letterheads, reports,
presentations, catalogs, books (such as this TRAMAN), brochures, or flyers, forms,
business cards, contracts, magazines, and overhead displays. Again, you will see and hear new

71
terms when you begin working with desktop publishing software. These terms come
primarily from the printing/publishing industry.

6.2.3 Features

Fonts: A good DTP package will include a large variety of fonts which can be whatever size the
user requires.
Styles: Styles allow the user to define the font style, size and color of text. Once a style has been
defined it can be applied to be any part of the text whenever necessary. This saves Time when
text is being formatted and helps to keep its appearance consistent throughout a publication.
Borders: Borders can be used to make objects stand out. This may just be a colored line or
something more sophisticated.
Color: A good DTP package will include a large choice of colors which can be used to fill in
areas of a page or make text, borders and lines stand out more. Various tints, shades and patterns
of color are usually offered along with the facility for creating a customized color scheme for a
publication.
Clipart: DTP package often have a library of artwork supplied with them from which graphics
can be copied and pasted into a publication.
Character Spacing: The spacing between characters can be adjusted by using a feature called
kerning. All DTP packages offer this facility along with options to shrink and stretch text.
Line Spacing: The spacing between lines can be changed by adjusting the leading.
Design Wizards: Design wizards are provided to give step by step help when creating common
types of publication such as newspapers, newsletters, flyers and greeting cards.
Text Columns: DTP packages all offer a facility which allows the user to set up the pages of a
publication to have a certain number of text columns. This is useful when producing a newsletter
or newspaper.

72
UNIT - V
UNIT-V
7. COMPUTER COMMUNICATIONS

Computer to Computer Communication through Networking:

Introduction:
It is not the processing power of computer, but the power of communication among that has
revolutionized the information age. The marriage of computing and data communication
technologies (means and methods by which data is transferred from one location to another) is one
of the most existing developments in today's information age. This development has given birth to
computer networks. A computer network is a network of geographically distributed multiple
computers connected in such a way that meaningful transmission and exchange if information
become possible among them. Sharing of information, sharing of resources (both hardware and
software), and sharing processing load are some of the major objectives of a computer network. The
goal of this chapter is to introduce the various aspects of data communication technology and to
discuss how this technology is combined with computer technology to form computer networks.
Following are some of the important concepts, which you will learn from this chapter:

 Basic elements of a communication system.


 The techniques, channels and devices used to transmit data between distant locations.
 The various types of computer networks.
 Communication protocols, which are rules and procedure for establishing and controlling the
transmission of data from one computer to another.
 Characteristics and advantages of distributed data processing.

Fig. 7.1 Communication through Networking

73
7.1 Basic Elements of a Communication System
Communication is the process of transferring messages from one point to another. As shown
in fig 7.2 the three basic elements of any communication process are:

• A sender (source), which creates the message to be transmitted.


• A medium, which carries the message.
• A receiver (sink), which receives the message.

For example, when you speak to your friend on the telephone, you are the sender. The
telephone line through which your voice is transmitted is the medium and your friend is the
receiver. This is a simple example of voice communication. The same concepts holds good for data
communication also.
Data Communication is the function of transporting data from one point to another. In this
case, the sender and receiver are normally machines, in particular, computer devices (computers,
terminals, peripheral devices like line printers, plotters, disks, etc.) and the transmission medium
may be telephone lines, microwave links, etc. However, the messages that are transmitted are data,
not voice conversations. Thus, the electronic systems that transfer data from one point to another
are called data communication systems. Unlike computers that process and rearrange data, data
communication systems transmit data from one point to another without any change.

Medium Carries the message

Sender (Source) Receiver(Sink)

Creates the message Receives the Message

Fig.7.2 Medium carries the message

7.2 Introduction to Computer Networks:


Modern world scenario is ever changing. Data Communication and network have changed
the way business and other daily affair works. Now, they highly rely on computer networks and
internetwork.
A set of devices often mentioned as nodes connected by media link is called a Network.
A node can be a device which is capable of sending or receiving data generated by other
nodes on the network like a computer, printer etc. These links connecting the devices are called
Communication channels.

74
Fig. 7.3 Computer Networks and Node

Computer network is a telecommunication channel using which we can share data with other
computers or devices, connected to the same network. It is also called Data Network. The best
example of computer network is Internet.
Computer network does not mean a system with one Control Unit connected to multiple
other systems as its slave. That is Distributed system, not Computer Network.
A network must be able to meet certain criterias, these are mentioned below:
i. Performance
ii. Reliability
iii. Security
i. Performance
It can be measured in the following ways:
Transit time: It is the time taken to travel a message from one device to another.
Response time: It is defined as the time elapsed between enquiry and response.

Other ways to measure performance are:


i. Efficiency of software
ii. Number of users
iii. Capability of connected hardware

ii. Reliability:
It decides the frequency at which network failure take place. More the failures are, less is the
network's reliability.

iii. Security:
It refers to the protection of data from any unauthorised user or access. While travelling
through network, data passes many layers of network, and data can be traced if attempted. Hence
security is also a very important characteristic for Networks.

75
7.3 Introduction to Networking Software:
Networking is referred as connecting computers electronically for the purpose of sharing
information. Resources such as files, applications, printers and software are common information
shared in a networking. The advantage of networking can be seen clearly in terms of security,
efficiency, manageability and cost effectiveness as it allows collaboration between users in a wide
range. Basically, network consists of hardware component such as computer, hubs, switches, routers
and other devices which form the network infrastructure. These are the devices that play an
important role in data transfer from one place to another using different technology such as radio
waves and wires.
There are many types of network available in the networking industries and the most
common network is Local Area Network (LAN) and Wide Area Network (WAN). LAN network is
made up of two or more computers connected together in a short distance usually at home, office
buildings or school. WAN is a network that covers wider area than LAN and usually covers cities,
countries and the whole world. Several major LAN can be connect together to form a WAN. As
several devices are connected to network, it is important to ensure data collision does not happened
when this devices attempt to use data channel simultaneously. A set of rules called Carrier Sense
Multiple Access / Collision detection are used to detect and prevent collision in networks.

Fig. 7.4 Networking


7.4 Types of Networks:
Depending on the physical distance between nodes on a network and the communications
and services it provides, networks can be classified as
• Personal Area Network (PAN)
• Local Area Network (LAN)
• Wireless Local Area Network (WLAN)
• Campus Area Network (CAN)
• Metropolitan Area Network
• Wide Area Network (WAN)

76
7.4.1. Personal Area Network (PAN):
A personal area network (PAN) is a wireless network that connects information technology
devices within a range of 33 feet or so. One device serves as the controller during wireless PAN
initialization, and this controller device mediates communication within the PAN. The controller
broadcasts a beacon that synchronizes all devices and allocates time slots for the devices. With a
PAN, you can connect a laptop, digital camera, and portable printer without physical cables. You
can download digital image data from the camera to the laptop and then print it on a high-quality
printer—all wirelessly.
Ford and Microsoft collaborated to develop the Sync service for in-car communications and
entertainment. The Sync service creates a wireless connection to cell phones and MP3 players. Sync
enables car occupants to place “hands free” cell phone calls using voice commands. Users can also
request specified songs from a connected media player using voice commands.

Fig. 7.5 Personal Area Network (PAN)

7.4.2. Local Area Network (LAN):


We’re confident that you’ve heard of these types of networks before – LANs are the most
frequently discussed networks, one of the most common, one of the most original and one of the
simplest types of networks. LANs connect groups of computers and low-voltage devices together
across short distances (within a building or between a group of two or three buildings in close
proximity to each other) to share information and resources. Enterprises typically manage and
maintain LANs.
Using routers, LANs can connect to wide area networks (WANs, explained below) to rapidly
and safely transfer data.

77
Fig. 7.6 Local Area Network (LAN)

7.4.3. Wireless Local Area Network (WLAN):


Functioning like a LAN, WLANs make use of wireless network technology, such as WiFi.
Typically seen in the same types of applications as LANs, these types of networks don’t require that
devices rely on physical cables to
connect to the network.

Fig. 7.7 Wireless Local Area Network (WLAN)

7.4.4. Campus Area Network (CAN):


Larger than LANs, but smaller than metropolitan area networks (MANs, explained below),
these types of networks are typically seen in universities, large K-12 school districts or small
businesses. They can be spread across several buildings that are fairly close to each other so users
can share resources.

78
Fig. 7.8 Campus Area Network (CAN)

7.4.5. Metropolitan Area Network (MAN):


These types of networks are larger than LANs but smaller than WANs – and incorporate elements
from both types of networks. MANs span an entire geographic area (typically a town or city, but
sometimes a campus). Ownership and maintenance is handled by either a single person or company
(a local council, a large company, etc.).

Fig. 7.9 Metropolitan Area Network (MAN)

79
7.4.6. Wide Area Network (WAN):
Slightly more complex than a LAN, a WAN connects computers together across longer
physical distances. This allows computers and low-voltage devices to be remotely connected to
each other over one large network to communicate even when they’re miles apart.
The Internet is the most basic example of a WAN, connecting all computers together around the
world. Because of a WAN’s vast reach, it is typically owned and maintained by multiple
administrators or the public.

Fig. 7.10 Wide Area Network (WAN)


7.5 Internet and Intranet
7.5.1 Internet:
The Internet, sometimes called simply "the Net," is a worldwide system of computer
networks - a network of networks in which users at any one computer can, if they have permission,
get information from any other computer (and sometimes talk directly to users at other computers).
It was conceived by the Advanced Research Projects Agency (ARPA) of the U.S. government in
1969 and was first known as the ARPANet. The original aim was to create a network that would
allow users of a research computer at one university to "talk to" research computers at other
universities. A side benefit of ARPANet's design was that, because messages could be routed or
rerouted in more than one direction, the network could continue to function even if parts of it were
destroyed in the event of a military attack or other disaster.
Today, the Internet is a public, cooperative and self-sustaining facility accessible to hundreds
of millions of people worldwide. Physically, the Internet uses a portion of the total resources of the
currently existing public telecommunication networks. Technically, what distinguishes the Internet
is its use of a set of protocols called TCP/IP (for Transmission Control Protocol/Internet Protocol).
Two recent adaptations of Internet technology, the intranet and the extranet, also make use of the
TCP/IP protocol.
For most Internet users, electronic mail (email) practically replaced the postal service for
short written transactions. People communicate over the Internet in a number of other ways
including Internet Relay Chat (IRC), Internet telephony, instant messaging, video chat or social
media.

80
The most widely used part of the Internet is the World Wide Web (often abbreviated
"WWW" or called "the Web"). Its outstanding feature is hypertext, a method of instant cross-
referencing. In most Web sites, certain words or phrases appear in text of a different color than the
rest often this text is also underlined. When you select one of these words or phrases, you will be
transferred to the site or page that is relevant to this word or phrase. Sometimes there are buttons,
images, or portions of images that are "clickable." If you move the pointer over a spot on a Web site
and the pointer changes into a hand, this indicates that you can click and be transferred to another
site.
Using the Web, you have access to billions of pages of information. Web browsing is done
with a Web browser, the most popular of which are Chrome, Firefox and Internet Explorer. The
appearance of a particular Web site may vary slightly depending on the browser you use. Also, later
versions of a particular browser are able to render more "bells and whistles" such as animation,
virtual reality, sound, and music files, than earlier versions.
The Internet has continued to grow and evolve over the years of its existence. IPv6, for
example, was designed to anticipate enormous future expansion in the number of available IP
addresses. In a related development, the Internet of Things (IoT) is the burgeoning environment in
which almost any entity or object can be provided with a unique identifier and the ability to transfer
data automatically over the Internet.

Fig. 7.11 Internet


A brief explanation of how the Internet works: https://youtu.be/7_LPdttKXPc

7.5.2 Intranet:
An intranet is an internal corporate network built using Internet and World Wide Web
standards and technologies. Employees of an organization use it to gain access to corporate
information. After getting their feet wet with public Web sites that promote company products and
services, corporations are seizing the Web as a swift way to streamline even transform their
organizations. These private networks use the infrastructure and standards of the Internet and the
World Wide Web. Using an intranet offers one considerable advantage: Many people are already
familiar with Internet technology, so they need little training to make effective use of their corporate
intranet.
An intranet is an inexpensive yet powerful alternative to other forms of internal
communication, including conventional computer networks. One of an intranet’s most obvious
virtues is its ability to reduce the need for paper. Because Web browsers run on any type of
computer, the same electronic information can be viewed by any employee. That means that all
sorts of documents (such as internal phone books, procedure manuals, training manuals, and

81
requisition forms) can be inexpensively converted to electronic form on the Web and be constantly
updated. An intranet provides employees with an easy and intuitive approach to accessing
information that was previously difficult to obtain. For example, it is an ideal solution to providing
information to a mobile salesforce that needs access to rapidly changing information.
A growing number of companies offer limited access to their private corporate network for
selected customers and suppliers. Such networks are referred to as extranets; they connect people
who are external to the company. An extranet is a network that links selected resources of the
intranet of a company with its customers, suppliers, or other business partners. Again, an extranet is
built around Web technologies.
Security and performance concerns are different for an extranet than for a Web site or
network-based intranet. User authentication and privacy are critical on an extranet so that
information is protected. Obviously, the network must perform well to provide quick response to
customers and suppliers. Below Table is summarizes the differences between users of the Internet,
intranets, and extranets.

Table 7.1: Internet and Intranet


Type Users Need User ID and Password?
Internet Anyone No
Intranet Employees Yes
Extranet Business partners Yes

Fig. 7.12 Intranet

Secure intranet and extranet access applications usually require the use of a virtual private
network (VPN). A virtual private network (VPN) is a secure connection between two points on the
Internet. VPNs transfer information by encapsulating traffic in IP packets and sending the packets
over the Internet, a practice called tunneling. Most VPNs are built and run by ISPs. Companies that
use a VPN from an ISP have essentially outsourced their networks to save money on wide area
network equipment and personnel.

82
Fig. 7.13 Difference between Internet and Intranet

7.6 Electronic Mail (Email):


E-mail is no longer limited to simple text messages. Depending on your hardware and
software and the hardware and software of your recipient, you can embed images, sound, and video
in a message and attach any kind of file. The authors of this book, for example, attached chapter
files to e-mail messages that were sent to editors and reviewers for feedback.
Many people use online e-mail services such as Hotmail, MSN, and Gmail to access
e-mail. Online e-mail services store messages on the server, so users need to be connected to the
Internet to view, send, and manage e-mail. Other people prefer to use software such as Microsoft
Outlook, Apple Mail, or Mozilla Thunderbird, which retrieve e-mail from the server and deliver it

83
to the user’s PC. Post office protocol (POP) is used to transfer messages from e-mail servers to your
PC. E-mail software typically includes more information man agement features than online e-mail
services, and lets you save your e-mail on your own PC, making it easier to manage and organize
messages and to keep the messages private and secure. Another protocol called Internet message
access protocol (IMAP) allows you to view e-mail using Outlook or other e-mail software without
downloading and storing the messages locally. Some users prefer this method because it allows
them to view messages from any Internet-connected PC.
Business users that access e-mail from smartphones such as the BlackBerry take advantage
of a technology called Push e-mail. Push e-mail uses corporate server software that transfers, or
pushes, e-mail out to the handset as soon as it arrives at the corporate e-mail server. To the
BlackBerry user, it appears as though e-mail is delivered directly to the handset. Push e-mail allows
the user to view e-mail from any mobile or desktop device connected to the corporate server. This
arrangement allows users flexibility in where, when, and how they access and manage e-mail.

Since text-based communications lack the benefit of facial expression, voice inflection, and
body language, users have developed methods of expressing emotion through typed characters. Text
messaging has also led to abbreviations for common expressions that save typing time.
Lists some expressions and abbreviations frequently used in personal e-mail messages, text
messaging, and other forms of text communications. These abbreviations are normally not
appropriate for business correspondence.
Some companies use bulk e-mail to send legitimate and important information to sales
representatives, customers, and suppliers around the world. With its popularity and ease of use,
however, some people feel they are drowning in too much e-mail. 18 Over a trillion e-mail
messages are sent from businesses in North America each year. This staggering number is up from
40 billion e-mail messages in 1995. Many messages are copies sent to long lists of corporate users.
Users are taking steps to cope with and reduce the mountain of e-mail. Some companies have
banned the use of copying others on e-mails unless it is critical. Some e-mail services scan for
84
possible junk or bulk mail, called spam, and delete it or place it in a separate file. More than half of
all e-mail can be considered spam. Some business executives receive 300 or more spam e-mails in
their corporate mailboxes every morning. Mukesh Lulla, president of TeamF1, a networking and
security-software company, receives 300 to 400 e-mail messages daily, not including spam. 19
While spam-filtering software can prevent or discard unwanted messages, other software products
can help users sort and answer large amounts of legitimate e-mail. For example, software from
ClearContext, Seriosity, and Xobni rank and sort messages based on sender, content, and context,
allowing individuals to focus on the most urgent and important messages first.

85
8. MULTIMEDIA
(UNIT-V)

Basics of Multimedia
• When different people mention the term multimedia, they often have quite different, or even
opposing, viewpoints.

– A PC vendor: a PC that has sound capability, a DVD-ROM drive, and perhaps the superiority of
multimedia-enabled microprocessors that understand additional multimedia instructions.

– A consumer entertainment vendor: interactive cable TV with hundreds of digital channels


available, or a cable TV-like service delivered over a high-speed Internet connection.

– A Computer Science (CS) student: applications that use multiple modalities, including text,
images, drawings (graphics), animation, video, sound including speech, and interactivity.

• Multimedia and Computer Science:


– Graphics, HCI, visualization, computer vision, data compression, graph theory, networking,
database systems. Multimedia and Hypermedia.

8.1 Components of Multimedia

• Multimedia involves multiple modalities of text, audio, images, drawings, animation, and video.

Examples of how these modalities are put to use:

i. Video Teleconferencing.
ii. Distributed lectures for higher education.
iii. Tele-medicine.
iv. Co-operative work environments.
v. Searching in (very) large video and image databases for target visual objects.
vi. Augmented reality: placing real-appearing computer graphics and video objects into scenes.
vii. Including audio cues for where video-conference participants are located.
viii. Building searchable features into new video, and enabling very high- to very low- bit-rate
use of new, scalable multimedia products.
ix. Making multimedia components editable.
x. Building ―inverse-Hollywood applications that can recreate the process by which a video
was made.
xi. Using voice-recognition to build an interactive environment, say a kitchen-wall web
browser.

86
Fig. 8.1 Multimedia

8.2 Introduction to Multimedia Technology

Multimedia: Any combination of texts, graphics, animation, audio and video which is a result of
computer based technology or other electronic media.

i) Features of Multimedia:
Interactivity: When the end user is able to control the elements of media that are
required, and subsequently obtains the required information in a non‐linear way .
Navigation: Enables the user to explore and navigate from one web page to another.
Hyperlink: Non‐linear navigation of jumping for the required information.
Easy to use, Easy to understand:

ii) Types of Multimedia:


Text: The basic element for all multimedia applications. Directly informs the user about the
information that it wishes to convey.
Graphics: Pictures as visuals in digital form used in multimedia presentations.
There are two types of graphics:
a) Bitmap Graphics (Image Raster): Formed by pixels arranged in specific ways in a
matrix form.
b) Vector Graphics: Formed by lines that follow mathematical equations called vector.
Animation: Process of adding movements to static images through various methods.
Audio: Sound in Digital form used in Multimedia Presentations.
Video: Video in digital form in Multimedia Presentations

8.3 Multimedia Technology Applications


i) Video Teleconferencing: Transmission of synchronised video and audio in real‐time through
computer networks in between two or more multipoint (or participants) separated by locations.

Advantages Disadvantages
- Reduces travelling cost and saves time;
- Increases productivity and improves the quality of teaching and learning;
- Make quick and spontaneous decisions;

87
- Increases satisfaction in teaching or at the workplace
- Video requires more bandwidth than audio. Therefore, Video teleconferencing is
expensive. (Use Video compression to solve)
- Requires a network to support short ‐ delay as audio and video are asynchronous
and it is realtime. (Use Optimum multimedia network; fibre optics or ISDN)
ii) Multimedia Store and Forward Mail: Allow users to generate, modify and rreceive documents
that contain multimedia. Eg. Gmail, Hotmail, Yahoo etc .

iii) Reference Source: Using multimedia to obtain information that we require.


Eg. Multimedia, Encyclopedia, Directories, Electronic Books and Dictionaries etc.

iv) Edutainment and Infotainment:

a) Edutainment: The inclusion of multimedia in the field of education gave birth to


edutainment, which is a new learning approach combining education with
entertainment. Eg. Math Blaster, Fun Maths etc.
b) Infotainment: Combination of information and entertainment. Eg Prodigy, America
Online, MSN.

v) Advertising and Purchasing: Most of the web sites visited have many advertisements with
multimedia features with the objective of marketing merchandise or offering services online.

vi) Digital Library: With the existence of the digital or virtual library, students no longer need to
go to libraries but can search and obtain information that they require through the Internet.

Features enabling Digital library:


a) National and international telephone networks with speed and bandwidth which can transfer
big and complex text files and graphic digital images.
b) Protocol and standards which facilitates ease of connection among computers .
c) Automated digital instruments such as scanners and faxes which can transfer data and
information in real time.

vii) Education and Health Applications


a) Education: Distance learning, using interactive multimedia while teaching, multimedia
training products .
b) Health: Information shown using multimedia like graphics or video are more meaningful,
telemedicine.

viii) Other Applications: Video on Demand, Kiosks, Hybrid Applications, applications for:
recreation, commerce, training etc.

8.4 Virtual Reality


This is a complex and at times, esoteric subject which continues to fascinate a great many

88
people. Yet there is a certain amount of cynicism towards virtual reality or ‘VR’ for short which in
the early days, promised so much but did not always deliver.

We have also included a section about augmented reality: this is a similar form of
technology in which the lines are blurred between the real world and computer generated imagery,
e.g. video. Sound, video or images are overlaid onto a real world environment in order to enhance
the user experience.

8.4.1 In-depth look at the world of virtual reality


But what is virtual reality and how does it work:
- Virtual Reality
- Virtual Reality Games
- Virtual Reality Gear
- Virtual Reality and the Military
- Virtual Reality and Education
- Virtual Reality and Healthcare
- Augmented Reality

Virtual reality is considered to have wide ranging benefits for the healthcare sector but, it
can be used in other sectors as well which include:

- Education
- Gaming
- Architecture
- The military
In many ways, this technology has far more possibilities than originally thought. But it is
important not to confuse fact with fiction.
Whilst virtual reality may appear a futuristic concept which dwells in the realm of science
fiction it is, nevertheless, a very real form of technology. And this real form of technology has the
potential to deliver real-world benefits to a great many people.

8.4.2 Virtual Reality

Virtual reality is a form of technology


which creates computer generated worlds or
immersive environments which people can
explore and in many cases, interact with.

Virtual reality has its advocates and


opponents which are mainly due to a lack of
understanding about this technology and its
capabilities. Unrealistic expectations coupled with
lack of awareness regarding technical limitations

89
means that for many people, virtual reality is difficult to grasp or even take seriously.
This topic aims to educate and inform anyone interested in virtual reality. This includes the
casual observer through to the teenager fixated on virtual reality gaming through to the healthcare
professional or engineer.
We have also included a section about the human factors issues of virtual reality for those of
you who work in usability, user experience (UX) or any other user-centred discipline.

A step by step approach to virtual reality

This topic is organised into the following sections:

- What is virtual reality?


- Virtual reality concepts
- When virtual reality was invented
- How is virtual reality possible?
- How virtual reality is used
- How does virtual reality affect us?
- Assessment of virtual reality systems

8.4.1 What is Virtual Reality?


The definition of virtual reality comes, naturally, from the definitions for both virtual and
reality. The definition of virtual is near and reality is what we experience as human beings. So the
term virtual reality basically means near-reality. This could, of course, mean anything but it usually
refers to a specific type of reality emulation.

So what is virtual reality?


Answering "what is virtual reality" in technical terms is straight-forward. Virtual reality is
the term used to describe a three-dimensional, computer generated environment which can be
explored and interacted with by a person. That person becomes part of this virtual world or is
immersed within this environment and whilst there, is able to manipulate objects or perform a series
of actions.
The person wears a head-mounted display (HMD) or glasses which displays three-
dimensional images as part of their experience. Some systems enable the person to experience
additional sensory input, e.g. sound or video which contributes to their overall experience.

8.4.2 Multi-Sensory Experience:


They are aided by various sensory stimuli such as sound, video and images which form part
of most virtual reality environments. But many newer environments include touch or force feedback
through a haptic device such as a 'data glove' which further enhances the experience.

8.4.3 Virtual Environments


Many people who work with virtual reality prefer to use the term 'virtual environments'
instead. This is a response to a perceived negativity to this technology which has often turned out to

90
be true. There are people who view virtual reality with little enthusiasm and dismiss it as 'science
fiction', seeing it as having no practical application in the real world.

Variety of Uses:
But there are in fact, a wide variety of applications for virtual reality which include:
- Architecture
- Sport
- MedicineThe Arts
- Entertainment

Virtual reality can lead to new and exciting discoveries in these areas which impact upon our
day to day lives. One example of this is the use of virtual reality in medicine, such as surgical
simulations, which helps with training the next generation of surgeons.

8.4.4 Features of virtual reality systems:


There are many different types of virtual reality systems but they all share the same
characteristics such as the ability to allow the person to view three-dimensional images. These
images appear life-sized to the person.
Plus they change as the person moves around their environment which corresponds with the
change in their field of vision. The aim is for a seamless join between the person‘s head and eye
movements and the appropriate response, e.g. change in perception. This ensures that the virtual
environment is both realistic and enjoyable.
A virtual environment should provide the appropriate responses – in real time- as the person
explores their surroundings. The problems arise when there is a delay between the person‘s actions
and system response or latency which then disrupts their experience. The person becomes aware
that they are in an artificial environment and adjusts their behaviour accordingly which results in a
stilted, mechanical form of interaction.
The aim is for a natural, free-flowing form of interaction which will result in a memorable
experience.

8.5 Virtual Reality Concepts:


The concepts behind virtual reality are based upon theories about a long held human desire to
escape the boundaries of the ‘real world’ by embracing cyberspace. Once there we can interact with
this virtual environment in a more naturalistic manner which will generate new forms of Human-
Machine Interaction (HMI).

8.5.1 Computer Hardware and Software for the Generation of Virtual Environments
The computer technology that allows us to develop three-dimensional Virtual Environments
(VEs) consists of both hardware and software. The current popular, technical, and scientific interest
in VEs is inspired, in large part, by the advent and availability of increasingly powerful and
affordable visually oriented, interactive, graphical display systems and techniques. Graphical image
generation and display capabilities that were not previously widely available are now found on the
desktops of many professionals and are finding their way into the home. The greater affordability

91
and availability of these systems, coupled with more capable, single-person-oriented viewing and
control devices (e.g., head-mounted displays and hand-controllers) and an increased orientation
toward real-time interaction, have made these systems both more capable of being individualized
and more appealing to individuals.
Limiting VE technology to primarily visual interactions, however, simply defines the
technology as a more personal and affordable variant of classical military and commercial graphical
simulation technology. A much more interesting, and potentially useful, way to view VEs is as a
significant subset of multimodal user interfaces. Multimodal user interfaces are simply human-
machine interfaces that actively or purposefully use interaction and display techniques in multiple
sensory modalities (e.g., visual, haptic, and auditory).

Fig. 8.2 Organization of the computer technology for virtual reality.


One possible organization of the computer technology for VEs is to decompose it into
functional blocks. In Figure-1.15 three distinct classes of blocks are shown: (1) rendering hardware
and software for driving modality-specific display devices; (2) hardware and software for modality-
specific aspects of models and the generation of corresponding display representations; (3) the core
hardware and software in which modality-independent aspects of models as well as consistency and
registration among multimodal models are taken into consideration. Beginning from left to right,
human sensorimotor systems, such as eyes, ears, touch, and speech, are connected to the computer
through human-machine interface devices. These devices generate output to, or receive input from,
the human as a function of sensory modal drivers or renderers. The auditory display driver, for
example, generates an appropriate waveform based on an acoustic simulation of the VE. To
generate the sensory output, a computer must simulate the VE for that particular sensory mode. For

92
example, a haptic display may require a physical simulation that includes compliance and texture.
An acoustic display may require sound models based on impact, vibration, friction, fluid flow, etc.
Each sensory modality requires a simulation tailored to its particular output. Next, a unified
representation is necessary to coordinate individual sensory models and to synchronize output for
each sensory driver. This representation must account for all human participants in the VE, as well
as all autonomous internal entities. Finally, gathered and computed information must be
summarized and broadcast over the network in order to maintain a consistent distributed simulated
environment.

93
Suggested Reading:
1. Satish Jain, Information Technology, BPB Publications, 2015.
2. Alexis Leon and Mathews Leon , Fundamentals of Information Technology,2nd Edition,
Vikas publishers, 2009.
3. V. Rajaraman, Fundamentals of Computers, 5th Edition, Prentice Hall India, 2011.
4. Abraham Silberschatz, Peter Galvin, Greg Gagne, “Operating System Concepts”, Ninth Edi-
tion, John Wiley and sons publications, 2013.

94

You might also like