Fundamental Computer

Published on March 2017 | Categories: Documents | Downloads: 42 | Comments: 0 | Views: 277
of 26
Download PDF   Embed   Report

Comments

Content

Lecture-01 ·
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

Fig.1: Classification of computers
llPage

1.2.1 According to technology /functionality:
According to functionality, computers are classified as:

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

Here is a brief breakdown of each:
(1) Micro computers: These computers use a microprocessor chip and this chip is
used instead of CPU means that this microprocessor chip works as a CPU. Only one
user uses these computers at time that's why they are also known as personal
computers. Two major types of these computers are Laptop or Desktop computers.

2jPage

The Micro computers are also further classified as under:
• Desktop Computer: a personal or micro-mini computer sufficient to fit on a
desk.
• Laptop Computer: a portable computer complete with an integrated screen
and keyboard. It is generally smaller in size than a desktop computer and larger
than a notebook computer.
• Palmtop Computer/Digital Diary /Notebook / Personal Digital
Assistants (PDAs): a hand-sized computer. Palmtops have no keyboard but
the screen serves both as an input and output device.
(2) Mini Computers: These computers fall in the gap between micro computers
and mainframe computers. They possess much ·more power than a micro-computer,
but not enough to perform the tasks of a mainframe computer. These computers
were developed in 1960s at that time mainframe computer was very costly. Mini
computers were available in cheap prices, so users start using it and gradually
became less expensive as time moved on and technology became more widely
available.
(3) Mainframe Computer: Mainframe computers are extremely powerful and

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.

N.B.: Terminal is a device which has keyboard and a screen.
(4) Super Computers: Super computers are the most powerful computers. It can
perform billions of instructions per second and may have ability of 40000
microcomputers. It calculated the value of Pi to 16 million decimal places. Its cost is
15-20 million dollars. Used for weather forecasting, nuclear science research,
aerodynamic modeling, metrology, seismology etc. Examples are: CRAY X-MP-14,
PARAM, PACE etc. Size, speed and cost of the super computers are greater than the
micro, mini and main frame computers.

* Embedded Computer: The smallest computer (A special-purpose computer
system) embedded within the appliance. Like Televisions, Digital Video Recorder,
Digital camera, Washing machines, Watches, etc.
***

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
·
withdraw money with the ATM.
4) Electronic office:
All type information are stored, manipulated and utilized in the electronic form. A
document is sent to different place with FAX, internet and e-mail.
5) Industrial Application:
It plays an important role in production control. It is bringing efficiency it trade and
industry.
6) Telephones:
With help computerized telephone through satellites STD and IST services have been
introduced. It maintains the record of calls and does the billing for you.
7) Trade:
Every type of trade computer is used successfully. It 1s used m Banks, stock
exchanges to control stocks and accounts.
8) Scientific research:
In every science, the research work becomes economical from time, energy, money
point of new. A large data is analyzed very quickly.
9) Medicine:
There is wide use in medical science e. g. ECG, CAT scan, Ultra sound. The proper
and accounts diagnosis is done with the help of computer. The medical apparatus are
controlling computerized.
Space Science:
The satellite controlling I the space with the help of computer. The information's are
collected by using the computer from the space satellite.
10)

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.

13) Film industry:
It had influenced film industry such as animation; titeling etc.The multimedia

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

The history of computer development is often referred to in reference to the different
generations of computing devices. Each of the five generations of computers is
characterized by a major technological development that fundamentally changed the
way computers operate, resulting in increasingly smaller, cheaper, more powerful
and more efficient and reliable computing devices.
Based on the characteristics of various computers developed from time to time, they
are categorized as the following five generation of computers.

First
Generation

Second

Generation

Thi~· . ·.

·GeneraUor:t

Fourth

Fifth

Generation

Generatlon

-----_)

~---~./

Each of the five generations of computers is characterized by a major technological
development that fundamentally changed the way computers operate.
1.

First Generation (1940-1956) Vacuum Tubes

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

First generation computers relied. ,on machine language, the lowest-level
programming language understood by computers, to perform operations, and they
could only solve one problem at a time. Input was based on punched cards and paper
tape, and output was displayed on printouts.
The UNIVAC and ENIAC computers are examples of first-generation computing
devices. The UNIVAC was the first commercial computer delivered to a business
client, the U.S. Census Bureau in 1951.
2.

Second Generation (1956-1963) Transistors

