Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: Computer
Description: This note is for A level students and also for 100 level students. This note will teach and guide you in computer science.
Description: This note is for A level students and also for 100 level students. This note will teach and guide you in computer science.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
Computer Science
PLUS I
Volume 1 : Concepts
Government of Tamilnadu
© Government of Tamilnadu
First Edition – 2005
Chairman Syllabus Committee
Dr
...
Sankaranarayanan V, Director, Tamil Virtual University, Chennai
Authors
Dr
...
Jothi A, Former Professor, Presidency College, Chennai
Mr
...
Ramachandran V, Anna University, Chennai
Dr
...
Gopal T V, Anna University, Chennai
Dr
...
Subha Ravi, Director, M/s Digiterati Consultancy Pvt
...
Madan, Free Lance Graphics Designer
Price Rs
...
S
...
Paper
FOREWORD
A computer allows users to store and process information
quickly and automatically
...
It
allows the user to store all sorts of information and then ‘process’ that
information, or data, or carry out actions with the information, such as
calculating numbers or organizing words
...
Computers make life easy
...
The creative abilities of the users can thus be
used more effectively
...
Computers cannot do things on their own
...
This volume contains the basic concepts required for you to become a
user of the computer
...
3
...
Introduces the key components of a computer system
(hardware, software, data)
Familiarizes students with how computers work through an
introduction to number systems
Presents the basic concepts of various logic gates that make a
computer
Gives a broad view of how technology is improving communications
through the use of electronic mail and the Internet
...
The field of computers is fast changing
...
Without the conceptual basis, the user will find it very difficult
to take advantage of the advances in the field of computer science
...
Hence, the students must
focus on understanding the contents of this volume
...
The presentation
is lucid with many illustrations
...
(E BALAGURUSAMY)
Vice Chancellor, Anna University, Chennai
Chairman Syllabus Committee
CONTENTS
Chapter 1
1
...
2
1
...
4
Chapter 2
2
...
2
2
...
4
2
...
6
2
...
8
2
...
10
2
...
12
Chapter 3
3
...
2
3
...
4
3
...
1
4
...
3
4
...
5
4
...
1 Introduction
5
...
3 Most Desirable Characters of the
Operating System
Summary
Exercises
Chapter 6
6
...
2
6
...
4
6
...
6
6
...
8
6
...
10
6
...
12
6
...
14
6
...
16
6
...
18
6
...
20
6
...
22
Transmission Mode
Internet
Communication Protocol
Who Governs the Internet ?
Future of Internet
Uses of Internet
Getting Connected to Internet
Popular Uses of the Web
Intranet and Extranet
Exercises
182
183
184
184
185
185
187
190
191
191
CHAPTER 1
INTRODUCTION TO COMPUTERS
1
...
1
...
Computers are bringing many changes in industry,
government, education, medicine, scientific research, law, social
service and even arts like music, movies and paintings
...
What is a computer? A child might define a computer to be
an instrument capable of producing a combined effect of radio, movie
and television
...
Fig
...
1 Computer
A computer is an electronic machine, capable of performing
basic operations like addition, subtraction, multiplication, division,
etc
...
It can process millions of instructions in a few seconds
and at the same time with high accuracy
...
Computers are very accurate and save time by
performing the assigned task very fast
...
Humans have always needed to perform arithmetic like
counting and adding
...
The early civilization had
witnessed men develop number systems to keep track of the
astronomical cycles, businesses, etc
...
After the invention of the manual calculating
tools, the concept of using ‘electronic gadgets’ for computations were
introduced which gave birth to the computers
...
During the early development
period, certain machines had been developed and a brief note of
them is given below
...
1
...
1
...
It is made of beads strung on cords and is used for simple arithmetic
calculations
...
The
beads represent digits
...
Abacus was mainly used for addition and subtraction and
later for division and multiplication
...
1
...
A set of bones consisted
of nine rods, one for each digit 1 through 9 and a constant rod for the
digit ‘0’
...
1633 AD – The Slide Rule
Fig
...
4 The Slide Rule
3
The Slide Rule was invented by William Oughtred
...
The slide rule is embodied by the two sets of scales that are joined
together, with a marginal space between them
...
1642 AD – The Rotating Wheel Calculator
Fig
...
5 The Rotating Wheel Calculator
The Rotating Wheel Calculator was developed by a French
philosopher, Blaise Pascal, using simple components such as gears
and levers
...
He
was inspired by the computation work of his father’s job and devised
the model
...
1822 AD – The Difference Engine
Fig
...
6 The Difference Engine
4
The Difference Engine was built by Charles Babbage, British
mathematician and engineer which mechanically calculated
mathematical tables
...
1890 AD - Hollerith Tabulating Machine
Fig
...
7 Hollerith Tabulating Machine
A tabulating machine using punched cards was designed by
Herman Hollerith and was called as the Hollerith Tabulating Machine
...
1
...
3 Generation of Computers
The evolution of electronic computers over a period of time can
be traced effectively by dividing this period into various generations
...
These helped
to develop smaller, cheaper, powerful, efficient and reliable devices
...
5
First Generation - 1940-1956: Vacuum Tubes
The first generation of computers used vacuum tubes for
circuitry and magnetic drums for memory
...
They were very expensive to operate and consumed large
amount of electricity
...
First generation computers operated only
on machine language
...
First generation
computers could solve only one problem at a time
...
1
...
Second Generation - 1956-1963: Transistors
The second generation of computers witnessed the vacuum
tubes being replaced by transistors
...
The transistors also generated considerable heat that
6
sometimes caused the computer to malfunction
...
Second-generation computers
used punched cards for input and printouts for output
...
1
...
High-level programming languages were
also being developed at this time, such as early versions of COBOL
and FORTRAN
...
Third Generation - 1964-1971 : Integrated Circuits
The development of the integrated circuit left its mark in the
third generation of computers
...
Fig
...
10 Integrated Circuit
7
In this generation, keyboards and monitors were used instead
of punched cards and printouts
...
Fourth Generation - 1971-Present : Microprocessors
The microprocessor brought forth the fourth generation of
computers, as thousands of integrated circuits were built onto a single
silicon chip
...
1
...
Fifth Generation - Present and Beyond: Artificial Intelligence
Fifth generation computing devices, based on artificial
intelligence, are still in their developmental stage
...
1
...
Computers accept
instructions and data, perform arithmetic and logical operations and
8
produce information
...
Data
Processing
Information
Fig
...
12 Data, Processing and Information
Basically data is a collection of facts from which information
may be derived
...
Hence data are
Q
Q
Q
Q
Stored facts
Inactive
Technology based
Gathered from various sources
...
Data that has been interpreted, translated,
or transformed to reveal the underlying meaning
...
Hence information is
Q
Q
Q
Q
Processed facts
Active
Business based
Transformed from data
...
e
...
It is also defined as a mathematical procedure that can
9
usually be explicitly encoded in a set of computer language instructions
that manipulate data
...
For example, a problem to calculate
the length of a straight line joining any two given points
...
Hence, problem solving is an act of defining a problem,
understanding the problem and arriving at workable solutions
...
It requires the programmer to co-ordinate
previous experience and intuition in order to solve the problem
...
3
Hardware and Software
1
...
1 Introduction
A computer system has two major components, hardware
and software
...
Software is a set of
instructions, which enables the hardware to perform a specific task
...
3
...
It also
stores data for later reuse (storage)
...
The computer hardware responsible for computing
are mainly classified as follows:
10
Main
Memory
Input Devices
Secondary
Storage
CPU
Output
Devices
Fig
...
13 Computer Hardware
¾
Input devices allows the user to enter the program and data
and send it to the processing unit
...
¾
The Processor, more formally known as the central processing
unit (CPU), has the electronic circuitry that manipulates input
data into the information as required
...
¾
Memory from which the CPU fetches the instructions and data
is called main memory
...
¾
Output devices show the processed data – information – the
result of processing
...
¾
Storage usually means secondary storage, which stores data
and programs
...
The hardware devices attached to the computer are called
peripheral equipment
...
11
1
...
3 Computer Software
Software refers to a program that makes the computer to do
something meaningful
...
Software can be classified
into two categories: System Software and Application Software
...
1
...
These programs provide the environment to run the
application programs
...
They are the basic
necessity of a computer system for its proper functioning
...
The operating system, compilers and utility programs are examples
of system software
...
1
...
An operating system is an integrated set of specialized
programs that is used to manage the overall operations of a computer
...
Every computer must have an operating system to run
other programs
...
The compiler software translates the source program (user
written program) into an object program (binary form)
...
The utility programs support the
computer for specific tasks like file copying, sorting, linking a object
program, etc
...
1
...
It is used to accomplish specific tasks rather
than just managing a computer system
...
Some typical examples are : railway reservation system, game
programs, word processing software, weather forecasting programs
...
The commonly used Application Software packages are word
processor, spread sheet, database management system and
graphics
...
Anyone who has used a computer as a word
processor knows that it is far more than a fancy typewriter
...
The entire writing
process is transformed by this modern word processing software
...
Some of the commonly used word processors are Microsoft
Word, WordStar, WordPerfect, etc
...
Repetitive numeric calculations, use of related formulae
and creation of graphics and charts are some of the basic tools
...
Lotus1-2-3, Excel, etc
...
A database management system is a collection of programs
that enable to store, modify and extract information from a database
...
Computerized banking
system, Automated Teller Machine, Airlines and Railway reservation
system etc
...
Type of Software
Functions
Word Processors All personal computers are
loaded with word processing
software which has the same
function as a typewriter for
writing letters, preparing
reports and printing
...
Microsoft Excel,
Lotus 1-2-3
...
1
...
4
...
By
configuration, we mean the size, speed of doing computation and
storage capacity of a computer
...
4
...
Computers
Analog
Digital
Hybrid
Fig
...
17 Classification of Computers
Analog Computers
Analog Computer is a computing device that works on
continuous range of values
...
It
generally deals with physical variables such as voltage, pressure,
temperature, speed, etc
...
It uses binary number system in which there are
only two digits 0 and 1
...
The digital computer
15
is designed using digital circuits in which there are two levels for an
input or output signal
...
Digital Computers can give the results with more accuracy
and at a faster rate
...
Hence
digital computers have an increasing use in the field of design,
research and data processing
...
Special purpose computer is one that is built for a
specific application
...
It can store different programs and do the jobs
as per the instructions specified on those programs
...
Hybrid Computers
A hybrid computing system is a combination of desirable
features of analog and digital computers
...
Now-a-days analog-to-digital and digital-to-analog
converters are used for transforming the data into suitable form for
either type of computation
...
These measurements which are in
analog might then be converted into numbers and supplied to digital
components in the system
...
Hybrid computers are mainly used for specialized tasks
...
4
...
Digital Computers
Super
Computers
Mini
Computers
Mainframe
Computers
Micro
Computers
Fig
...
18 Classification of Digital Computers
Super Computers
The mightiest computers but at the same time, the most
expensive ones are known as super computers
...
In other words, super
computers are the computers normally used to solve intensive
numerical computations
...
Mainframe Computers
Mainframe computers are capable of processing data at very
high speeds – hundreds of million instructions per second
...
These systems are also expensive
...
Some of the obvious customers
are banks, airlines and railway reservation systems, aerospace
companies doing complex aircraft design, etc
...
They are lower to mainframe computers, in
terms of speed and storage capacity
...
Some features which were
handled by hardware in mainframe computers were done by software
in mini computers
...
However, the mini computer market has
diminished somewhat as buyers have moved towards less expensive
but increasingly powerful personal computers
...
They are several times cheaper than mini
computers
...
1
...
18
Although the equipment may vary from the simplest computer
to the most powerful, the major functional units of the computer
system remain the same : input, processing, storage and output
...
They have more processor speed
than that of personal computers
...
1
...
Workstations are used for executing
numeric and graphic intensive applications such as Computer Aided
Design (CAD), simulation of complex systems and visualizing the
results of simulation
...
1
...
These desktop computers are also known
as home computers
...
They are self-contained desktop computers intended
for an individual user
...
Laptop Computers
Fig
...
22 Laptop Computer
Laptop computers are portable computers that fit in a briefcase
...
Getting Smaller Still
Fig
...
23 Personal Digital Assistants
Pen-based computers use a pen like stylus and accept
handwritten input directly on a screen
...
Special engineering
and hardware design techniques are adopted to make the portable,
smaller and light weight computers
...
Abacus is the first known calculating machine used for counting
...
Charles Babbage is called as the father of today’s computer
...
The second generation of computers witnessed the vacuum
tubes being replaced by transistors
...
The microprocessor brought forth the fourth generation of
computers, as thousands of integrated circuits were built onto
a single silicon chip
...
Information is a collection of facts from which conclusions may
be drawn
...
A computer system has two major components, hardware and
software
...
Software refers to a program that makes the computer to do
something meaningful and classified as System Software and
Application Software
System software consists of general programs written for a
computer
...
21
Q
Q
Q
Q
Q
Q
Q
Q
Analog Computer is a computing device that works on continuous
range of values
...
A hybrid computing system is a combination of desirable
features of analog and digital computers
...
Mainframes are capable of processing data at very high speeds
– hundreds of million instructions per second
...
The invention of microprocessor (single chip CPU) gave birth
to the micro computers
...
Exercises
I
...
__________ invented the Slide Rule
...
Integrated circuits were used in ____________ generation of
computers
...
The hardware devices attached to the computer are called
__________
...
Software can be classified into ___________ and __________
software
...
22
10) The ________ translates the whole source program into an object
program
...
12) ________ computers are useful in solving differential equation
and integration
...
14) ________ is the planned step-by-step instruction required to
turn data into information
...
16) A ________ computer accepts handwritten input on a screen
...
18) PC refers to ___________
...
20) The word computing means ___________
...
State whether the following are true or false
1)
2)
The concept of using ‘electronic brains’ gave birth to computers
...
3) Blaise Pascal developed the tabulating machine using punched
cards
...
5) Compilers translate higher level language into machine
language
...
7) Fifth generation computing devices is based on artificial
intelligence
...
9) A hybrid computing system is a combination of desirable
features of analog and digital computers
...
23
III
...
1)
2)
What is a computer?
What is the name of the machine developed by Charles
Babbage?
3) What are peripheral devices?
4) Define ‘Data’
...
6) What do you mean by an algorithm?
7) What is a word processor software?
8) What is an operating System?
9) What is an analog computing system?
10) What is a lap-top computer?
IV
...
1)
2)
3)
4)
Discuss the various computer generations along with the key
characteristics of the computer of each generation
...
Discuss the important features and uses of micro, mini,
mainframe and super computers
...
1 Introduction
There are several kinds of data such as, numeric, text, date,
graphics, image, audio and video that need to be processed by a
computer
...
The graphics data consist of still
pictures such as drawings and photographs
...
Video data
consist of motion pictures
...
Data can be classified into
two forms, analog data and digital data
...
Sound waves,
telephone signals, temperatures and all other signals that are not
broken into bits are examples of analog data
...
The Arithmetic and Logic Unit (ALU) of the computer performs
arithmetic and logical operations on data
...
As the hardware required for arithmetic is much simpler
for integers than floating point numbers, these two types have entirely
different representations
...
To understand about
how computers store data in the memory and how they handle them,
one must know about bits and bytes and the number systems
...
Both the main
memory (Random Access Memory or RAM) and the hard disk
capacities are measured in terms of bytes
...
For instance, a computer may
be described as having a 32-bit Pentium processor with 128
Megabytes of RAM and hard disk capacity of 40 Gigabytes
...
2 Bits and Bytes
A numbering system is a way of representing numbers
...
Computer systems can perform computations and transmit data
thousands of times faster in binary form than they can use decimal
representations
...
A bit is small piece of data that is derived from the words
“binary digit”
...
A binary
number contains a sequence of 0s and 1s like 10111
...
With 8 bits in a byte, we can represent 256
values ranging from 0 to 255 as shown below:
0
1
2
3
= 0000 0000
= 0000 0001
= 0000 0010
= 0000 0011
…………
...
…………
...
Different
types of coding schemes are used to represent the character set
and numbers
...
Each
binary value between 0 and 127 is used to represent a specific
character
...
The range of ASCII values
for lower case alphabets is from 97 to 122 and the range of ASCII
values for the upper case alphabets is 65 to 90
...
In metric system, one Kilo represents 1000, that is,
103
...
The following table shows the representation of various memory
sizes
...
In a 2GB (Gigabytes) storage device (hard disk), totally
21,47,483,648 bytes can be stored
...
2
...
The system that uses the decimal numbers or digit symbols
0 to 9 is called as the decimal number system
...
Sequence of digit symbols are used
to represent numbers greater than 9
...
The positional number
system is a system of writing numbers where the value of a digit
depends not only on the digit, but also on its placement within a
number
...
This means that
each digit in the number is multiplied by ten raised to a power
27
corresponding to that digit’s position
...
Thus the value of the fractional decimal sequence 948
...
2310 = 9 X 102 + 4 X 101 + 8 X 100 + 2 X 10-1 + 3 X 10-2
In general, for the decimal representation of
X = {
...
x-1x-2x-3…
...
4
where i = …
...
Binary Number System
Ten different digits 0 – 9 are used to represent numbers in the
decimal system
...
The numbers in the binary system are represented
to the base two and the positional multipliers are the powers of two
...
The rightmost bit
is the least significant bit (LSB) and has the smallest positional weight
...
The exponents are negative powers of
two for digits on the right side of the binary point
...
Thus the decimal value of the
fractional binary sequence 0
...
10112 = 1 X 2-1 + 0 X 2-2 + 1 X 2-3 + 1 X 2-4
= 0
...
125 + 0
...
687510
2
...
A hexadecimal number is represented using base
16
...
This system is used to represent data in a more
compact manner
...
The first ten symbols are the same as in the decimal
system, 0 to 9 and the remaining six symbols are taken from the
first six letters of the alphabet sequence, A to F
...
It is very easy to convert between binary and
hexadecimal systems
...
The hexadecimal equivalent of
the binary sequence 1100100111012 is:
1100 1001 1101 = C9D16
C
9
D
2
...
There are two approaches for converting a decimal
number into binary format
...
6
...
Repeated division by 2 will leave a string of 0s and 1s that
become the binary equivalent of the decimal number
...
ie
...
The new quotient will be M2 and
the new remainder r2
...
,
so that
M1 = 2 * M2 + r2
r2 = 0 or 1
M = 2 (2 * M2 + r2) + r1
= 22M2 + r2 * 21 + r1* 20
Next divide the quotient M2 by 2
...
30
i
...
, M2 = 2 * M3 + r3
so that
M = 2 (2 * (2 * M3 + r3) + r2) + r1
= 22(2 * M3 + r3) + r2 * 21 + r1* 20
= 23 M3 + r3 * 22 + r2 * 21 + r1* 20
The above process is repeated until the quotient becomes 0,
then
M = 1 * 2k + rk * 2k-1 + …
...
23/2
11/2
5/2
2/2
1/2
Quotient
11
5
2
1
0
Remainder
1 (LSB)
1
1
0
1 (MSB)
To write the binary equivalent of the decimal number, read the
remainders from the bottom upward as:
2310 = 101112
The number of bits in the binary number is the exponent of the
smallest power of 2 that is larger than the decimal number
...
Find the exponent of the smallest power of 2
that is larger than 23
...
Consider another
example
...
The next immediate large number than 36 that can be
represented in powers of 2 is 64
...
2
...
2 Sum of Powers of 2
A decimal number can be converted into a binary number by
adding up the powers of 2 and then adding bits as needed to obtain
the total value of the number
...
Find the largest power of 2 that is smaller than or equal to 36
3610 > 3210
b
...
36 – 32 = 4
c
...
Therefore, set the 16’s bit
to 0
d
...
Hence, set the 8’s bit to 0
e
...
Any remaining bits should be set to 0
...
The largest power of 2 that is smaller than or equal to 91 is 64
...
set the 16’s bit 1)
64 32 16 8 4 2 1
1
0
1 1
91-(64+16+8) = 3
64 32 16 8 4 2 1
1
0
1 1 0 1
91-(64+16+8+2) = 1
64 32 16 8 4 2 1
1
Hence
0
1 1 0 1 1
91-(64+16+8+2+1) = 0
9110 = 10110112
33
2
...
, can be converted into
exact binary fractions
...
0
...
12
0
...
012
0
...
0012
The fraction 5/8 = 4/8 + 1/8 = 1/2 + 1/8 has the binary equivalent:
5/8 = 1 * 2-1 + 0 * 2-2 + 1 * 2-3
= 0
...
For example, 0
...
A method of
repeated multiplication by 2 has to be used to convert such kind of
decimal fractions
...
The integer part is either 0 or 1
...
Multiply the
fractional part of the previous product by 2
...
The resulting integer part forms a string of 0s and 1s that
become the binary equivalent of the decimal fraction
...
2 * 2 = 0
...
4 * 2 = 0
...
8 * 2 = 1
...
6 * 2 = 1
...
2 * 2 = 0
...
Hence 0
...
00110011…2
2
...
Decimal numbers can be converted into hexadecimal
format by the sum of weighted hex digits method and by repeated
division by 16
...
The method of
repeated division by 16 is preferable for the conversion of larger
numbers
...
For
example, the decimal number 948, when converted into hexadecimal
number has 3 hexadecimal digits
...
The conversion process is as follows:
162
3
161 160
948 – (3 * 256) = 180
35
162
3
162
3
Hence,
161 160
B
948 – (3 * 256 + 11 * 16) = 4
161 160
B 4
948 – (3 * 256 + 11 * 16 + 4) = 0
94810 = 3B416
The steps involved in the repeated division by 16 to obtain the
hexadecimal equivalent are as follows:
·
Divide the decimal number by 16 and note the remainder
...
·
Repeat the process until the quotient is zero
Example:
Process quotient
remainder
948 / 16 = 59
59 / 16 = 3
3 / 16 = 0
94810 = 3B416
2
...
Octal
representation is just a simple extension of binary and decimal
representations but using only the digits 0 to7
...
36
Example
What is the decimal value of the octal number 7118?
7 * 82 + 1 * 81 + 1 * 80 = 45710
The steps involved in the repeated division by 8 to obtain the
octal equivalent are as follows:
·
Divide the decimal number by 8 and note the remainder
...
·
Repeat the process until the quotient is zero
What is the octal representation of the decimal number 6410?
64/8
8/8
1/8
Quotient
8
1
0
Remainder
0 (LSB)
0
1 (MSB)
Hence 6410 = 1008
2
...
Computers have also to handle negative integers (signed)
...
If the leftmost bit is 0, the number
is positive, and if the leftmost bit is 1, the number is negative
...
10
...
In a sequence of n bits, the leftmost
bit is used for sign and the remaining n-1 bits are used to hold the
magnitude of the integer
...
There
are two representations for 0 in this approach
...
Another drawback is that, the addition and
subtraction require a consideration of both the sign of the numbers
and their relative magnitude, in order to carry out the required
operation
...
The most efficient way of
representing a signed integer is a 2’s-complement representation
...
2
...
2
...
The 2’s-complement
method used with -ve numbers only is as follows:
a
...
Invert all the bits in the binary sequence (ie
...
,1’s complement)
Add 1 to the result
This method works well only when the number of bits used by the
system is known in the representation of the number
...
Example:
In a computer that uses 8-bit representation to store a number, the
wrong and right approaches to represent –23 are as follows:
Wrong approach:
The binary equivalent of 23 is 10111
...
10
...
This is for -ve
numbers only
...
Step 2: Copy the inverse of the remaining bits
...
10
...
A single binary sequence can represent two different
values
...
The decimal equivalent of the above sequence when
considered as an unsigned integer is:
111001102 = 23010
The decimal equivalent of the sequence when considered as
a signed integer in 2’s complement form is:
111001102 = -2610 (after 2’s complement and add negative sign)
...
Example:
X = 1001
Y = 0011
Is ( X > Y) /* Is this true or false? */
It depends on whether X and Y are considered as signed or unsigned
...
2
...
5 Range of unsigned and signed integers
In a 4-bit system, the range of unsigned integers is from 0 to
15, that is, 0000 to 1111 in binary form
...
Therefore, the total number of patterns of 4 bits will
be 2 X 2 X 2 X 2 = 16
...
Hence, if n bits are used to represent an unsigned
integer value, the range is from 0 to 2n-1, that is, there are 2n different
values
...
Hence, half of the 2n patterns are used
for positive values and the other half for negative values
...
In a 4-bit system, the range of signed integers is
from –8 to +7
...
11 Binary Arithmetic
Digital arithmetic usually means binary arithmetic
...
2
...
1 Binary Addition – Unsigned numbers
When two digits are added, if the result is larger than what can be
contained in one digit, a carry digit is generated
...
Since the result cannot fit into a
single digit, a carry is generated into a second digit place
...
The carry bit
may be zero
...
42
Example 1:
Calculate the sum of the numbers, 1100 and 1011:
carry bit
1100
1011
—————
10111
—————
sum bits
Example 2:
Calculate 10111 + 10110
Carry bits
111
10111
10110
———————
101101
———————
In unsigned binary addition, the two operands are called
augend and addend
...
An addend is the
number in an addition operation that is added to another
...
11
...
The only difference is that, both operands must have the same
number of magnitude bits and each must have a sign bit
...
When the
number is negative, the sign bit is 1 and when the number is positive,
the sign bit is 0
...
Write the operands and the sum as 4-bit signed
binary
numbers
...
Example 2: (Use of 2’s complement in signed binary addition)
Add –710 + 510 using 4-bit system
...
In some cases, there is a carry bit beyond the
end of the word size and this is ignored
...
Use 4-bit system
...
In this case both operands are
having different signs
...
On any
addition, the result may be larger than can be held in the word size
being used and this would result in overflow
...
Example 4:
Add (-710) + (-510) using the word size 4
...
But the MSB
of the result is 0 that is the result is positive (opposite sign) and hence
overflow occurs and the result is wrong
...
11
...
The minuend is the number in a subtraction
operation from which another number is subtracted
...
Simple binary
subtraction operations are as follows:
0–0
1–0
1–1
10 – 1
=
=
=
=
0
1
0
1
When subtracting 1 from 0, borrow 1 from the next most significant
bit (MSB)
...
If the next most significant bit is 0, you must borrow
from a more significant bit that contains 1 and replace it with 0 and all
0s up to that point become 1s
...
The 3rd least
significant bit is made as 0
...
Example 3:
Subtract (+2) – (+7) using 4-bit system
0 0 1 0 (+2)
0 1 1 1 (+7)
1 0 0 1 ( -7 in 2’s complement form)
0 0 1 0 (2)
+ 1 0 0 1 (-7)
——————
1 0 1 1 (-5)
——————
47
Example 4:
Subtract (-6) – (+4) using 4 bit system
Minuend
-6
2’s complement of the Subtrahend -4
1 0 1 0
1 1 0 0
——————
1 0 1 1 0
——————
Both numbers are represented as negative numbers
...
As the word size is 4, the
carry bit goes beyond the end of the word and the result is positive
as the MSB is 0
...
The overflow rule works in subtraction also
...
12 Boolean algebra
Boolean algebra is a mathematical discipline that is used for
designing digital circuits in a digital computer
...
The name Boolean
algebra has been given in honor of an English mathematician George
Boole who proposed the basic principles of this algebra
...
A Boolean variable is a variable having only two possible
values such as, true or false, or as, 1 or 0
...
Example:
A
AND B
=A
...
All possible
operations in Boolean algebra can be created from these basic logical
operators
...
The operation AND yields true (binary value 1) if and only if both of
its operands are true
...
The unary operation NOT inverts the value of its
operand
...
2
...
1 Boolean operators (functions)
AND operator
The AND operator is defined in Boolean algebra by the use of the
dot (
...
It is similar to multiplication in ordinary algebra
...
The truth table for a 2-input AND
operator is shown as follows:
A
0
0
1
1
B
0
1
0
1
Y
0
0
0
1
The above 2-input AND operation is expressed as: Y = A
...
The OR operator
combines two or more input variables so that the output is true if at
least one input is true
...
The input is
either true or false, and the output is always the opposite, that is, the
NOT operator inverts the input
...
C)
D is equal to 1 (true) if A is 1 or if ( B
...
Otherwise D is equal to 0 (false)
...
50
NAND operator
The NAND is the combination of NOT and AND
...
The algebraic
expression of the NAND function is:
Y= A
...
The NOR is
generated by inverting the output of an OR operator
...
12
...
You
will study about logic gates in the forthcoming chapter
...
Boolean Identities
Laws of Complementation
The term complement simply means to change 1s to 0s and 0s to 1s
...
A= A
Basic properties of AND operator
Theorem 4
:
A
...
If A equals 1 and the other input is 1, the output is 1
...
Theorem 5
:
A
...
52
Theorem 6
:
A
...
Theorem 7
:
A
...
Basic properties of OR operator
Theorem 8
:
A+1=1
If A equals 0 and the other input is 1, the output is 1
...
Thus the output is always equal to 1 regardless of what value A
takes on
...
Theorem 10 :
A+A=A
The output is always equal to the A input
...
2
...
3 Simplification of Boolean expressions
Before seeing the important theorems used in the
simplification of Boolean expressions, some Boolean mathematical
concepts need to be understood
...
Product Term
A product term in a Boolean expression is a term where one or
more literals are connected by AND operators
...
Example:
AB, AC, A C, and E are the product terms
...
In a Boolean expression
of 3 variables, x, y, and z, the terms xyz, x yz, and x y z are minterms
...
Minterm is also called as a standard product
term
...
Example: A + B + D
Maxterm
A maxterm is a sum term in a Boolean expression, which
includes all possible variables in true or complement form
...
Maxterm is also called as standard
sum term
...
Example: A + A B + A B C
In an expression of 3 variables, A, B, and C, the expression
ABC + A B C + A B C is also called as a canonical sum or sum of
standard product terms or sum of minterms
...
Example: (A + B) (A + B) (A + B)
A canonical product or product of standard sum terms is a
product of sums expression where all the terms are maxterms
...
Theorem 12: Commutative Law
A mathematical operation is commutative if it can be applied to
its operands in any order without affecting the result
...
Example:
A+B=B+A
AB = BA
55
Subtraction is not commutative:
A-B ≠ B-A
There is no subtraction operation in Boolean algebra
...
In other words, the
order in which one does the OR operation does not affect the result
...
(AB)C = A(BC) = (AC)B
Theorem 14: Distributive Law
The distributive property allows us to distribute an AND across
several OR functions
...
A + (B
...
(A + C)
The simplest way to prove the above theorem is to produce a
truth table for both the right hand side (RHS) and the left hand side
(LHS) expressions and show that they are equal
...
Consider the following Boolean Expression:
ABC+ ABC+ABC+ABC+ABC
Using Associativity Law
= (A B C + A B C) + (A B C + A B C) + A B C
= A B(C+C) + A B(C+C)+ABC
Using Theorem 11
= A B (1) + A B (1) + ABC
Using Theorem 4
= A B + A B + ABC
57
The above expression is in the minimum sum of products form
...
A B C + A B C + A B C + A B C + A B C + A B C (A B C + A B C = A B C)
= (A B C + A B C) + (A B C + A B C) + (A B C + A B C)
= A B (C + C) + A B (C + C) + A C(B + B)
=AB+AB+AC
The same Boolean expression can be simplified into many
minimum sum of products form
...
12
...
By constructing the truth tables, the above identities
can be proved easily
...
The DeMorgan’s theorem says that any logical binary
expression remains unchanged if we,
change all varibales to their complements
change all AND operations to OR operations
change all OR operations to AND operations
take the complement of the entire expression
A practical operational way to look at DeMorgan’s theorem
is that the inversion of an expression may be broken at anypoint and
the operation at that point replaced by its oppostie ( i
...
, AND replaced
by OR or vice versa)
...
Boolean algebra
has been introduced and Boolean identities and the laws of Boolean
algebra are explained with examples
...
The pictorial
representation of the Boolean operators, that is, logic gates and the
design of logic circuits are discussed in Chapter 4
...
Fill in the blanks
1
...
The radix of an octal system is ————— and for the
hexadecimal system is —————
3
...
4
...
In binary addition, the operands are called as ————— and
—————
...
In binary subtraction, the operands are called as —————
and —————
...
The binary representation of the decimal number 5864 is ———
and the hexadecimal representation of the same number will be
—————
...
The 2’s complement of 0 is —————
...
The arithmetic operations in a digital computer are performed using
the radix —————, —————
10
...
11
...
The exponent of the smallest power of 2 that is larger than 68 is —
————and hence the number 68 has ————— binary digits
in its binary equivalent
...
Review questions
1
...
a
...
1729
c
...
777
e
...
Write –2710 as an 8-bit 2’s complement number
...
Add the signed numbers +1510 and +3610
...
4
...
5
...
a
...
–1210 + 510
c
...
( –210) - (-610)
6
...
10112
b
...
10100112
7
...
1012
8
...
b
...
b
...
CAFE16
b
...
4110 b
...
39EB16
Do the following binary arithmetic
...
11011001 + 1011101
11
...
B616
10
...
F216
9
...
c
...
A + AB = A
b
...
Simplify the following Boolean expressions
a
...
ABC+ABC+ABC+ABC
14
...
A C + B+C
b
...
Draw the truth table of the Boolean Expression
(A + B + C)
63
CHAPTER 3
COMPUTER ORGANIZATION
3
...
1
...
The main difference is that human beings have the
ability to perform all of these actions independently
...
The computer, however,
requires a program (a predefined set of instructions) to perform an
assigned task
...
The
brain receives or accepts this information, works with it in some
manner, and then stores in the brain for future use
...
Likewise the Central Processing Unit (CPU) is called the
brain of the computer
...
3
...
2 Components of a Digital Computer
A computer system is the integration of physical entities called
hardware and non-physical entities called software
...
The software items are programs and operating aids
(systems) so that the computer can process data
...
1
...
The hardware
should be designed to operate as fast as possible
...
Basically any computer is supposed to carry out the
following functions
...
Process the data as per instructions given by the program
and convert it into useful information
Communicate the information as output
Based on the functionalities of the computer, the hardware
components can be classified into four main units, namely
-
Input Unit
Output Unit
Central Processing Unit
Memory Unit
These units are interconnected by minute electrical wires to
permit communication between them
...
The block diagram is shown below
...
3
...
Input devices allow communication between the user and
the computer
...
Output Unit
Similar to input devices, output devices have an interface
between the computer and the user
...
In modern computers,
monitors (display screens) and printers are the commonly used output
devices
Central Processing Unit
Fig
...
2
...
It is just like the human
brain that takes all major decisions, makes all sorts of calculations and
directs different parts of the computer function by activating and
controlling the operation
...
The control unit of the CPU coordinates the action of the entire system
...
Between any two components of the computer system, there is a
pathway called a bus which allows for the data transfer between them
...
The arithmetic
and logic units in computers are capable of performing addition,
subtraction, division and multiplication as well as some logical
operations
...
Memory Unit
In the main memory, the computer stores the program and
data that are currently being used
...
The main memory holds data and program only temporarily
...
They are called secondary storage devices or auxiliary memory
devices
...
3
...
4 Stored Program Concept
All modern computers use the stored program concept
...
The essentials of the stored program concept are
-
the program and data are stored in a primary memory (main
memory)
once a program is in memory, the computer can execute it
automatically without manual intervention
...
an instruction can modify the contents of any location inThe
stored program concept is the basic operating principle for
every computer
...
2 Central Processing Unit
3
...
1 Functions of a Central Processing Unit
The CPU is the brain of the computer system
...
The functions of the CPU are mainly classified into two
categories :
-
Co – ordinate all computer operations
Perform arithmetic and logical operations on data
The CPU has three major components
...
It consists of circuits which perform
arithmetic operations over data received from memory and are
capable of comparing two numbers
...
It interprets the instructions fetched from the main
memory of the computer, sends the control signals to the devices
involved in the execution of the instructions
...
They
are high-speed memories which hold data for immediate processing
and results of the processing
...
3
...
2
...
The main function of the CPU is to perform arithmetic and logical
operations on data taken from main memory
...
Software instructions are initially
stored in secondary memory storage device such as a hard disk,
floppy disk, CD-ROM, or magnetic tape
...
When a program is executed, instructions flow from the main
memory to the CPU through the bus
...
The ALU performs specific
operations such as addition, multiplication, and conditional tests on
the data in its registers, sending the resulting data back to the main
memory or storing it in another register for further use
...
This
program performs arithmetic addition on two numbers
...
The steps are summarized as
follows :
1
...
Then it begins to execute
the program instructions one by one in a sequential manner
...
The control unit signals the input device (say keyboard) to accept
the input for the variable ‘a’
...
The user enters the value of ‘a’ on the keyboard
...
The control unit recognizes and enables to route the data (value
of a) to the pre-defined memory location (address of ‘a’)
...
The steps 2 to 4 will be repeated for the second input ‘b’
...
6
...
Before executing
the arithmetic instruction, the control unit enables to send a copy
of the values stored in address of ‘a’ and address of ‘b’ to the
internal registers of the ALU and signals the ALU to perform the
sum operation
...
The ALU performs the addition
...
70
8
...
The control unit enables
to send the copy of the values of the address of ‘sum’ to the monitor
(buffer) and signals it
...
9
...
The data flow and the control flow of CPU during the execution
of this program is given as,
Fig
...
4 : Working Principles of a CPU
71
3
...
It executes arithmetic
and logical operations
...
The logical operation
compares numbers, letters and special characters
...
The ALU functions are directly controlled by the control unit
...
The control unit also determines
what is to be done with the results
...
3
...
While performing these operations, the
ALU makes use of the registers
...
Upon completion of the arithmetic operation, the result can be
transferred from the register to the main memory
...
The arithmetic operation in adding two numbers can be
demonstrated through following steps :
Step 1 : The numbers (5 and 8) to be added up are put into two
separate memory locations
...
Step 3 : The arithmetic unit looking at the operator (+) uses the
accumulator and adds the two numbers
...
Step 5 : Then the control unit stores the result into a user desired
memory location, say ‘sum’
...
3
...
3
...
These operations include logically comparing two data items and
take different actions based on the results of the comparison
...
3
...
The inputs to be calculated are stored
in the input register (AREG) and the input / output register (ACCUM)
for add, AND and OR functions
...
3
...
The control unit controls the operations of the ALU by
giving appropriate control signals to select a specific function and
then enable the operation after the data are fed into the registers
...
3
...
The term
“memory” usually refers to the main memory of the computer,
whereas, the word “storage” is used for the memory that exists on
disks, CDs, floppies or tapes
...
74
Fig
...
7 Memory Unit
There are different types of memory
...
Random Access Memory - RAM
RAM is the most common type of memory found in the modern
computers
...
When the CPU runs a program, it fetches the
program instructions from the RAM and carries them out
...
When we switch off a computer, whatever is stored in the
RAM gets erased
...
Read Only Memory - ROM
In ROM, the information is burnt (pre-recorded) into the ROM
chip at manufacturing time
...
When we switch off the
computer, the contents of the ROM are not erased but remain stored
permanently
...
ROM stores critical
programs such as the program that boots the computer
...
A variation of the PROM chip is that it is not burnt at the manufacturing
time but can be programmed using PROM programmer or a PROM
burner
...
Erasable Programmable Read Only Memory - EPROM
In EPROM, the information can be erased and reprogrammed
using a special PROM – programmer
...
A EPROM differs from a PROM in that a PROM can be
written to only once and cannot be erased
...
Electrically Erasable Programmable Read Only Memory
- EEPROM
EEPROM is a recently developed type of memory
...
It can be erased by exposing it to an electrical charge
...
EEPROM is not as fast as RAM or
other types of ROM
...
The main memory must store many data items and have some
way of retriving them when they are needed
...
Each box-holder has a box
with a unique number which is called its address
...
The memory has a number of locations in its
store
...
This serves to identify it for storage and retrival
...
A memory that performs both reads and writes is often
called a RAM, random access memory
...
Data Representation
The smallest unit of information is a single digit called a ‘bit’
(binary digit), which can be either 0 or 1
...
Memory sizes in modern systems range from 4MB
(megabytes) in small personal computers up to several billion bytes
(gigabytes, or GB) in large high-performance systems
...
Access time, also known as response time or latency, refers to how
quickly the memory can respond to a read or write request
...
The following terminology is used while discussing hierarchical
memories:
¾
The registers (internal memory) are used to hold the instruction
and data for the execution of the processor
...
¾
The memory closest to the processor is known as a cache
...
¾
The next is the main memory which is also known as the
primary memory
...
77
The secondary memory is the memory that supplements the
main memory
...
It is external
to the system nucleus and it can store a large amount of programs
and data
...
The program should be brought into
the main memory from the secondary memory before being executed
...
3
...
The data to be processed by the computer must be input to the
system and the result must be output back to the external world
...
5
...
For
example, a keyboard is an input device
...
Input devices are capable of converting data into a form which can
be recognized by computer
...
Keyboard
The most common input device is the keyboard
...
They have alphabetic keys to enter letters, numeric
keys to enter numbers, punctuation keys to enter comma, period,
semicolon, etc
...
The keyboard detects the key pressed and generates the
corresponding ASCII codes which can be recognized by the
computer
...
3
...
Mouse is a small device, you can roll
along a flat surface
...
When
the mouse is moved, the ball rolls
...
You will need to
click the button at the top of the mouse to select an option
...
Mouse is very
popular in modern computers
...
3
...
It can read image or
text printed on a paper and translate the information into a form that
the computer can use
...
They are useful for publishing and
multi-media applications
...
3
...
A bar code is a pattern printed in lines of different
thickness
...
The
system gives fast and error-free entry of information into the
computer
...
3
...
The digital camera takes a still photograph, stores it and
sends it as digital input to the computer
...
Fig
...
12 Digital Camera
Touch Sensitive Screen
Touch Sensitive Screen is a type of display screen that has a
touch-sensitive panel
...
You can use your
fingers to directly touch the objects on the screen
...
Fig
...
13 Touch Sensitive Screen
81
Magnetic Ink Character Recognition (MICR)
Fig
...
14 MICR Cheque
MICR is widely used by banks to process cheques
...
The cheque can be read using a special
input unit, which can recognize magnetic ink characters
...
It also saves time, ensures security
and accuracy of data
...
3
...
With OCR, a user
can scan a page from a book
...
This can be edited using a word processor
...
3
...
Such documents
are read by a reader, which transcribes the marks into electrical pulses
which are transmitted to the computer
...
Light Pen
A light pen is a pointing device shaped like a pen and is
connected to a monitor
...
3
...
Light pens have the advantage of ‘drawing’
directly onto the screen, but this can become uncomfortable, and
they are not accurate
...
It is handy and data can be stored and retrieved
...
All the credit cards, ATM cards (banks), petro cards, etc
...
Fig
...
18 Magnetic Reader
Smart Cards
This input device stores data in a microprocessor embedded
in the card
...
These data can be read and given as input to the
computer for further processing
...
Fig
...
19 Smart Card Reader
84
Notes Taker
Notes taker is a device that captures natural handwriting on any
surface onto a computer
...
Fig
...
20 Notes Taker
Microphone
Microphone serves as a voice input device
...
Using the microphone along
with speech recognition software can offer a completely new
approach to input information into your computer
...
The voice-in or speech recognition approach can almost fully replace
the keyboard and mouse
...
It can also be a boon for those who have never
learned to type
...
3
...
5
...
An output
device is capable of presenting information from a computer
...
But the
monitors and printers are commonly used output devices
...
It provides a visual display of data
...
Fig
...
22 Monitor
Initially there were only monochrome monitors
...
Monitors display images and
text
...
Most of the monitors have a 4 : 3 width to height
ratio
...
The number of pixels that can be displayed vertically and
horizontally gives the resolution of the monitor
...
Some popular
resolutions are 640 x 480 pixels, 800 x 600 pixels and 1024 x 768
pixels
...
86
Printers
Printer is an output device that prints text or images on paper
or other media (like transparencies)
...
There are different kinds of printers, which
vary in their speed and print quality
...
Printers
Impact
Line
printer
Non-impact
Serial
printer
(Dot matrix
printer)
Thermal
(fax) printer
Laser
printer
Inkjet
printer
Fig
...
23 Types of Printers
Impact printers include all printers that print by striking an ink
ribbon
...
Line printers, dotmatrix printers are some of the impact
printers
...
Ø Due to being robust and low cost, they are useful for bulk
printing
...
Ø Due to its striking activity, impact printers are very noisy
...
Ø Impact printers do not support transparencies
...
Non-impact printers
include laser printers, inkjet printers and thermal printers
...
Ø They are quiet than impact printers because there is no
striking mechanism involved
...
Ø These printers produce high-quality graphics
Ø These printers usually support the transparencies
Ø These printers cannot print multipart forms because no impact
is being made on the paper
...
A line printer can print 150 lines to 3000 lines
per minute
...
But it can print large volume of text data very fast
compared to the other printers
...
88
Fig
...
24 Line Printer
Dot Matrix Printer
The most popular serial printer is the dot matrix printer
...
They are similar to typewriters
...
The printing
speed is around 300 characters per second
...
Fig
...
25 Dot Matrix Printer
89
Thermal Printer
Thermal printers are printers that produce images by pushing
electrically heated pins against special heat-sensitive paper
...
Fig
...
26 Thermal Printer
Thermal printer paper tends to darken over time due to
exposure to sunlight and heat
...
It also produces a poor quality print
...
It can produce very good quality of
graphic images
...
The
available resolutions range from 300 dpi at the low end to around
1200 dpi at the high end
...
3
...
A black cartridge is also
used for crisp monochrome output
...
Magnetized plates in the ink’s path
direct the ink onto the paper in the described shape
...
3
...
Speaker serves as a voice output device
...
Voice output has become very common in many places like airlines,
banks, automatic telephone enquiry system etc
...
Fig
...
29 Speakers
91
Plotters
Apart from the output devices like printers, plotters are also
used to produce graphical output
...
3
...
3 Storage Devices
The computer may need to store data, programs etc
...
This is called the secondary storage
...
Secondary storage can be used to transmit data to another computer either immediately or a latter time
...
Some of the commonly used storage devices are hard disks, magnetic tapes, floppy
disks and CD-ROM
...
The average time required to reach a
storage location and obtain its contents is called its access time
...
Hard Disk
Hard disk is a magnetic disk on which you can store computer
data
...
This means
you can store and retrieve data randomly
...
The magnetic disk consists of high speed rotating
surfaces coated with a magnetic recording medium
...
When writing data, a write
92
head magnetizes the particles on the disk surface as either north or
south poles
...
The read
and write heads are generally combined into a single head unit
...
Data is arranged as a series of concentric rings
...
Fig
...
30 A track subdivided into sectors
The smallest unit that can be written to or read from the disk
is a sector
...
This is known as rotational latency, and on
average is one half of the period of revolution
...
Each track is
divided into sectors
...
93
High data rates demand that the disk rotates at a high speed
(about 3,600 rpm)
...
Fig
...
31 Hard Disk Drive
The storage capacity of a hard disk can be Gigabytes (GB),
i
...
thousands of Megabytes of information
...
The tape itself is
a strip of plastic coated with a magnetic recording medium
...
3
...
Usually, seven or nine bits are recorded simultaneously to
form a character together with a parity bit
...
94
Data is stored in frames across the width of the tape
...
Magnetic tape is a serial access medium, similar to
an audio cassette, and so data cannot be randomly located
...
Floppy Disk
Fig
...
33 Floppy Disk
The floppy drive uses a thin circular disk for data storage
...
It is a thin magnetic-coated disk contained in a
flexible or semi-rigid protective jacket
...
A
read/write head makes physical contact with the disk surface
...
The floppy disks are usually 3
...
However, older floppy
disks may be in use; these would be 5
...
A 3
...
44 MB of data
...
This prevents any new data being stored or any old data being erased
...
Floppy disks are
slower to access than hard disks and have less storage capacity
...
It can be accessed randomly
...
The optical disk is a random
access storage medium; information can be easily read from any
point on the disk
...
Fig
...
34 Compact Disk
It is now possible to have CD-ROMs where tracks of
information can be written onto them by the user
...
Summary
*
Computers are often compared to human beings since both
have the ability to accept data, store, work with it, retrieve
and provide information
...
*
The hardware components include input devices, processor,
storage devices and output devices
...
*
A computer uses input devices to accept the data and
program
...
*
CPU is the brain of any computer system
...
*
Control unit controls all the hardware operations, ie, those of
input units, output units, memory unit and the processor
...
*
In the main memory, the computer stores the program and
data that are currently being used
...
This
concept is due to John Von Neuman
...
*
The secondary memory is the memory that supplements the
main memory
...
*
The most common input device is the keyboard
...
*
Monitor is a commonly used output device
...
Exercises
I
...
3) CPU stands for _________
4) ALU stands for _________
5) RAM stands for _________
6) ROM stands for _________
7) The stored program concept is conceived by _________
8) Main memory is also known as _________ memory
...
10) _________ supplements the main memory
...
12) _________ is a input device mainly used to capture images
...
II
...
2) Keyboard is an output device
...
98
4) Main memory is a non-volatile memory
...
6) Registers are a part of secondary storage
...
8) Light pen is an input device
...
10) CD – ROM stands for Compact Disk – Read Only Memory
...
Answer the following
1) How are the human being and the computers are related?
2) What are the components of the digital computer?
3) What are the functional units of a computer system?
4) Write the essentials of the stored program concept
...
6) What are the different types of main memory?
7) Define memory read and memory write operations
...
13) What is an output device?
14) List few commonly used output devices
...
17) What is the role of ALU?
18) What is a control unit?
19)What are registers?
20)What is a bus?
IV
...
1) Describe in detail the various units of the Central Processing Unit
...
3) Briefly explain various types of memory
...
V
...
(i)
(ii)
(iii)
(iv)
input the value of a
input the value of b
multiply c = a * b
output the value c
2) Describe a configuration for a personal computer system by
identifying the input, output, processing and storage devices and
their specifications
...
1 Logic Gates
A logic gate is an elementary building block of a digital circuit
...
At any given
moment, logic gate takes one of the two binary conditions low (0) or
high (1), represented by different voltage levels
...
For
example +5V might represent a logic 1 and 0V might represent a
logic 0
...
4
...
The input signal takes values ‘1’ or ‘0’
...
There are three fundamental logic gates namely, AND, OR and
NOT
...
Out of these NAND and NOR gates are called the universal gates,
because the fundamental logic gates can be realized Through them
...
101
AND Gate
The AND gate is so named because, if 0 is called “false” and 1
is called “true,” the gate acts in the same way as the logical “AND”
operator
...
In other words the output will be 1 if and only if both
inputs are 1; otherwise the output is 0
...
In boolean algebra, a variable can take either of the
values ‘0’ or ‘1’
...
4
...
C = A AND B
In boolean algebra the multiplication sign stands for the AND
operation
...
B
simply
or
C = AB
Read this as “C equals A AND B”
...
For instance, if both inputs are 0,
102
C = A
...
0
= 0
The truth table for AND Gate is
Input
A
0
0
1
1
B
0
1
0
1
Output
C
0
0
0
1
Table 4
...
The output is “true” if either or both of the
inputs are “true”
...
In otherwords the output will be 1 if and only if one or both inputs are
1; otherwise, the output is 0
...
4
...
Therefore,
C=A+B
103
Read this as “C equals A OR B”
...
2 Truth Table for OR Gate
NOT Gate
The NOT gate, called a logical inverter, has only one input
...
In other words the output C is always the
complement of the input
...
4
...
Therefore,
C = A
104
Read this as “C equals NOT A” or “C equals the complement of A”
...
3 Truth Table for NOT Gate
NOR Gate
The NOR gate circuit is an OR gate followed by an inverter
...
In other words, the only way to get ‘1’ as output is to have
both inputs ‘0’
...
The logic circuit of the
NOR gate is
A
A+B
C=A+B
B
Fig
...
5 Logic Circuit of NOR Gate
A
C
B
Fig
...
6 Logic symbol of NOR Gate
105
The output of NOR gate is
C = (A+B)
Read this as “C equals NOT of A OR B” or “C equals the
complement of A OR B”
...
4 Truth Table for NOR Gate
Bubbled AND Gate
The Logic Circuit of Bubbled AND Gate
A
A
C=A
...
4
...
B
This circuit can be redrawn as the bubbles on the inputs, where
the bubbles represent inversion
...
4
...
Let us analyse this logic
circuit for all input possibilities
...
0) = 1
...
1) = 1
...
0) = 0
...
1) = 0
...
5 Truth Table for Bubbled AND Gate
107
You can see that, a bubbled AND gate produces the same
output as a NOR gate
...
In other words the circuits are interchangeable
...
B
which establishes the De Morgan’s first theorem
...
It acts in the manner of the logical operation “AND” followed by
inversion
...
In otherwords the output of the NAND gate is 0 if
and only if both the inputs are 1, otherwise the output is 1
...
B)
C = (A
...
4
...
4
...
B)
Read this as “C equals NOT of A AND B” or “C equals the
complement of A AND B”
...
1) = 1 = 0
108
The truth table for NAND gate is
Output
Input
A
0
0
1
1
B
0
1
0
1
C
1
1
1
0
Table 4
...
4
...
A
C
B
Fig
...
12 Logic Symbol of Bubbled OR Gate
109
We refer this as bubbled OR gate
...
7 Truth Table for Bubbled OR Gate
If we compare the truth tables of the bubbled OR gate with
NAND gate, they are identical
...
Therefore
(A
...
XOR Gate
The XOR (exclusive-OR) gate acts in the same way as the
logical “either/or
...
” The output is “false” if both inputs are “false” or if
both inputs are “true
...
The logic circuit of XOR gate is
A
A
A
...
B + A
...
B
B
B
Fig
...
13 Logic Circuit of XOR Gate
110
The output of the XOR gate is
C=AB+AB
The truth table for XOR gate is
Output
Input
A
0
0
1
1
B
0
1
0
1
C
0
1
1
0
Table 4
...
Hence,
C=A+B
The logical symbol of XOR gate is
A
C
B
Fig
...
14 Logic Symbol of XOR Gate
XNOR Gate
The XNOR (exclusive-NOR) gate is a combination XOR gate
followed by an inverter
...
In simple words, the output is 1
if the input are the same, otherwise the output is 0
...
4
...
B + A
...
Therefore,
C=A B
The logical symbol is
Fig
...
16 Logic Symbol of XNOR Gate
The truth table for XNOR gate is
Output
Input
A
0
0
1
1
B
0
1
0
1
C
1
0
0
1
Table 4
...
In theory, there is no limit to the number of gates that
can be arranged together in a single device
...
Arrays of logic gates are found in digital integrated circuits
...
Logical Gates
AND
OR
Symbol
Truth Table
A
0
0
1
1
A
0
0
1
1
A
0
1
NOT
NAND
NOR
XOR
XNOR
B
0
1
0
1
B
0
1
0
1
A
0
0
1
1
A
0
0
1
1
A
0
0
1
1
A
0
0
1
1
Table 4
...
In fact, these
fundamental gates can be expressed in terms of either NAND gates
or NOR gates
...
Here A and B denote
the logical states (Input)
...
4
...
0
B
B
B
Fig
...
18 Universality of NOR Gates
114
4
...
Also, it is
possible to convert back and forth between the three representations
of a boolean function (equation, truth table, and logic circuit)
...
Converting a Boolean Equation to a Truth Table
Truth table lists all the values of the boolean function for each
set of values of the variables
...
Hence the truth table will have 23 = 8 entries, from 000 to 111
...
For instance, if A = 0, B = 0 and C = 0
then
D =(A
...
0) + 0
= 0 + 0
= 0 + 1
= 1
Here we use the hierarchy of operations of the boolean
operators NOT, AND and OR over the parenthesis
...
Any boolean function may be realized using the three logical
operations NOT, AND and OR
...
Now we will draw the logic circuit for the boolean function
...
The output E is obtained by ORing the individual terms given in
the right side of the boolean function
...
116
The first term A , which is the complement of the given input
A, is realized by
A
A
The second term is (B · C)
...
The logic circuit is realized by
The third term, which is the complement of D is realized by
D
D
The output D is realized by ORing the output of the three
terms
...
Let us formulate an expression
for the output in terms of the inputs for the given the logic circuit
To solve this, we simply start from left and work towards the
right, identifying and labeling each of the signals that we encounter
until we arrive at the expression for the output
...
Let us label the input signals as
A, B, C and the output as D
...
A simplest way is
to write the boolean function as an OR of minterms
...
For example, assuming the inputs to a 4-variable boolean
function as A, B, C, and D the minterm corresponding to the input
1010 is : A • B • C • D
...
The reason that B
and D are complemented is because for this input, B = D = 0
...
For example let us write a boolean function for the following
truth table
A
0
0
0
0
1
1
1
1
Input
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
Output
D
1
0
1
0
1
0
1
0
To do this problem, we first circle all of the rows in the truth
table which have an output D = 1
...
This is illustrated in the table below
...
First, the
problem is stated (in words)
...
Third,
a truth table is formulated which shows the output of the system for
every possible input
...
Fifth, the boolean function is converted to a logic circuit
diagram
...
Let us consider the design aspects of a 2-input /single output
system which operates as follows: The output is 1 if and only if
precisely one of the inputs is 1; otherwise, the output is 0
...
Given above
...
It is clear from the statement
of the problem that we need two inputs, say A and B, and one output,
say C
...
The truth table for this problem is
given below
...
otherwise the output is ‘0’
...
Identify A B
1
1
the minterms for the rows in the truth table which have an
1
0
1
A B
output ‘1’
1
1
0
By ORing the minterms, we obtain the boolean function corresponding to
the truth table as
D = (A•B)+(A•B)
121
Step 5: Realization of the Boolean function into a Logic Circuit
Diagram
...
A
B
B
•
D=A•B+A•B
A
B
•
4
...
A unit that adds two binary
digits is called a half adder and the one that adds together three
binary digits is called a full adder
...
This simple addition consists of four possible operations
...
The higher significant bit in
this operation is called a carry
...
122
The boolean realization of binary addition is shown in the truth table
...
Input
A
0
0
1
1
Sum
B
S
0
1
0
1
0
1
1
0
0
Minterms
Of S
Carry
C
A
...
B
0
0
0
1
0
Minterms
of C
A
...
B+A
...
B
Which can be realized using logic circuit as,
Fig
...
19 Logic Circuit of Half Adder
123
which is further simplified as
In a half adder, an AND gate is added in parallel to the XOR
gate to generate the carry and sum respectively
...
4
...
As this circuit cannot accept a carry bit from a
previous addition, it is not enough to fully peform additions for binary
number greater than 1
...
A full adder sums three input bits
...
Two of the inputs represent the two significant bits
to be added and the third one represents the carry from the previous
significant position
...
124
Input
A B
C1
C2
Output
S
0
0
0
0
1
1
1
1
0
0
0
1
0
1
1
1
0
1
1
0
1
0
0
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
Table 4
...
The sum bit S is 1 if there exist
odd number of ‘1’s of the three inputs
...
Hence, the full adder can be realized as shown below
...
Hence the full adder can be realized as
...
4
...
If the logic circuit outputs are based on the inputs presented
at that time, then they are called combinational circuit
...
On the other hand, if the logic circuit outputs are based on, not only
the inputs presented at that time, but also the previous state output,
then they are called sequential circuits
...
A synchronous
sequential circuit is a system whose output can be defined from its
inputs at discrete instant of time
...
The flip-flop circuit is an example of
sequential circuit
...
5 The Flip-Flop
A flip flop is a circuit which is capable of remembering the
value which is given as input
...
These circuits are capable of storing
one bit of information
...
A common example of a circuit employing sequential logic is
the flip-flop, also called a bi-stable gate
...
The flip-flop maintains its states indefinitely until an
input pulse called a trigger is received
...
127
Flip – Flop Circuit using NOR Gates
By cross-coupling two NOR gates, the basic operation of a
flip-flop could be demonstrated
...
S
Q
Q
R
Fig
...
21 Flip Flop Circuit using NOR Gates
The flip-flop circuit has two outputs, one for the normal value Q
and another for the complement value Q
...
Here, the previous output states are fed back to determine
the current state of the output
...
As a starting point, we assume S = 1 and R = 0
...
This Q = 0 is again given along with R = 0 to make Q = 1
...
when S = 1 and R = 0 make Q = 1 and Q = 0
...
ie
...
128
In a similar manner the reset input changes the output Q = 0 and
Q = 1
...
This make Q = 0
...
ie
...
When the reset input returns to 0, the outputs do not change,
because the output Q remains as ‘0’ and Q as ‘1’
...
when S = 0 and R = 0 make Q = 0 and Q = 1 after S = 0 and
R = 1
...
These facts violate the output Q and Q are the
complements of each other
...
Thus a basic flip-flop has two useful states
...
When Q = 0 and Q = 1, it is called as
reset state
...
S
Q
Q
R
Fig
...
22 Flip Flop Circuit using NAND Gates
The corresponding truth table is given as
S
R
Q
Q
1
0
0
1
1
1
0
1
0
1
1
0
1
1
1
0
(after S =1 and R = 0)
(after S =0 and R = 1)
The NAND basic flip-flop circuit operates with inputs normally
at ‘1’ unless the state of the flip-flop has to be changed
...
This makes the flip-flop to
set state
...
This makes the flip-flop to reset state
...
, S = 0 and R = 0, both
the outputs become 1
...
130
There are several kinds of flip-flop circuits, with designators
such as D, T, J-K, and R-S
...
4
...
6
...
It allows to design and analyze circuits without using actual
instruments
...
It is a windows compatible tool and follows
the normal conventions of windows
...
The circuit diagrams and the output of the simulated circuits
can be printed or exported to other tools such as word processors
for inclusion in other documents
...
MultiSim is a
electronic workbench which is used for design and analysis of circuits
...
It also provides the advanced functionality you need to design from
specifications
...
6
...
6
...
To learn how to build and test some simple digital logic gates using
Multisim
...
Building a Simple Digital logic Gate
1
...
The
main screen is as shown in the fig
...
23
131
Fig
...
23 MultiSim Main Screen
2
...
Choose File > Save As, under the File Name box to save the
new workspace as circuit1
...
The filename will then
appear in the lower left hand corner of the workspace as shown in
the fig
...
24
...
4
...
Click on the Place menu, then click on the Component,which
shows the list of components in the component library
...
One can use the appropriate database, group and component drop-down list to select the desired component
...
4
...
4
...
Click on any one of the logic gates available in the ‘select a
component‘ dialog box and drag it to place it in the workspace
...
To get help, just click on the logic gate using the left mouse
button and choose help
...
4
...
6
...
are discussed
...
Right clicking on the workspace and select place components
or Ctrl+W
...
Once highlighted the
options in the ‘Circuit ‘ menu will apply to that component
...
All
selected components will be highlighted
...
Then select paste (or
...
They can then be moved to their required positions
...
ii)
Double click on the component
...
Change the values as required and then click on
‘Accept’
...
Any wires connected to it will be dragged
with it
...
You will be asked to confirm the delete
...
Drag the wire
directly to the leg of the next component and then drop it
...
Printing the Circuit
Select ‘Print’ from the File Menu and then select the item(s)
to print from the dialogue box that is opened
...
To save an existing circuit select ‘Save’ from the ‘File’ Menu
...
Consider a logical circuit by connecting two NOT gates with
an AND gate
...
Copy NOT gate
...
4
...
137
Fig
...
28 Construction of a Logic Circuit
4
...
5 The Logic Converter
MultiSim provides a tool called the logic converter from the
instrument bin
...
2
...
4
...
6
...
One can also use it to
produce a logic circuit from a truth table or boolean expression
...
4
...
138
Fig
...
29 Logic Convertor
The fig
...
30 shows the logic converter that you have placed
in the workspace
...
There are 8 input terminals and 1 output terminal
available for use
...
Fig
...
30 Logic Convertor on the Workspace
To use the logic converter, double-click on the logic
converter icon
...
4
...
139
8 Input Terminals
(A to H)
1 Output Terminal
Boolean expression goes here
Fig
...
31 View of Logic Convertor
Notice that the 8 input terminals are labeled as A to H and
the output terminal is labeled as ‘Out’
...
6
...
Construct the circuit by drawing the components (logic circuit)
...
Connect the inputs of your circuit to the input terminals on the
logic converter and single output of the circuit to the output terminal
on the logic converter as shown below
...
Click the logic circuit → truth table button
...
4
...
7
Converting a Truth Table to a Boolean Expression
Once you have a truth table, the logic converter can transform
it into a boolean function in the form of an algebraic expression
...
Click the number of inputs you want, from A to H at the top of
the logic converter
...
In
this case select A, B and C
...
Click the output
values once to change as ‘0’ and twice to change as ‘1’
...
144
The boolean expression will be displayed at the bottom of
the logic converter
...
A’ means NOT A,
or A
...
6
...
To try to
simplify the expression, click the ‘simplify’ button
using the previous truth table
...
6
...
Click the ‘Boolean Expression to Truth
Table’ button
after entering the Boolean
expression A’ + BC + B’ in the logic converter
...
146
4
...
10
Converting a Boolean Expression to a Circuit
To do this, enter the boolean expression, A’B+B’C+ABC and
click the ‘Boolean to Circuit’ button
The resulting circuit will appear in the workspace
...
6
...
147
4
...
12
Creating a Circuit from a Truth Table
This is the most useful conversion for a circuit designer
...
This requires two conversions using the logic converter
...
•
•
Create a truth table
...
148
•
Click the ‘Boolean to Circuit’ button
...
If you want to move it, point to one component and drag the circuit
...
13 : Quick Guide to convert a Digital Circuit using the
Logic Converter
150
Summary
☛ A logic gate is an elementary building block of a digital circuit
...
☛ we have other logic gates like NAND, NOR, XOR and XNOR
...
☛ The circuit that performs addition within the Arithmetic and
Logic Unit of the CPU are called adders
...
☛ one that adds together three binary digits is called a full adder
...
☛ Electronic workbench is a simulation tool for electronic circuits
...
151
Exercises
I
...
In AND gate the output is __________ when both the inputs
are ‘true’
...
In OR gate the output is __________if both the inputs are‘false’
...
A__________ is an elementary building block of a digital circuit
...
The NAND gate operates as an AND gate followed by a
__________gate
...
The __________gate circuit is an OR gate followed by an
inverter
...
__________and __________gates are called universal gates
...
__________, __________and __________gates are called the
fundamental gates
...
A unit that adds two binary digits is called a __________
9
...
10
...
II
...
2
...
4
...
6
...
Logic circuits have two or more outputs
...
XOR is a fundamental gate
...
NOR gate can be used to realize OR gate
...
Full adder can be realized using two half adders and an OR gate
...
XOR gate is used to build half adder
...
XOR gate circuit is an OR gate following by an inventor
10
...
III
...
2
...
4
...
6
...
8
...
How OR gate can be realized using NAND gate?
Give the truth table of XOR gates for two inputs
...
What is a sequential circuit?
IV
...
Determine the truth table for the following Boolean functions
E = A + (B
...
Convert the following truth tables to a Boolean equations
...
Convert the following logic circuit to a boolean equation
...
Realize the boolean function to a logic circuit
E = A B + BC + ABC
5
...
6
...
Project
1
...
2
...
3
...
4
...
Also
simplify the Boolean expression
...
1 Introduction
When a computer is devoid of any software it is just like dead
bodies
...
One of them cannot do anything useful by itself without
help from the other
...
System Software looks
after the functions of the computer
...
System software makes efficient use of the computing resources and normally provides a uniform base for different apllications
...
Application software helps the user to do his/her work
...
Moving a hand is a
voluntary action
...
The actual work is undertaken only by the hardware
...
In the subsequent generations of computers direct access is denied
...
What is the reason for the denial of the access?
If the access is not denied, unless the user is hard working, one of the two
alternatives can happen
...
2) The user may damage the computer hardware
...
Who will access the computer
hardware directly if the user is denied such permission? The answer is the
Operating System
...
This resembles the life of
modern man, who cannot tolerate power cut even for five minutes
...
The average user wants to have a
simple high-level abstraction to deal with
...
At the end you are shown an
image of the object
...
The brain provides a convenient highly sophisticated abstraction
...
In this case eye is an interface
between the object and the part of the brain that processes visual data
...
The Operating System adds extended capabilities to
a machine with which it is easier to program than the underlying hardware
...
Modern computers are highly
complex machines
...
So it is very difficult to manage such a complex system but the Operating System manages the complex system in an efficient way
...
In this view the primary task of the Operating System is to keep track of
who is using which resource, to grant resource requests, to account for
usage and to mediate conflicting requests from different programs and
users
...
The
Operating System is the intermediary between the user and computer
hardware
...
The secondary goal was to make the computer environment, user-friendly
...
The Operating System acts as the manager of resources such as
CPU time, memory space, file storage, I/O devices
...
That is, Operating System allocates resources in such a
manner so as to achieve the maximum best possible result
...
The Operating System is like a supervisor in a company providing an excellent environment in which the other people can perform useful work
...
A control program controls the execution of user
programs to prevent errors and improper use of the computer
...
It is hard to define Operating System
...
One of the definitions is that Operating System is
one program running at all times on the computer
...
The Operating System’s goals are to:
1)
2)
3)
execute user programs in a user-friendly atmosphere
...
optimize computer hardware
...
Now-a-days people
are hard pressed for time, so they cannot undergo any training for making
use of the Operating System
...
The Operating System should allow
developing application programs easier
...
The
Operating System should be portable
...
If there is a new version of the Operating System, it should not
confuse the people who used the earlier version and also it should run
software that ran successfully in earlier versions
...
The Operating System should provide data confidentiality
...
If this is possible then the scientific and technological institutions and banks will have a nightmarish existence
...
The vendor should be accessed easily
...
The Operating System should work in a network as well as distributed environment
...
The Operating system should provide the help facility
...
Instead they may try to get help from the system
...
There should be
different levels of help to satisfy the needs of different levels of users
...
In those days programs dealt
mainly with scientific problems
...
These libraries complicated the normal user of
that time
...
But this prevented the programmer to remove the errors (debug) immediately
...
A brief History of the Operating System
...
In order to use
CPU more efficiently, jobs of similar nature were grouped and made to run
in batches
...
To avoid the delay due to manual operation,
Automatic Job Sequencing mechanism was introduced
...
If scientific applications had been used in a computer, the
CPU (Central Processing Unit) was busy with the program, but if business
problems had been handled, I/O system was busy and the CPU was kept
idle
...
In those days data were stored in cards, called punched
cards
...
A buffer (Refer chapter 6) was (and still is) allowed to store Input, when the
CPU needed the data, buffer sent the data immediately
...
When the
processing was completed, the CPU sent the output to the buffer
...
The CPU
having taken the necessary actions and resumed its original work
...
Spooling (is a way of dealing with dedicated I/O devices in the multiprogramming system
...
When printing work had to be
undertaken, the print image was copied into the disk system and when conditions were favourable the print image was sent to the printer
...
While executing one job, the OS, reads next job from card reader
into a storage area on the disk and outputs printout of previous job from disk
to the printer
...
The job scheduling
led to the concept known as the Multiprogramming
...
Multiprogramming allows many programmers to load their programs in the different partitions
...
Multiprogramming was followed by Time-sharing concept
...
In the next cycle, the program that had been
considered earlier was taken once again
...
159
5
...
2
...
They are
1
...
2
...
Single user Operating System : At a time, only one user can operate the
system
...
Multi-user Operating System : More than one user can operate the same
system simultaneously
...
Unix is an example of multi-user Operating System
...
2
...
If the
application software is allowed to allocate or de-allocate, two or more
users may try to write on the same sector of disk, resulting in confusion
...
In order to avoid such an awkward situation, only the Operating System is empowered to make such an allocation or de-allocation
...
Such safeguading of data is called Data Security
...
In fact Input/Output operation code of the Operating System
constitute a sizeable code of the Operating System
...
Otherwise any user can access any type of sensitive information
...
160
For example, banks will have precarious existence
...
When the application program is translated into the machine code, the request for reading or writing will not be translated
into the machine code, instead a system call is given
...
) The Operating System will then generate suitable input/output command to
the hardware to replace this system call
...
User code will not be
entertained for input/output at any circumstance
...
Thus it
saves from reinventing the wheel
...
The Operating System does the spadework for the arrival of application program and the
Operating System which is in the back ground, when needed comes
into forefront and does its work gracefully after that it relegates itself to
the background
...
2
...
Appropriate networking and Infrastructure must be provided for this
...
Usage of printers is rampant
...
Even a small document takes a few minutes to complete the printing work
...
Spooling is a way of dealing with dedicated I/O
devices in a multiprogramming system
...
(Directory is a container for storing files on other sub-directories)
...
If two users print
two documents, in the absence of overlapping of the
two documents
...
This unwanted behaviour is completely eliminated by spooling
...
While printing, the printer is not
allowed to print the original document; instead it is allowed to print
the contents of spooler program
...
In a tightly coupled system the processors
share memory and a clock; communication usually takes place
through the shared memory
...
3 Most Desirable characters of the Operating System
5
...
1 User Interface
The Operating System should concentrate on the user interface
...
Similarly the only way that you can interact with a computer is through
the user interface
...
If the interface is not user-friendly, only persistent people may
continue with their work with the computer
...
One can judge, from the immense popularity of the
GUI (Graphical User Interface) based interface, the importance of well
designed well thought interface
...
The vivid
colours attract children
...
Icons give iterative usage of the particular application
...
The user interface of the Operating System should be appealing to the senses
...
Human brain learns through association
...
In addition
to the above, the following points should also be considered when
User Interface is designed
...
As already stated, people are hard pressed for time
...
The speed of response is nothing but the time taken
to execute a particular task
...
With little practice, the user should be in a position to
avoid errors
...
Vivid colours,
enchanting music may achieve this
...
6) The ultimate aim of any product is to satisfy the customer
...
Interface developers should also take the following considerations into account
...
The other users such as programmers may work even in
an unfriendly environment
...
Menus, minimal typing work will be
an added advantage of the Operating System
...
3
...
Any error in the user program should not be allowed
to spoil the entire memory
...
If some errors creep
into the user program then only user memory may be affected however the reserved memory is always in an unaffected condition
...
Therefore the number of jobs accommodated cannot exceed the number of partitions
...
This is like
cutting the feet to the size of the shoe (if the size of the shoe is
inadequate)
...
163
Operating System should manage the devices also
...
In order to achieve
successful operation, the processes should effectively communicate with
each other
...
5
...
3 Process management
Process management undertakes the allocation of processors to
one program
...
Several algorithms are used to allocate the job to the processor
...
1
...
2
...
Round Robin
...
Based on Priority
...
Suppose you are standing in a queue to get your notebook corrected from your teacher
...
Then the next student in the
queue gets it corrected and so on
...
Now, let us deal with this FIFO a little more technically
...
The processes are executed in the order in
which they enter the queue
...
Take two jobs A and B
...
A byte
consists of eight bits
...
First the job A will be assigned processor time after which B gets
its turn
...
For example take three jobs A, B, C
...
Based On Priority
In this method each job is assigned a Priority
...
Take two jobs A and B
...
Job B is assigned to the processor before job A
...
The objectives of the CPU Scheduling should be
to maximise
(1) The CPU utilisation
...
before the execution of the job and to run the job
...
The telecommunication
industry provides all the above facilities
...
Web camera
unites the parents and their children who are away from each other
...
You can see a LAN with more than
1000 computers connected to it
...
The size and complexity of the
network grow day by day
...
The Operating System shoulders the burden (responsibility)
of managing the nets
...
3
...
The Operating System
provides three levels of securities to the user
...
Permissions can either be granted
by the creator of the file or by the administrator of the system
...
Both windows XP professional and Linux offer the
password facility
...
People from all over the
world try to provide such a security
...
5
...
5 Fault tolerance
The Operating Systems should be robust
...
5
...
6 Application Base
Operating System should provide a solid basis for running many
popular applications
...
3
...
But Distributed Operating System ensures that the entire network
behaves as a single computer
...
The user’s job is executed in an
idle machine and the result is communicated to the user machine
...
In a distributed Operating System a user is not aware of multiplicity of
machines
...
But the virus attacks discourage people to get connected
to the net
...
167
Summary
Software is of two types
...
System Software and
2
...
Operating System is a system Software that comes under System
Software
...
There are
1
...
Multi-user operating system
...
When Application programs want to access the I/O
capabilities, they merely substitute with the system call
...
Spooling is superior to buffer
...
Multiprogramming gives the illusion that many programs run simultaneously
...
Exercises
I
...
The ________,________ can access the hardware directly
...
Operating System is the ________ between the user and computer hardware
...
4 The ________ ,________ is only means by which a user interacts with the computer
...
State whether the following are True or False
1
...
2
...
3
...
4
...
169
III
...
2
...
4
...
7
...
Who will access the computer hardware directly?
Define an OS
...
Explain the main functions of the operating system
...
Explain the input / output managed by operating system
...
List out advantages of the Distributed Operating System over
the Network Operating System
...
Name some of the required features of Operating System
...
1 Introduction
Communication is the desire of man
...
These primitive
methods have given way to sending messages through electronic
pulses
...
Data in a computer is transmitted
to another computer located across continents almost
instantaneously using telephone, microwaves or radio links
...
Now networking has become a
very important part of computing activity
...
2 Network
A large number of computers are interconnected by copper
wire, fiber optic cable, microwave and infrared or through satellite
...
6
...
For example several PCs can be connected
to a single expensive line printer
...
Duplication
of data file on separate PCs can be avoided
...
From a remote
location, a mobile salesman can relay important messages to
the central office regarding orders
...
6
...
·
·
·
·
·
·
·
·
·
Electronic data interchange
Tele-conferencing
Cellular telephone
Cable Television
Financial services, marketing and sales
Reservation of Airlines, trains, Theatres and buses
Telemedicine
ATM
Internet banking
Several educational institutions, businesses and other
organizations have discovered the benefits of computer networks
...
They can co-operate on
projects to maximize the usage of available expertise and talent
...
5 Benefits of Network
·
·
·
·
Effective handling of personal communications
Allowing several users to access simultaneously
Important programs and data:
Making it easy for the users to keep all critical data on
shared storage device and safeguard the data
...
172
The computer communication should ensure safe, secure and
reliable data transfer
...
Both the sender and the receiver knows the
status of the data sent
...
6
...
·
·
·
Local Area Network (LAN)
Metropolitan Area Network (MAN)
Wide Area Network (WAN)
A network connecting systems and devices inside a single
building or buildings close to each other is called Local Area Network
(LAN) (Fig
...
1)
...
They are connected either by wire or wireless
...
In
a wireless LAN, connections may be using infrared or radio waves
...
However,
wireless network communicates slowly than a wired network
...
6
...
LAN is generally used to share hardware,
software and data
...
A Network that spans a geographical area covering a
Metropolitan city is called Metropolitan Area Network (MAN)
A WAN is typically two or more LANs connected together
across a wide geographical area
...
6
...
Each computer in the network is called a node
...
Some of the important consideration
is the type of nodes, the expected performance, type of wiring
(physical link) used and the cost
...
The five common
topologies are star, ring, bus, hybrid and FDDI
...
(Fig
...
2)
Such as a file server or host computer usually by a Unshielded
Twisted Pair (UTP) cables
...
6
...
6
...
Electronic data
are passed around the ring in one direction, with each node serving as
a repeater until it reaches the right destination
...
Fig
...
3 Ring Network
175
Bus Network: In a bus network all communication devices are
connected to a common cable called bus (Fig
...
4)
...
The data transmission is bidirectional
...
4
...
FDDI Network: A FDDI network (pronounced as fiddy short for
Fiber Distributed Data Interface) is a high-speed network using fiber
optic cable
...
The main
disadvantage is its high cost
...
8 Basic Elements in Networking
All networks require the following three elements
1
...
Depending upon the task, network
services require data, input/output resources and processing power
to accomplish their goal
...
Transmission media
Transmission media is the pathway for contacting each
computer with other
...
This provides a message delivery path
...
Protocols
A protocol can be one rule or a set of rules and standards
that allow different devices to hold conversations
...
9 Common Network Services
The following common network services are available
...
9
...
This improves the efficient storage and retrieval of computer
data
...
·
File transfer –Rapidly move files from place to place
regardless of file size, distance and Local operating system
...
Network applications are well suited to control data
storage activity on different storage systems
...
For example higher
secondary examination result posted on the web becomes less
used after a week
...
177
·
File update synchronization – Network service keeps track of
date and time of intermediate changes of a specific file
...
·
File archiving – All organizations create duplicate copies of
critical data and files in the storage device
...
In case of original file getting
damaged, Computer Operator uses the Network to retrieve
the duplicate file
...
6
...
2 Print services
Network application that control manage access to printers
and fax equipments
...
·
Eliminates distance constraints – take a printout at a different
location
...
·
Share specialized equipments-Some printers are designed
for specific use such as high-speed output, large size formals
or colour prints
...
·
Network fax service – Fax service is integrated in the network
...
This reduces the time and paper handling
...
9
...
Unlike file
services, message services deal actively with communication
interactions between computer users applications, network
applications or documents
...
9
...
They are different from file services because
they allow computers to share processing power, not just share data
...
Linking one computer to
another permits the power and resources of that computer to be
tapped
...
6
...
NIC is fixed in the computer and communication
channel is connected to it
...
Protocol specifies the procedures for
establishing maintaining and terminating data transfer
...
The OSI
provided a network architecture with seven layers
...
6
...
This architecture
helps to communicate between Network of dissimilar nodes and
channels
...
11
Forms of Data Transmission
Data is transmitted in two forms
1
...
Digital data transmission
Analog data transmission is the transmission
continuous waveform
...
Analog
sometimes modulated or encoded to represent binary
of data in a
instance, is
signals are
data
...
The distinct electrical state of ‘on’ and ‘off’ is
represented by 1 and 0 respectively
...
6
...
All computers
understand and work only in digital forms
7 Application
Purpose for communicating:
e-mail, file transfer,
client/server
0
1 0
1
0
1 01
6 Presentation
Rules for data conversion
5
Session
Starts, stops and governs
Transmission order
...
6
...
5
...
12 Modem
Computers at different parts of the world are connected by
telephone lines
...
The
telephone at the receiving end converts this electric signal into voice
...
The process of converting
sound or data into a signal that can flow through the telephone wire
is called modulation
...
The telephone
instrument contains the necessary circuit to perform these activities
...
It is known that the electrical and sound signals
are analog - which continuously vary with time
...
7 shows the relationship of modem to communication
link
Fig
...
7 Communication Using Modem
Equipments (DTE) are connected through modem and
Telephone line
...
DTE creates a digital signal and modulates using
the modem
...
The second
modem at the receiving end demodulates into a form that the computer
181
can accept
...
6
...
The rate at which the data are
transferred is expressed in terms of bits per second (bps)
6
...
6
...
Fig
...
8 Transmission modes
6
...
1 Simplex mode
In simplex mode, data can be transmitted in one direction as
shown in the figure
...
An example is the traditional television broadcast, in which the signal
182
is sent from the transmitter to the TV
...
In other
words a TV cannot send a signal to the transmitter
...
14
...
But at any point of time data can go in any
one direction only
...
When traffic moves in one direction, traffic on the
opposite direction is to wait and take their turn
...
6
...
3 Full duplex mode
In full duplex mode a device can simultaneously send or
receive data
...
An example is two
people on the telephone talking and listening simultaneously
...
Full duplex transmission
is used in large computer systems
...
15
Internet
Several networks, small and big all over the world, are
connected together to form a Global network called the Internet
...
Anyone connected to the Internet can
reach, communicate and access information from any other computer
connected to it
...
The Internet protocol (IP) addressing system is used to keep
track of the million of users
...
The IP addressing system uses the letter addressing system and
number addressing systems
...
16
Communication Protocol
Internet is a packet-switching network
...
The various packets are sent through a communication
network-often by different routes, at different speeds and sandwiched
in between packets from other messages
...
The packet switching is suitable for data
transmission
...
TCP/IP is made up of two components
...
TCP breaks up the data to be sent into little packets
...
It makes the process appear as if one computer is directly
connected to the other providing what appears to be a dedicated
connection
...
It is responsible for routing the packets to a desired
destination IP address
...
17
Who Governs The Internet ?
The Internet as a whole does not have a single controller
...
Internet Corporation for Assigned Names and
184
Numbers (ICANN) administers the domain name registration
...
6
...
This will bring out
·
·
·
·
New standard protocol
International connections
Consumer civilization
Data sharing in research and Engineering
6
...
World Wide Web
Web is a multimedia portion of the Internet
...
The Multimedia sites
include text, animated graph, voice and images
...
It contains several
millions of pages of information
...
A group of related web pages linked together forms a
web site
...
The Home page usually contains information about the site and
links to other pages on that site
...
6
...
185
Fig
...
9
...
The URL locates the pages on the
Internet
...
country-watch
...
This
protocol is meant for transferring the web files
...
com is the domain name
...
Looking for information on the Internet is
called surfing or browsing
...
Web browser translates HTML documents of
the website and allows to view it on the screen
...
The mouse
pointer moves over a underlined or highlighted words and images
186
change to a hand icon
...
This indicates the
link to other sites
...
E-mail - The World Wide Web is getting a lot of attention due to
its main attraction of Electronic mail
...
Each user is assigned an
electronic mail box
...
The message sent to any one resides in the mailbox till it
is opened
...
Usenet News Groups: Electronic discussion groups
...
Electronic discussion groups that focus on specific topic forms,
computer forums
...
Automatically messages reach the mailbox of that group
...
The transfer includes
software, games, photos, maps, music and such other relevant
materials
...
This feature is used to communicate a
microcomputer with mainframe
...
20
Getting connected to Internet
To use an Internet in the simplest way, we need
·
·
A Computer
A Telephone line
187
·
·
A Modem
Internet Service Provided or ISP
The ISPs are the companies which allows the user to use the
Internet for a price
...
ISP provides the following:
·
·
·
·
User name - An unique name that identifies the user
Password
- A secret code that prevents other users from
using your account
E-mail address- Unique address that you can send or receive
E-mails
...
Fig
...
10 shows dialog boxes on the computer screen wherein
the user name (Govt
...
By clicking on the dial button, the modem establishes a
connection with the ISP
...
6
...
Dialogue Box for Connecting to the Internet
188
There are two ways to look for the information on the Web
...
6
...
If URL is not known, then ‘Search Engines’ will help us to get the
information
...
Some of the popular
Search engines are Yahoo, Lycos, AltaVista, Hotbot , Google and
Askjeeves
...
6
...
Entering the URL
Internet explorer helps to use the net more effectively with
the navigation buttons (Fig
...
12) on the toolbar
...
6
...
Navigation Buttons
1
...
The small triangle adjacent to it displays a dropdown list of
several recently used pages
...
2
...
One
can jump forward by one page or several pages
...
Stop button: After clicking on a link, some times we may
realize that the link is not necessary
...
4
...
Click on the refresh button, helps
reload the page faster
...
Home button: While following the hyperlink, it is very easy
to get lost
...
6
...
Some sample sites
www
...
com the Internet Public Library site www
...
com and
Library of Congress www
...
gov
...
Free-wares: Some sites provide free download of software’s,
tutorials and benchmarks
...
Student can attend and interact in a class from home using a
computer
...
Job searches: The digital revolution is changing everything it touches
and the job market is no exception
...
There are sites relating to specific job and profession also
...
6
...
Sometimes these private network uses TCP / IP and other Internet
standard protocols and hence they are called intranet
...
Creating a web
page on the intranet is simple because they use only WordProcessing Software One of the main consideration of the intranet
is security
...
Taking intranet technology a few steps forward extranets are
useful in the business world
...
By using extranet business organizations can save
telephone charges
...
EXERCISES
I
...
____________is a typically two or more LANs connected
together across a wide geographical area
...
____________network computers and other communication
devices are connected in a continuous loop
...
In a high speed network ____________cables are used
...
The device that coordinates the data transfer is called
____________, ____________
5
...
6
...
7
...
8
...
9
...
10
...
II
...
What are the reasons for networking?
2
...
What are the elements that a computer communication should
ensure?
4
...
5
...
6
...
What are the transmission modes?
8
...
What is the role of ICANN?
10
...
192
Title: Computer
Description: This note is for A level students and also for 100 level students. This note will teach and guide you in computer science.
Description: This note is for A level students and also for 100 level students. This note will teach and guide you in computer science.