Professional Documents
Culture Documents
Computer Fundamentals
1.1.
Computer:
Computer is an advanced electronic device that takes raw data as input from the user
and processes these data under the control of set of instructions (called program)
and gives the result (output) in a useful format and saves output for the future use. It
can process both numerical and non-numerical (arithmetic and logical) calculations.
The basic components of a modern digital computer are: Input device, Output device,
Central Processing Unit (CPU) ahd Storage device. Computer cannot do anything
without a Program.
The term computer is derived from the Latin term "Computare", this means to
calculate. Computers were originally invented to do fast and accurate computations hence the name "computers."
Cha.rles Babbage is called the Father of the computer. The first mechanical computer
designed by Charles Babbage was called Analytical Engine. It uses read-only memory
in the form of punch cards.
Classification of computers:
.
Computers differ based on their data processing abilities. They are classified according to
purpose, data handling and functionality. There are many computers which are different
from each other in various aspects.
1.2.
Classification of Computers
a)
Analog Computer: An analog computer (spelt analogue in British English)
is a form of computer that uses continuous physical phenomena such as electrical,
mechanical, or hydraulic quantities to model the problem being solved.
b)
Digital Computer: A computer that performs calculations and logical
operations with quantities represented as digits, usually in the binary number
system.
c)
Hybrid Computer (Analog+ Digital): A combination of computers those
are capable of inputting and outputting in both digital and analog signals. A hybrid
computer system setup offers a cost effective method of performing complex
simulations.
According to Purpose
Computers may be utilized for either special or general purposes.
1.2.2
a)
General-Purpose Computers: These machines have the capability of
dealing with variety of different problems, and are able to act in response to
programs created to meet different needs. A general-purpose computer is one that
has the ability to store different programs of instruction and thus to perform a
variety of operations.
b)
Special-Purpose Computers: as to the name implies, is designed to
perform one specific task. The program of instructions is built into, or permanently
stored in the machine. Specialization results in the given task being preformed very
quickly and efficiently. Most special purpose computers have the capability of
performing just one task. They are frequently referred to us "dedicated," because of
their limitations to the specific task at hand.
1.2.3 On the basis of size and performance:
There are four main classifications of computers on the basis of their size and
performance. They are as under:
Micro computer
Mini computer
Mainframe computer
Super computer
2jPage
large computers that have the capacity to process the activity of multiple users at one
time. Many other smaller, less powerful computers (known as terminals) are
networked with the mainframe, meaning they are attached to the central mainframe
computer. The mainframe has the capability to process and store things that come
from the connected terminals. By using terminal users put inputs into the computer
and get the output through screen.
3IPage
1.3
Uses of a computer:
A computer is used in all human life: It has revolutionized all phases of human
activities. The most important have been given as follows:
1) Routine job handling:
The routine classical and stenotype jobs calculating and formality bits, salaries,
updating stocks, tax return, reservation records and information.
2) Traffic control:
Controlling traffic, traffic lights. Television cameras are used to maintain traffic light
routine.
3) Electronic money:
Automatic tellers machine (ATM) is very common in banks. You can deposit and
11) Publication:
The composing work is done speedily and economical with the help of computer. The
designing work is also done by computer. The quality is maintained is publication by
computer.
41Page
12) Communications:
The computer is used for sending message example printer, FAX, e-mail, Internet.
The import and export work is done on internet.
approach is used in film production with the help of computer. The cartoon films are
developed by computers.
14) Education:
The computer is widely used in the field of education and independent study field of
computer science has developed which is popular these days. At every stage
computer is compulsory. The distance education is using computer for instructional
purpose as multimedia approach. The computer makes teacher learning process
effecting by involving audio and visual sense of learners.
***
1.4
Generation of computers
First
Generation
Second
Generation
Thi~ . .
GeneraUor:t
Fourth
Fifth
Generation
Generatlon
-----_)
~---~./
The first computers used vacuum tubes for circuitry and magnetic drums for
memory, and were often enormous, taking up entire rooms. They were very
expensive to operate and in addition to using a great deal of electricity, generated a
lot of heat, which was often the cause of malfunctions.
SI
Page
The development of the integrated circuit was the hallmark of the third generation of
computers. Transistors were miniaturized and placed on silicon chips, called
semiconductors, which drastically increased the speed and efficiency of computers.
Instead of punched cards and printouts, users interacted with third generation
computers through keyboards and monitors and interfaced with an operating
system, which allowed the device to run many different applications at one time with
a central program that monitored the memory. Computers for the first time became
accessible to a mass audience because they were smaller and cheaper than their
predecessors.
4.
6IPage
In 1981 IBM introduced its first computer for the home user, and in 1984 Apple
introduced the Macintosh. Microprocessors also moved out of the realm of desktop
computers and into many areas of life as more and more everyday products began to
use microprocessors.
As these small computers became more powerful, they could be linked together to
form networks, which eventually led to the development of the Internet. Fourth
generation computers also saw the development of GUis, the mouse and handheld
devices.
5.
*****
Note:
An integrated circuit (IC) is a small electronic device made out of a semiconductor
material. The.first integrated circuit was developed in the 1950s by Jack Kilby of
Texas Instruments and Robert Noyce ofFairchild Semiconductor.
71Page
'
Computer Fundamentals
2.1.
Lecture-02
Computer:
Computer is an advanced electronic device that takes raw data as input from the user
and processes these data under the control of set of instructions (called program)
and gives the result (output) in a useful format and saves output for the future use. It
can process both numerical and non-numerical (arithmetic and logical) calculations.
The basic components of a modern digital computer are: Input device, Output device,
Central Processing Unit (CPU) and Storage device. Computer cannot do anything
without a Program.
The term computer is derived from the Latin term "Computare", this means to
calculate. Computers were originally invented to do fast and accurate computations hence the name "computers."
Charles Babbage is called the Father of the computer. The first mechanical computer
designed by Charles Babbage was called Analytical Engine.
There are two distinct parts of personal computers - Hardware and Software, which
are described below.
2.2
llPage
Types of Software
There are two main types of computer software: system software and application
software.
System software and application software:
System software (Operating systems) is computer software designed to operate
and control the computer hardware and to provide a platform for running
application software.W System software can be separated into two different
categories, operating systems and utility software.
7
A user interface "allows us~rs to interact with a computer. "ill Since the
1980s the graphical user interface (GUI) has been perhaps the most
common user interface technology. The command-line interface is still
a commonly used alternative.
Utility software helps to analyze, configure, optimize and maintain the
computer, such as virus protection.W
o
In some publications, the term system software also includes software development
tools Oike a compiler, linker or debugger).141
In contrast to system software, software that allows users to do things like create text
documents, play games, listen to music, or web browsers to surf the web are called
application software.1s.1 The line where the distinction should be drawn isn't always
clear. Most operating systems bundle such software. Such software is not considered
system software when it can be uninstalled without affecting the functioning of other
software. Exceptions could be e.g. web browsers such as Internet Explorer where
Microsoft argued in court that it was system software that could not be uninstalled.
Later examples are Chrome OS and Firefox OS where the browser functions as the
only user interface and the only way to run programs (and other web browser can not
be installed in their place), then they can well be argued to be (part of) the operating
system and then system software.
2.4
There are three basic components/ elements of a digital computer which are as
follows:
1. Input device
2. Output device
Input Device:
Its job is to input the necessary data and instructions to the computer in the form
it understands. It enables the users to communicate with the computers. The
examples of common input devices are: Keyboard, Mouse, Microphone, Scanner,
Optical Character Recognition (OCR), Optical Mark Recognition (OMR), Magnetic
Ink Character Recognition (MICR), Barcode reader, CD/DVD Drive, Floppy
Drive, Monitor, etc.
2.
Output Device:
The devices like CD/DVD Drive, Floppy Drive, Monitor etc. work both as
input and output devices.
3.
The Central Processing Unit (CPU) is like the brain of the computer. It is responsible
for executing all instructions. It controls and coordinates the execution of
instructions.
The function of CPU is consisted with the following three components:
i)
ii)
iii)
Control Unit
It is also a part of the CPU and is the master deapatcher and clock of the
computer. Its. function is to take stored instructions one at a time in proper sequence,
interpret them and to make sure that these instructions are properly executed by
other units. For proper synchronisation, it uses the oscillations of a quartz crystal
oscillator.
ii) Arithmetic and Logic Unit (ALU)
It is also a part of the CPU and is the electronic calculator of the computer. As its
required during computations. Each bit of information has its own address or
location in memory and can be accessed almost instantly when required by
ALU. The examples of the common storage devices are : Hard disks, Floppy
disks, CD /DVD Rom, USB memory, Flash memory etc.
A block diagram consisting of the above mentioned components/elements of a digital
computer is shown in the Fig.I.
41Page
-----
--1
1-- ----,
CONTROL UNIT
I
I
I
I
I
I
f
I
I
I
ARITHMETIC
AND
lOGICUNIT
(ALU)
'ti/
INPUT I
I
I
I
I
'ff
MAIN MEMORY
(MAIN STORAGE)
~.
~1 OUTPUT
"
...,
AUXILIARY STORAGE
(BACKING STORAGE)
KEY:
Fig.
1:
DATAADW
- - - - - -,. COMMAND SIGNAL
Computer Operation:
Under the command of Control Unit, the data and program are transferred from
input into the main (or internal or primary) memory of the computer. During the
execution of the given task, each program instruction is retrieved in proper sequence
from the memory and interpreted by the Control Unit: The Control Unit informs
ALU about the precise operation to be performed and directs the transfer of
necessary data from Memory to ALU for the purpose of executing the operation. ALU
performs all calculations and then passsets on the results to Memory where they are
held in storage temporarily before being presented to the output devices.
***
N.B.: System Unit
The system unit, also known as a "tower" or "chassis," is the main part of a desktop
computer. It includes the Motherboard, CPU, RAM, HDD and other components.
The system unit also includes the case that houses the internal components of the
computer.
Some modern computers, such as the iMac, combine the system unit and monitor
into.a single device. In this case, the monitor is part of the system unit. While laptop
also has built-in displays, they are not called system units, since the term only
refers to desktop computers.
SI Page
Syst;erri
so&vare
Opera~g
systems
Di~~betra,g
ArEMall
Wef1BroW$er
At<:<>l.ltlt~ Meln~em~t
ij~pnkP
Applieatkns
Network
6IPage
Lecture-03
Basic Concept of Binary Number Systems and Logic Gabi
/26.2 Digital Circuit
Au electronic circuit that handles oralu a digital signal is called a digital circuit ..
The output voltage of a digital circuit is either' low or high and no other value. In oth
words, digital operation is a two-state operation. These states are expressed as (Higf;
Low) or (ON or OFF) or (1 or 0). Therefore, a digital circuit is one that expresses th
values in digits 1's or O's. Hence the name digital. The numbering concept that uses
only the two digits I and O is the hivar.v number.ing ,s_vstern. Therefore, the first stcr
would be to discuss this number system.
3.1
Number Systems
A number system is a code that uses symbols to count the number of items.
The number systems are as under:
The above number systems are discussed in details in the following sections:
Binary number system can be converted into other number systems. The conversion of bina. \
number to other system indirectly means the conversion of base or radix. The several binar
conversions are:(a) Binary to decimal conversion and decimal to binary conversion
(b) Binary to octal conversion and octal to binary conversion
(c) Binary to hexadecimal conversion and hexadecimal to binary conversion
. 01.
The most common and familiar number system is the decimal system. The decim 1 I
number system uses the symbols o, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Thus the decim i I
system uses 10 digits for counting the items. Therefore, the base of this system is 10
Place Value
642=600+40+2
I Pa
Note tltat in a multidigit decimal nqmber (i.e., 642 in the present case), ea, '1
positio:1 has a value that is 10 ttmes the value of the next position to :.
immed.ate right. In other words, every position n be expressed as:
642 = 6x10 2 +4x10 1 + 2x10
Thus, we find that values of various positions in a decimal number system a
powers of 10 i.e., equal to the number of digits used in the system. This numb
is called base or radix of the system. Thus, the decimal system has base of 111
(ten).
For th1! decimals, the digit to the extreme right is referred to as the lea ,;l
significant digit (LSD) because its positional value or weight is the lowe: t
For tht decimal number 642, 2 is the LSD.- The left-most digit in the decim.1 i
numbe~ iE the most signifi.cant digit (MSD) because its positional value 11
which 1s the highest. For the decimal number 642, 6 is the MSD with a value: 1i
600.
Decimal 1to Binary Conversion
There ,re many methods to perform this conversion. The method described he,,
is calkd double-dabble because it requires successive divisions by 2. Tb i ,.
method can be summarized as under:
Divide progressively by the decimal number by 2 and write down the remaind,
after e:ich division. Continue this process till you get a quotient of o n.11, l
remain ::ler of 1, the conversion in now complete. The remainders, taken 11
reverse order, from the binary number.
:. (37)10
= (100101)z
;I
.l
(i)
(ii)
= 32+0+0+4+0+~ = 37
Now, in binary to decimal conversion, all positions containing o can be ignored. On.'adq. the decimal values of the positions where 1 appears. Thus, in case of the abm 1
binary Humber.
Thus (1 JC>l01)2 = 1x2s+1x22+1x2
= 32+41-1 := 37
:. (100101)2 = (37)10
02.
A bina1y number system uses only two digits (o and 1) for counting the item
TherefcrE:i, the base of this system is 2.
Each binary digit ( o or 1) is referred to as a bit. A string of four bits is called as :
nibble Lnd eight bits make a byte. Thus, o or 1 is a bit, 1001 is a nibble and 100101111
is a binary byte.
In the hinary number system, only two digits (o and 1) are used. Therefore, t]11
base of this system is 2. In a binary number, each position has a value that is :.>
times 1he value of the next position to its immediate right. In other word.:,
every position can be expressed by 2 raised to some power. We know th;i r
binary number 1001 is equal to the decimal number 9. This can be readfr.
shown :1s under:
1001
==
For binary numbers, the digit at the extreme right is referred to as leas I
signifi"c,a.nt bit (LSB). In the binary number 1001, the 1 at the right is th.
LSB. The left-most digit is called the most signifi.cant bit (MSB). In t}w
binary number 100 1, the 1 at the left is the MSB with the value of 8 in decim:i I
terms.
03.
I Pa g ,.
The octal number system is frequently used in digital circuits due to t,,.
principal reasons.'Firstly, it can be easily converted to binary. Secondly, the1
are significantly fewer digits in any given octal number than in th,
corresrcnding binary number so that it is much easier to work with short,
octal nnmbers.
i I
The oc1 al number system has a base or radix of eight so that it uses eight digit:
o, 1, 2, 3, 4, 5, 6 and 7. The position weight in the system is powers of eight.
The di~i: positions of first six powers of eight are:
~
etc. gs 84 83 32 g1 go
Decimal Digits
Binary Bits
0
1
0
1
3
4
5
6
7
3
4
5
000
001
010
011
100
101
110
111
6
7
Octal-to-Binary Conversion:
The adYa ntage of octal number system is the ease with which an octal number can I,
converte,l to a binary number and vice-versa. It is because eight is the third power :
hvo, pr<>' iding a direct correlation between three-bit groups in a binary number a:i ,, l
the octc: 1 digits i.e. each three-bit group of binary bits can be represented by one oct. I
digit. Tfurefore, conversion from octal to binary is performed by converting eac:
octal digt to its 3-bit binary equivalent. The eight possible digits are converted ;1
shown jn the above table.
The corversion of octal number (472)s to binary number is done as under:
4~100
7~ 111
2~010
= (100111010)2
41
Pa g,
~_/
The corn ersion of binary number to oct~l number is simply the reverse of the abo
process. f'he bits of the binary number are grouped into groups of three bits starb I
at the J}.B. Then each group is converted to its octal equivalent. To illustrate t]11
method, consider the conversion of binary number (100111010)2 to octal numb,
The prcc '.dure is as under:
100--+ "~
111--+
010--+ :!
:. (100: 11010)2
= (472)s
Note thct there are fewer digits in the octal number than in the correspondi 11
binary number. Therefore, it is much easier ~o work with shorter ocl
numbe::-t.
Someti rr es the binary number will not have even groups of 3 bits. In that ca::,
we can add one or two o's to the left of the MSB of the binary number to fill ti
last grc l p. This point is illustrated below for the binary number 11010110
011--+3
010--+2
110--+6
:. (110 _(1110)2
= (326)s
Note tl- at a o is placed to the left of the MSB to produce even groups of 3 bits.
04.
The he:G Ldecimal system uses a base or radix of 16. Therefore, it has 16 possil !
digit symbols. The first ten digits in the hexadecimal system are represented I
the nurn Jers o through 9 (o. 1, 2, 3, 4, s, 6. 7, 8 and 9) and the letters A thou; .1
F (A, B, C, D, E and F) are used to represent the numbers 10, 11, 12, 13, 14 a1,
15 reE:i::ectively. The adjoining table shows the relationships amo11
hexadec: mal, decimal and binary. Note that each hexadecimal digit represen I
a grour, )f four binary digits.
As is tr 1e for binary and decimal numbers, each digit in the hexadecim,
system } as a positional value or weight. The positional weight distribution ol.
hex number system is given below:
s IP a g
7
/
I Hexadecimal
Decimal
Binary
0
1
2
0
1
2
3
4
3
4
0000
0001
0010
0011
0100
5
6
7
8 ..
9
5
6
7
8
9
c
D
10
11
12
13
14
15
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
F ~nu
2 ~0010
:. (9F2)1E
= (100111110010)2
The conversion from binary to hex is just the reverse of the above process. The b1n.i
number is grouped into groups of four bits and each group is converted to
equivalei tt hex digit. The following example illustrates this point. Here, we sh
convert l inary number (1110100110)2 to its equivalent hex number.
0011
~3
1010
~A
0110
~6
**
-------,
I
A digital circuit with one or more input signals but only one output signal is call
logic gatt . A logic gate is an elementary building block of a digital circuit.
ComputErs and digital component use binary o and 1, where o is low voltage (o vol
and 1 is high voltage (-1-5 volts). Binary information is carried by signals a
manipul. tion of binary information is done by logic circuits called as gates.
Since logic gate is a switching circuit (i.e., a digital circuit), its output can have 01
one of th~ two possible states viz., either a high voltage (1) or a low voltage (o) - i~
either OJ~ or OFF. Whether the output voltage of a logic gate is high (1) or low (
will depend upon the conditions at its input.
The tern "logic" is usually used to refer to a decision making process. A logic g;
makes logical decisions regarding the existing of output depending upon the nat1
of the inJ 1ut. H.ence, such circuits are called logic circuits.
Example; of the logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.
There an: two types of logic gates i.e., Basic or Primary logic gate and Secondary 101
gate
3.2.1 B; tsic or Primary logic gate:
The logic gates that make up all digital circuits are called basic or primary logic gat1
There an! three basic or primary logic gates. They are (i) OR gate, (ii) AND gate a I
(iii) NOT gate
i)
(IRgate:
An OR ~ate is a logic gate that has two or more inputs but only one outp1
However, the output Y of an OR gate is LOW when all inputs are LOW. T
output Y of an OR gate is HIGH if any or all input are HIGH.
It is call ~d OR gate because the output is high if any or all the inputs are hifi
For this reason, sometimes called "any or all gate". For example, consider a
input OI. gate. The output will be high if either or both inputs are high.
q1ul.i~
-- Y Output
OR gate
I Par:
/"
Truth Table
ABY
0 0 0
0
1 1
1 0
A+B=Yhere + OR symbol
A+B = y
o+o = 0
O+l = 1
. l+O = 1
1+1 = 1
The adj, lining table shows possibilities for inputs. According to this table, when u
ORecl Nith o, the result equals o. Also, any variable ORed with 1 equal 1. The OR
function can be summed up as under:
o ORed with o equals o
o ORed with 1 equals 1
1
ii)
A ND gate:
The ANI I gate is a logic gate that has two or more inputs but only one output T
output Y of AND gate is HIGH when all inputs are HIGH. However, the output Y
AND gat, ~ is LOW if any or all inputs are LOW.
It is called. AND gate because output is HIGH only when-all the inputs are HIGH. I
this reas m, the AND gate is sometimes called "all or nothing gate". For exam 1:
consider a 2inputAND gate. The output will be HIGH when both the inputs
HIGH.
IP
1 !
-----,
.
..,.
AND gate
Truth Table
Input 1 Input 2 . Output .
0
0.
Boole an expression: The"." sign in Boo]ean algebra refers to the logical Al'.,
function. The Boolean expression for AND function is
= .1
Whn ! multiplication "." dot stands for the AND operation. The adjoining tal
shows p1 >ssibilities for the inputs. According to this table, when o is ANDed witl;
variablf, the result equals o. Also, 1 ANDED with 1 equals 1. The AND function
be summed up as under:
o ANDed with o equals o
o ANDed with 1 equals o
1 ANDed
i)
with o equals o
:s OT gate:
The N01 gate or invcrlcr is the simplest of all logic gates. It has one input an
output, where the output is opposite of the input. The NOT gate is often ,
inverter l>ecause it inn~rts the input.
Y=A
If A=o, then Y = 0 or Y=l
If A=l, then Y
= 1 or Y=o
3.2.2
The OR, AND and NOT gates are the three basic circuits that make up all digi 1
circuits.
There are four secondary logic gates: XOR, NAND, NOR, and XNOR.
i)
The XOR (exclusive-OR) gate acts in the same way as the logical "either/or." Tl i
output is "true" if either, but not both, of the inputs are "true." The output is "false i'
both inputs are "false" or if both inputs are "true." Another way of looking at t I I
circuit is to observe that the output is 1 if the inputs are different, but o if the in p , :
are the same.
XOR gate
Truth Table
0
1
10 IP a I'
.l
ii)
It is a combination of AND gate and NOT gate. In other words, output of AND gat( is
connected to the input of a NOT gate.as soor.w:t in..~. Clearly, the output ol a
NAND gate is opposite to the AN~ gate. Ths is illustrated in the truth table for the
NAND gate. Note that the truth table for NAND gate is developed by invertilring the
outputs of the ~ND gate.
The Boolean expression for NAND function is
Y =A.B
This Boolean expression can be read as Y=not A.B. To perform the Boolean algel:, .
operation, first the inputs must be ANDed and then the inversion is performed
Note that output from a NAND gate is always 1 except when all of the inputs ;1 <
1. Fig. 26.11 (iii) shows the logic symbols for a NAND gate. The little bubh (
(small circle) on the right end of the symbol means to invert the AND.
Inputs
A ~ - - Y'=A.B
..~~Output"-.
y,,,,,A.B
B-- ...
Inputs
A
B
0
I
0
l
0
0
1
1
Outp11t
AND (Y') NAND(Y)
- --
0
0
0
1
l
l
0
ll!Pag
_/ '
Truth Table
f -
'."
;---
iii)
The NOR gate is a combination OR gate followed by an inverter. Its output is "true'
both inputs are "false." Othenvise, the output is "false."
NOR gate
Truth Table
iv)
XNORgate
Truth Table
12
I Pai:
}'
***
a
b
a
~XOR
13
i .