Professional Documents
Culture Documents
If we look at it in a very broad sense, any digital computer carries out the following five functions:
Step 2 - Stores the data/instructions in its memory and uses them as required.
Advantages ofComputers
Following are certain advantages of computers.
High Speed
Computer is a very fast device.
The computer has units of speed in microsecond, nanosecond, and even the picosecond.It can
perform millions of calculations in a few seconds as compared to man who will spend many
months to perform the same task.
Accuracy
In addition to being very fast, computers are very accurate.
Computers perform all jobs with 100% accuracy provided that the input is correct.
Storage Capability
Memory is a very important characteristic of computers.
A computer has much more storage capacity than human beings.
It can store large amount of data.
It can store any type of data such as images, videos, text, audio, etc.
Diligence
Unlike human beings, a computer is free from monotony, tiredness, and lack of concentration.
It can perform repeated tasks with the same speed and accuracy.
Versatility
A computer is a very versatile machine.
This machine can be used to solve the problems related to various fields.
At one instance, it may be solving a complex scientific problem and the very next moment it
may be playing a card game.
Reliability
A computer is a reliable machine.
Modern electronic components have long lives.
Computers are designed to make maintenance easy.
Automation
Computer is an automatic machine.
Automation is the ability to perform a given task automatically. Once the computer receives a
program i.e., the program is stored in the computer memory, then the program and instruction
can control the program execution without human interaction.
As data in electronic files can be retrieved as and when required, the problem of maintenance of
large number of paper files gets reduced.
Though the initial investment for installing a computer is high, it substantially reduces the cost of
each of its transaction.
Disadvantages of Computers
No I.Q.
A computer is a machine that has no intelligence to perform any task.
Each instruction has to be given to the computer.
A computer cannot take any decision on its own.
Dependency
It functions as per the user’s instruction, thus it is fully dependent on humans.
Environment
The operating environment of the computer should be dust free and suitable.
No Feeling
Computers have no feelings or emotions.
It cannot make judgment based on feeling, taste, experience, and knowledge unlike humans.
COMPUTER APPLICATIONS
Business
A computer has high speed of calculation, diligence,
accuracy, reliability, or versatility which has made it an
integrated part in all business organizations.
Banking
Today, banking is almost totally dependent on
computers.
Insurance
Insurance companies are keeping all records up- to-date
with the help of computers. Insurance companies,
finance houses, and stock broking firms are widely using
computers for their concerns.
Education
The computer helps in providing a lot of facilities in the education system.
The computer provides a tool in the education system known as CBE (Computer Based Education).
Marketing
In marketing, uses of the computer are following:
Healthcare
Computers have become an important part in hospitals, labs, and dispensaries. They are being used in
hospitals to keep the record of patients and medicines. It is also used in scanning and diagnosing different
diseases. ECG, EEG, ultrasounds and CT scans, etc. are also done by computerized machines.
Following are some major fields of health care in which computers are used.
Diagnostic System - Computers are used to collect data and identify the cause of illness.
Engineering Design
Computers are widely used for Engineering purpose.
One of the major areas is CAD (Computer Aided Design) that provides creation and modification of
images. Some of the fields are:
Structural Engineering - Requires stress and
strain analysis for design of ships, buildings,
budgets, airplanes, etc.
Military
Computers are largely used in defence. Modern tanks,
missiles, weapons, etc. Military also employs
computerized control systems. Some military areas
where a computer has been used are:
Missile Control
Military Communication
Military Operation and Planning
Smart Weapons
Communication
Communication is a way to convey a message, an idea, a picture, or speech that is received and
understood clearly and correctly by the person
for whom it is meant. Some main areas in this category are:
E-mail
Chatting
Usenet
FTP
Telnet
Video-conferencing
Government
Computers play an important role in government services. Some major fields in this category are:
Budgets
Sales tax department
Income tax department
Computation of male/female ratio
Computerization of voters lists
Computerization of PAN card
Weather forecasting
GENERATION OF A COMPUTER
Generation in computer terminology is a change in technology a computer is/was being used. Initially, the
generation term was used to distinguish between varying hardware technologies. Nowadays, generation
includes both hardware and software, which together make up an entire computer system.
There are five computer generations known till date. Each generation has been discussed in detail along
with their time period and characteristics. In the following table, approximate dates against each
generation has been mentioned, which are normally accepted.
Sr.
No. Generation & Description
First Generation
1
The period of first generation: 1946-1959. Vacuum tube based.
Second Generation
2
The period of second generation: 1959-1965. Transistor based.
Third Generation
3
The period of third generation: 1965-1971. Integrated Circuit based.
Fourth Generation
4
The period of fourth generation: 1971-1980. VLSI microprocessor based.
Fifth Generation
5
The period of fifth generation: 1980-onwards. ULSI microprocessor based.
First Generation Computers
The period of first generation was from 1946-1959. The computers of first generation used vacuum
tubes as the basic components for memory and circuitry for CPU (Central Processing Unit). These tubes,
like electric bulbs, produced a lot of heat and the installations used to fuse
frequently. Therefore, they were very expensive and only large organizations were able to afford it.
In this generation, mainly batch processing operating system was used. Punch cards, paper tape, and
magnetic tape was used as input and output devices. The computers in this generation used machine
code as the programming language.
Non-portable
Consumed a lot of electricity
In this generation, assembly language and high-level programming languages like FORTRAN, COBOL were
used. The computers used batch processing and multiprogramming operating system.
Use of transistors
Reliable in comparison to first generation computers
Smaller size as compared to first generation computers
Generated less heat as compared to first generation computers
Consumed less electricity as compared to first generation computers
Faster than first generation computers
Still very costly
AC required
Supported machine and assembly languages
Some computers of this generation were:
IBM 1620
IBM 7094
CDC 1604
CDC 3600
UNIVAC 1108
ThirdGeneration Computers
The period of third generation was from 1965-1971. The computers of third generation used Integrated
Circuits (ICs) in place of transistors. A single IC has many transistors, resistors, and capacitors along with
the associated circuitry.
The IC was invented by Jack Kilby. This development made computers smaller in size, reliable, and efficient.
In this generation remote processing, time-sharing, multi-programming operating system were used.
High-level languages (FORTRAN-II TO IV, COBOL, PASCAL PL/1, BASIC, ALGOL-68 etc.) were used during
this generation.
The main features of third generation are:
IC used
More reliable in comparison to previous two generations
Smaller size
Generated less heat
Faster
Lesser maintenance
Costly
AC required
Consumed lesser electricity
Supported high-level language
IBM-360 series
Honeywell-6000 series
PDP (Personal Data Processor)
IBM-370/168
TDC-316
Fourth generation computers became more powerful, compact, reliable, and affordable. As
a result, it gave rise to Personal Computer (PC) revolution. In this generation, time sharing,
real time networks, distributed operating system were used. All the high-level languages
like C, C++, DBASE etc., were used in this generation.
Fifth GenerationComputers
The period of fifth generation is 1980-till date. In the fifth generation, VLSI technology became
ULSI (Ultra Large Scale Integration) technology, resulting in the production of microprocessor
chips having ten million electronic components.
AI includes:
Robotics
Neural Networks
Game Playing
Development of expert systems to make decisions in real-life situations
Natural language understanding and generation
Desktop
Laptop
NoteBook
UltraBook
ChromeBook
TYPES OF COMPUTERS
Computers can be broadly classified by their speed and computing power.
Sr.
No. Type Specifications
PC (Personal Computer)
A PC can be defined as a small, relatively inexpensive computer designed for an individual
user. PCs are based on the microprocessor technology that enables manufacturers to put
an entire CPU on one chip. Businesses use personal
computers for word processing,
accounting, desktop publishing, and for
running spreadsheet and database
management applications. At home, the
most popular use for personal computers
is playing games and surfing the Internet.
Workstations generally come with a large, high-resolution graphics screen, large amount of
RAM, inbuilt network support, and a graphical user
interface. Most workstations also have
mass storage device such as a disk drive,
but a special type of workstation, called
diskless workstation, comes without a disk
drive.
Minicomputer
It is a midsize multi-processing system capable of supporting up to 250 users simultaneously.
Mainframe
Mainframe is very large in size and is an expensive computer capable of supporting
hundreds or even thousands of users simultaneously. Mainframe executes many programs
concurrently
Supercomputer
Supercomputers are one of the fastest computers currently available. Supercomputers are
very expensive and are employed for specialized applications that require immense
amount of mathematical calculations (number crunching).
For example, weather forecasting, scientific simulations, (animated) graphics, fluid dynamic
calculations, nuclear energy research, electronic design, and analysis of geological data (e.g.
in petrochemical prospecting)
All types of computers follow the same basic logical structure and perform the following five basic
operations for converting raw input data into information useful to their users.
S Operation Description
r
.
N
o
.
The process of entering data and instructions into the computer
1 Take Input
system.
Control Directs the manner and sequence in which all of the above
5
the operations are performed.
workf
low
Input Unit
This unit contains devices with the help of which we enter data into the computer. This unit creates a link
between the user and the computer. The input devices translate the information into a form understandable by
the computer.
CPU (Central Processing Unit)
CPU is considered as the brain of the computer. CPU performs all types of data processing operations. It
stores data, intermediate results, and instructions (program). It controls the operation of all parts of the
computer.
Output Unit
The output unit consists of devices with the help of which we get the information from the computer. This
unit is a link between the computer and the users. Output devices translate the computer's output into a
form understandable by the users.
Procedural Programming is a methodology for modeling the problem being solved, by determining the
steps and the order of those steps that must be followed in order to reach a desired outcome or specific
program state. These languages are designed to express the logic and the procedure of a problem to be
solved. It includes languages such as Pascal, COBOL, C, FORTAN, etc.
Merits:
¨ Because of their flexibility, procedural languages are able to solve a variety of problems.
¨ Programmer does not need to think in term of computer architecture which makes them focused on
the problem.
Demerits:
NUMBER SYSTEM
Number system is simply the ways to count things. Aim of any number system is to deal with
certain quantities which can be measured, monitored, recorded, manipulated arithmetically, observed
and utilised. Each quantity has to be represented by its value as efficiently and accurately as is necessary
for any application. The numerical value of a quantity can be basically expressed in either analog
(continuous) or digital (step by step) method of representation. In analog method, a quantity is
expressed by another quantity which is proportional to the first. For example, the voltage output of an
amplifier is measured by a voltmeter. The angular position of the needle of the voltmeter is proportional
to the voltage output of the amplifier.
Digital technology is different from analog technology. Many number systems are being used in
digital technology. Most common amongst them are decimal, binary, octal, and hexadecimal
systems. We are most familiar with the decimal number system, because we use it every day.
It is the base-10 or radix-10 system. Note that there is no symbol for “10” or for the base of
any system. We count 1 2 3 4 5 6 7 8 9, and then insert a 0 in the first column and add a new left
column, starting at 1 again. Then we count 1-9 in the first column again. (People use the base-10
system because we have 10 fingers!). Each column in our system stands for a power of 10 starting
at 100.
All computers use the binary system. The following points provides an overview of the binary system:
• In the binary number system (base of 2), there are only two digits: 0 and 1 and the place values are
20, 21, 22, 23 etc. Binary digits are abbreviated as bits. For example, 1101 is a binary number of 4 bits
(i.e.it is a binary number containing four binary digits.)
• A binary number may have any number of bits. Consider the number 11001.01 1. Note the binary
point (counterpart of decimal point in decimal number system) in this number.
• Each digit is known as a bit and can take only two values 0 and 1. The left most bit is the highest-order
bit and represents the most significant bit (MSB) while the lowest-order bit is the least significant bit
(LSB). Some useful definitions are:
Word is a binary number consisting of an arbitrary number of bits.
Nibble is a 4-bit word (one hexadecimal digit) 16 values.
Byte is an 8-bit word 256 values.
Binary Decimal
Number Number
0000 0
0001 1
0010 2
0100 3
0101 4
0110 5
0111 6
1000 7
1001 8
1010 9
1011 10
1100 11
1’s complement 1101 12
The 1’s complement of 1101 13 a binary number is obtained just by
changing each 0 to 1 1110 14 and each 1 to 0.
1111 15
Binary 1 0 1 1 1 1 0
number 0
1- 0 1 0 0 0 0 1
complemen 1
t
1’s complement
2’s complement
The 2’s complement of a binary number is obtained adding 1 to the 1’s complement of this number:
2’s complement = 1’s complement+1 Binary number 1 0 1 1 1 0 1
0
1’s complement 0 1 0 0 0 1 0 1
+ 1
2’s complement 0 1 0 0 0 1 1 0
Signed numbers
In a signed number, the left most bit is the so called sign bit: 0=positive number 1=negative number.
Sign-value notation
In this notation, the left-most bit is the sign bit and the others are used to represent the absolute value
notation.
1’s complement
In this notation, the positive numbers have the same representation as the sign-value notation, and
the negative numbers are obtained by taking the 1’s complement of the positive correspondents.
2’s complement
The positive numbers have the same representation as the sign-value notation, and the negative
numbers are obtained by taking the 1’s complement of the positive correspondents.
A decimal number is converted into its binary equivalent by its repeated divisions by 2. The division is continued
till we get a quotient of 0. Then all the remainders are arranged sequentially with first remainder taking the
position of LSB and the last one taking the position of MSB. Consider the conversion of 27 into its binary
equivalent as follows.
2 27
2 13 - 1
2 6– 1
2 3– 0
2 1- 1
2 0 - 1
If the number also has some figures on the right of the decimal point, then this part of the
number is to be treated separately. Multiply this part repeatedly by two. After first multiplication
by 2, either 1 or 0 will appear on the left of the decimal point. Keep this 1 or 0 separately and do
not multiply it by 2 subsequently. This should be followed for every multiplication. Continue
multiplication by 2 till you get all 0s after the decimal point or up to the level of the accuracy
desired. This will be clear from the following example. Consider the conversion of 27.62510 into
its binary equivalent. We have already converted 27 into its binary equivalent which is (11011)2. Now
for the conversion of 0.625, multiply it by 2 repeatedly as follows:
.62
5
X2
1.25
0 .25
0
X2
0.50
0 .50
0
X2
1.00
0 .00
1 0 1 0
Let us try another example, conversion of (58.0725)10 into binary. Split this number in two parts, i.e. 58
and .0725 and convert them into binary separately as described above.
2 58
2 -0
2
9
2 -1
14
27 -0
23 -1
21 -1
0 -1
11 1 0 1 0
Decimal to binary conversion
The conversion of 0.725
.072
5
X2
0.14 .145
0
50
X2
0.29 .290
00 0
X2
0.580 .580
0
00
X2 .160
1.16 0
00 X2
0.32
0 0 0 1 000
Representing numbers in binary is very tedious, since binary numbers often consist of a large chain of 0's and
1's. Convenient shorthand forms for representing the binary numbers are developed such as octal system and
hexadecimal system. With these number systems long strings of 0's and 1's can be reduced to a manageable
form. The section below gives an overview of these systems.
The octal number system has base-8 that is, there are 8 digits in this system. These digits are 0, 1, 2, 3, 4, 5, 6, and 7.
The weight of each octal digit is some power of 8 depending upon the position of the digit. Octal numbers showing
positional values (weights) of each digit are as follows:
Octal number does not include the decimal digits 8 and 9. If any number includes decimal digits 8 and 9, then the
number can not be an octal number.
2 126
2 15 -
6
2 1
-7
2 0
-1 1 7 6
.38
X8
3.04 .0
4
X8 .32
0.3 X8
2
2.56 .56
X8
4.48 .4
8
3 0 2 4
Using this conversion of octal digit into 3-bit binary number, any octal number can be converted into its binary
equivalent by simply replacing each octal digit by a 3-bit binary number. For example, conversion of 567, into its
binary equivalent is:
567 = 101110111
1.4.4 Binary to Octal Conversion
A binary number can be converted into its octal equivalent by first making groups of 3-bits starting from the LSB
side. If the MSB side does not have 3 bits, then add 0s to make the last group of 3 bits. Then by replacing each
group of 3 bits by its octal equivalent, a binary number can be converted into its binary equivalent. For example,
consider the conversion of 1100011001, into its octal equivalent as follows:
= 001 100 01 1 001 [As the MSB side does not have 3 bits, we have added two 0's to make the last group of 3
bits]
=l431
The hexadecimal number system has base 16 that is it has 16 digits (Hexadecimal means'16'). These digits are 0,
1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The digits A, B, C, D, E and F have equivalent decimal values 10, 11, 12,
13, 14, and 15 respectively. Each Hex (Hexadecimal is popularly known as hex) digit in a hex number has a
positional value that is some power of 16 depending upon its position in the number.
Hex
MSD Point LSD
Fig. 1.7 Hexadecimal number showing positional values (weight) of digits
(Source: http://www.egyankosh.ac.in/bitstream/123456789/10991/1/Unit-10.pdf)
Relationship of hex digits with decimal and binary numbers is given in Table 1.3. Note that to represent the
largest hex digit we require four binary bits. Therefore, the binary equivalent of all the hex digits has to be
written in four bit numbers.
16 579
16 36 -
3
16 2 -
4
-
2
0 2 4 3
Decimal to hex conversion
0 .26 is converted into hex number as follows:
.26
X 16
4.16
.16
X 16
2.56
.56
X 16
8.96
.96
4 2 8
Thus 579.2610 = 243.42816
(BA6)16 = B A 6
= 1011 1010 010
= (101110100110)2
This method can also be applied to hex to decimal and decimal to hex conversions. For example, consider the
conversion of 3C16, into its decimal equivalent:
1.6 Codes
We had an overview of binary, octal and hexadecimal number system. For any number system with n base B and
digits N0 (LSB), N1 N2 ..... N10 (MSB), the decimal equivalent N10 is given by
When numbers, letters or words are represented by a specific group of symbols, it is said that the number, letter or
word is being encoded. The group of symbols is called as the
code. Few codes will be discussed in the following sections.
Gray code
1.6.4 Excess 3
Excess-3 binary-coded decimal (XS-3), also called biased representation or Excess-N,
is a numeral system used on some older computers that uses a pre-specified
number N as a biasing value. It is a way to represent values with a balanced
number of positive and negative numbers. In XS-3, numbers are represented as
decimal digits, and each digit is represented by four bits as the BCD value plus 3
(the "excess" amount)
The smallest binary number represents the smallest value. (i.e. 0 − Excess Value)
The greatest binary number represents the largest value. (i.e. 2N+1 − Excess Value − 1)
The primary advantage of XS-3 coding over BCD coding is that a decimal number
can be 9’s complemented (for subtraction) as easily as a binary number can be 1's
complemented; just invert all bits. In addition, when the sum of two XS-3 digits is
greater than 9, the carry bit of a four bit adder will be set high. This works because,
when adding two numbers that are greater or equal to zero, an "excess" value of
six results in the sum. Since a four bit integer can only hold values 0 to 15, an
excess of six means that any sum over nine will overflow.
We are considering binary arithmetic in the context of building digital logic circuits to
perform arithmetic. Not only do we have to deal with the fact of finite precision
arithmetic, we must consider the complexity of the digital logic. When there is more
than one way of performing an operation we choose the method which results in
the simplest circuit.
1.7.1 Addition
Addition of binary numbers can be carried out in a similar way by the column
method But before this, view four simple cases. In the decimal number system, 3 +
6 = 9 symbolizes the combination of 3 with 6 to get a total of 9.
A B Ci S Co
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
One-bit binary addition
This says if all three input bits are zero, both S and Co will be zero. If any one of the
bits is one and the other two are zero, S will be one and Co will be zero. If two bits
are 1's, S will be zero and Ci will be one. Only if all three bits are 1's, both S and Co
will be 1's.
51 minuend
-22 subtrahend
29 difference
It is possible to perform binary subtraction using the same process we use for decimal
subtraction, namely subtracting individual digits and borrowing from the left. This
process quickly becomes cumbersome as you borrow across successive zeroes in
the minuend. Further, it doesn’t lend itself well to automation. Jacobowitz describes
the “carry” method of subtraction which some of you may have learned in
elementary school, where a one borrowed in the minuend is “paid back” by adding
to the subtrahend digit to the left. This means that one need look no more than
one column to the left when subtracting.
Subtraction can thus be performed a column at a time with a carry to the left,
analogous to addition. This is a process which can be automated, but we are left
with difficulties when the subtrahend is larger than the minuend or when either
operand is, signed. Since we can form the complement of a binary number easily and
can add signed numbers easily, the obvious answer to the problem of subtraction is
to take the 2’s complement of the subtrahend, then add it to the minuend. That is
51–22 = 51+ (–22).
Not only does this approach remove many of the complications of subtraction by the
usual method, but it also means special circuits to perform subtraction need not be
built All that is needed is a circuit which can form the bitwise complement of a
number and an adder.
1.7.4 Multiplication
A simplistic way to perform multiplication is by repeated addition. In the example
below, we could add 42 to the product register 27 times. In fact, some early
computers performed multiplication this way. However, one of our goals is speed,
and we can do much better using the familiar methods we have learned for
multiplying decimal numbers. Recall that the multiplicand is multiplied by each
digit of the multiplier to form a partial product, and then the partial products are
added to form the total product. Each partial product is shifted left to align on the
right with its multiplier digit.
42 multiplicand
x 27 multiplier
294 first partial product (42 X 7)
84
second
partial
product
(42 X 2)
1134
total
product
0111 multiplicand
x 0101 multiplier
0111 first partial product (0111 X 1)
0000 second partial product (0111 X 0)
0111 third partial product (0111 X 1)
0000 fourth partial products (0111 X 0)
0100011 total product
Notice that no true multiplication is necessary in forming the partial products. The
fundamental operations required are shifting and addition. This means we can
multiply unsigned or positive integers using only shifters and adders.
1.7.5 Division
As with the other arithmetic operations, division is based on the paper-and-pencil
approach we learned for decimal arithmetic. We will show an algorithm for unsigned
long division that is essentially similar to the decimal algorithm we learned in grade
school. Let us divide 0110101 (5310) by 0101 (510). Beginning at the left of the
dividend, we move to the right one digit at a time until we have identified a portion
of the dividend which is greater than or equal to the divisor. At this point, a one is
placed in the quotient; all digits of the quotient to the left are assumed to be zero.
The divisor is copied below the partial dividend and subtracted to produce a partial
remainder as shown below.
1 quotient
divisor 0101
0110101
dividend
0101
1 partial remainder
Now digits from the dividend are “brought down” into the partial remainder until
the partial remainder is again greater than or equal to the divisor. Zeroes are placed
in the quotient until the partial remainder is greater than or equal to the divisor,
and then a one is placed in the quotient, as shown below.
101
0101 011010
1
0101
110
The divisor is copied below the partial remainder and subtracted from it to form a
new partial remainder. The process is repeated until all bits of the dividend have
been used. The quotient is complete and the result of the last subtraction is the
remainder.
1010
0101 0110101
0101
110
0101
11
This completes the division. The quotient is (1010)2 (1010) and the remainder is (11)2
(310), which is the expected result. This algorithm works only for unsigned numbers,
but it is possible to extend it to 2’s complement numbers.
Multiple choice questions:
1. Aim of any number system is to deal with certain quantities which can be measured,
monitored, _____, manipulated arithmetically, observed and utilised.
a. recorded
b. stored
c. read
d. used
5. Binary number can be converted into its decimal equivalent by simply adding _____of
various positions in the binary number which has bit 1.
a. weights
b. number
c. ten
d. two
7. Advantage of the octal number system is the ease with which any octal number can be
converted into its____ equivalent.
a. decimal
b. hex
c. binary
d. tetra
9. What should be added to last group of 3 bits if the MSB side does not have 3
bits while converting numbers from binary to octal?
a. Zero
b. One
c. Two
d. Nine
10. In subtraction number which is being diminished is called the minuend; the
amount to be subtracted from the minuend is the called the .
a. difference
b. subtrahend
c. subtraction
d. minus