Transistors replaced vacuum tubes and ushered in the second generation of
computers. The transistor was invented in 1947 but did not see widespread use in
computers until the late 1950s. The transistor was far superior to the vacuum tube,
allowing computers to become smaller, faster, cheaper, more energy-efficient and
more reliable than their first-generation predecess9rs. Though the transistor still
generated a great deal of heat that subjected the computer to damage, it was a vast
improvement over the vacuum tube. Second-generation computers still relied on
punched cards for input and printouts for output.
Second-generation computers moved from cryptic binary machine language to
symbolic, or assembly, languages, which allowed programmers to specify
instructions in words. High level programming languages were also being developed
at this time, such as early versions of COBOL and Fortran. These were also the first
computers that stored their instructions in their memory, which moved from a
magnetic drum to magnetic core technology.
The first computers of this generation were developed for the atomic energy industry.
3.

Third Generation (1964-1971) Integrated Circuits

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.

Fourth Generation (1971-Present) Microprocessors

The microprocessor brought the fourth generation of computers, as thousands of
integrated circuits were built onto a single silicon chip. What in the first generation
filled an entire room could now fit in the palm of the hand. The Intel 4004 chip,
developed in 1971, located all the components of the computer-from the central
processing unit and memory to input/ output controls-on a single chip.

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.

Fifth Generation (Present and Beyond) Artificial Intelligence

Fifth generation computing devices, based on artificial intelligence, are still in
development, though there are some applicatio·ns, such as voice recognition, that are
being used today. The use of parallel processing and superconductors is helping to
make artificial intelligence a reality. Quantum computation and molecular and
nanotechnology will radically change the face of computers in years to come. The
goal of fifth-generation computing is to develop devices that respond to natural
language input and are capable oflearning and self-organization.

*****
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

Hardware and Software:

Computer hardware is the collection of physical elements that constitutes a corp.puter
system. Computer hardware refers to the physical parts or components of a computer
such as the Monitor, CPU, Mouse, Keyboard, Hard Disk Drive etc. all of which are
physical objects that can be touched.
On the other hand, Computer software or simply software is any set of machine­
readable instructions and code installed into the computer that directs a computer's
processor to perform specific operations. Computer software includes computer
programs, libraries and their associated documentation. Software cannot be touched
i.e. it is intangible.
Hardware and software work together in digital devices and systems to provide
computerized functionality. Software uses hardware to operate properly. A video
game, which is software, uses the computer processor (CPU), memory (RAM), video
card etc. which is all hardware, to run. Word processing software uses the computer
processor, memory, and hard drive to create documents and save them.

llPage

f

/

7

Hardware vs. Software
The fundamental difference between hardware and software is that the first is
tangible while the second is not. Hardware is the machine itself and does all of the
physical work, while software tells the various hardware components what to do and
how to interact with .each other. This makes it possible for computers to adapt to new
tasks or to install new hardware. While hardware includes things like monitors,
Central Processing Units (CPUs), keyboards, and muse; software includes things like
word processing programs, operating systems, and games.
2.3

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.



The operating system (prominent examples being z/OS, Microsoft Windows,
Mac OS X and Linux), allows the parts of a computer to work together by
performing tasks like transferring data between memozy and disks or
rendering output onto a display device. It also provides a platform to run
high-level system software and application software.
o A kernel is the core part of the operating system that defines an API for
applications programs (including some system software) and an
interface to device drivers.
• Device drivers such as computer BIOS and device firmware provide
basic functionality to operate and control the hardware connected to or
built into the computer.
21Page

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

Basic components of a digital computer:

There are three basic components/ elements of a digital computer which are as
follows:
1. Input device
2. Output device

3. Central Processing Unit (CPU)

The functions of these basic components / elements are as under:
1.

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:

It translates the computer's output into a form understandable by human
beings.These devices are similar in operation to input devices but perform
opposite function. The examples of common output devices are: Printer,
Speaker, CD/DVD Drive, Floppy Drive, Monitor, etc.
3IPage

The devices like CD/DVD Drive, Floppy Drive, Monitor etc. work both as
input and output devices.
·•
Central Processing Unit (CPU):

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 (CU)
Arithmetic and Logic Unit (ALU)
Storage or Memory

The above three components of the CPU are describe below:
i)

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

name indicates, it performs all arithmetical operations (i.e. addition,
subtraction, multiplication, division and some logical operations).
It works under the command of Control Unit which supplies the numbers

needed by it from computer memory (or storage).
iii) Storage Or Memory
It is also a part of the CPU. It stores the data and instructions which are

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

,CENTRAL PROCESSING UNIT .(CPU)

-----

--1

1--· ----,

CONTROL UNIT

I
I
I
I
I
I
f
I
I
I

ARITHMETIC

AND
lOGICUNIT
(ALU)

·~

'ti/

I

.

I

·-

INPUT I

I
I
I

••

I
'ff

MAIN MEMORY
(MAIN STORAGE)

~.

I

~

~1 OUTPUT

I

"

...,
AUXILIARY STORAGE
(BACKING STORAGE)
KEY:

Fig.

1:

DATAADW
- - - - - -,. COMMAND SIGNAL

Basic components of a digital co~puter

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

1

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

1

Number Systems

A number system is a code that uses symbols to count the number of items.
The number systems are as under:

Decimal number system
Binary number system
3. Octal number system
4. Hexadecimal number system
1.
2.

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.

Decimal number system

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

Consider the decimal number 642. This can be expressed as:

642=600+40+2

1

I Pa

g ··

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.

xx To illustrate this method, consider the conversion of binary number (10011101c,)
to octal number. xxxxxxx

:. (37)10

= (100101)z

Note th1t the binary number 100101 has six bits.
21Page

/

;I

Bina!")· to Decimal conversion:

!

.l



Binary numbers can be converted to equivalent decimal numbers quite easi!,.
Suppos,3 you are given the binary number 100101. Its conversion to equivale 1t
decimal number involves the following two steps:
Place the decimal value of each position to get the decimal number.
Add all the decimal values to get the decimal number.

(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.

Hinary number system

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.

1

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

==

1x23+ox2 2+ox2 1 +1x2° = 9

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.

Octal number system
3

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

Table: Octal and Binary equivalents
Octal Digits

Decimal Digits·

Binary Bits

0
1

0
1

2

2

3
4
5
6
7

3
4
5

000
001
010
011
100
101
110
111

I

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

Therefor!, octal 472 is equivalent to binary 100111010 i.e.,
:. (472).i

= (100111010)2

Binary - :o-Octal Conversion:

41

Pa g,

I

I

l

~_/

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--+

7

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.

JI exadecimal number system

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:

+-- etc. 16s 164 163 162 161 16°

Table: Hexadecimal, Decimal and Binary equivalents

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

A

B

c
D

E

F

10
11
12

!

13
14
15

0101
0110
0111
1000
1001
1010
1011
1100

I

l

1101
1110
1111

Hex-to,- Binary Conversion: The conversion from hex to binary is performed •
convertir g each hex digit to its 4-bit binary equivalent (see above table). T
followin~ example illustrates this point. Here, we shall convert hex number (9F2)16 ·
its binal') equivalent.
9-HOOl

F ~nu
2 ~0010

:. (9F2)1E

= (100111110010)2

Binary- co-Hex Conversion:

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

N.B.: Zeros are added, as needed, to complete 4-bit group.

**

-------,
I

3.2 Logjc Gates

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

b

OR gate

7

I Par:

7

,

/"

.

Truth Table

ABY
0 0 0
0

1 1

1 0

1

1

1

1

Boolean expression: The elgebra used to symbolically describe logic functions i
called Boolean algebra. The"+" sign in Bolea!} algebra refers to the logical OR
function. The Boolean expression for OR function is

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

0 Red with o equals 1
1

ii)

0 Red with 1 equals 1

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.

8

IP

1 !

-----,
.

.

·¥
..,.

/

AND gate
Truth Table
Input 1 Input 2 . Output .·
0

0

0

0.

1

0

1

0

0

1

1

1

Boole an expression: The"." sign in Boo]ean algebra refers to the logical Al'.,
function. The Boolean expression for AND function is

A.B=Y, Here. AND symbol
A.B -- y
0.0 = 0
0.1 = 0
1.0 = 0
1.1

= .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

1

i)

with o equals o

ANDed with l equals 1

: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.

The Boolean expression for NOT function is

Y=A
If A=o, then Y = 0 or Y=l
If A=l, then Y

= 1 or Y=o

Inverter or NOT gate
Truth Table

3.2.2

1

0

0

1

Secondary Logic Gate:

The OR, AND and NOT gates are the three basic circuits that make up all digi 1
circuits.

1

There are four secondary logic gates: XOR, NAND, NOR, and XNOR.
i)

XOR (exclusive-OR) Gate:

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

0

1

10 IP a I'

/

l

.l

1

ii)

1

0

NAND (NOT+AND) gate:

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

J

1
l
l
0

ll!Pag •·

7

_/ '

Truth Table
f -·

···-

'."

···;-··--

iInput 1 !Input 2 i Output
.o
0

iii)

NOR (NOT +OR) gate:

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)

XNOR (exclusive-NOR) gate:

The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an inverti.
Its output is "true" if the inputs are the same, and"false" if the inputs are different.

XNORgate
Truth Table

12

I Pai:

i

7

}'

f

Using combinations oflogic gates, complex operations can be performed. In the< ,1
there is no limit to the number of gates that can be arrayed together in a si 11,
device. But in practice, there is a limit to the number of gates that can be packed i 11
a given physical space. Arrays of logic gates are found in digital integrated circt,
(ICs). As IC technology advances, the required physical volume for each indi\·id
logic gate decreases and digital devices of the same or smaller size become capablt
performing ever-more-complicated operations at ever-increasing speeds.

***

a
b

a

a

b

b

a

a
~·XOR

c

c

13

j

i .

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close