Вы находитесь на странице: 1из 143

INTRODUCTION TO

COMPUTERS
What is a computer ?
A computer is an electronic
device capable of performing
arithmetic and logical
operations. It can also store a
large volume of information.

Sri Vinayaka Computer Education, Doddaballapur


Arithmetic operations involve the
general mathematical
calculations like addition,
subtraction, multiplication and
division.
Logical operations involve
comparisons like > < = etc.
Sri Vinayaka Computer Education, Doddaballapur
How does a computer work?
INPUT  PROCESS  OUTPUT
INPUT consists of DATA & INSTRUCTION.

PROCESS is a set of instructions stored in the


computer to carry out the instructions given by
the user. The process is also called a
PROGRAM.

OUTPUT is the set of results generated after


processing the Input.
Sri Vinayaka Computer Education, Doddaballapur
DATA & INFORMATION
DATA is described as some FACTS, FIGURES
and STATISTICS about a particular instance.

For example : MARKS in individual subjects.

INFORMATION is some FACTS, FIGURES


and STATISTICS which help us in decision
making. Generally information is the result of
data processing.

For example : PERCENTAGE & GRADE.


Sri Vinayaka Computer Education, Doddaballapur
HARDWARE
Hardware are the PHYSICAL COMPONENTS
of the Computer System.

Examples :
All the electronic parts.
All cables.
All accessories.

Sri Vinayaka Computer Education, Doddaballapur


SOFTWARE

SOFTWARE are the logical components of the


computer system. These are basically the
programs and information stored in the
computer.

Sri Vinayaka Computer Education, Doddaballapur


The hardware and software can be better
explained with the help of a music system.

Hardware :
The device, cassette, tape, wires etc.

Software :
The music stored in the tapes.

Sri Vinayaka Computer Education, Doddaballapur


Characteristics of Computer
SPEED
STORAGE
ACCURACY
VERSATILITY
AUTOMATION
DILIGENCE

Sri Vinayaka Computer Education, Doddaballapur


SPEED
The speed with which the computer works can
be understood by the units of measurement of
time within a computer. They are :

MILLI SECOND – 1/1000TH OF A SECOND


MICRO SECOND – 1/1000TH OF A MILLI SECOND
NANO SECOND – 1/1000TH OF A MICRO SECOND
PICO SECOND – 1/1000TH OF A NANO SECOND

Sri Vinayaka Computer Education, Doddaballapur


STORAGE
As already discussed a computer can store a
large volume of information.
The factors to be considered for storage are :
• RETREIVAL – IMMEDIATE
• SPACE – VERY LITTLE
• MEDIA – MAGNETIC MEDIA
• LONGIVITY – FOR EVER

Sri Vinayaka Computer Education, Doddaballapur


ACCURACY
The accuracy of the computers is consistently
high. Errors in the machinery may occur, but due
to efficient error-detecting techniques, these very
seldom lead to wrong results. Errors in
computing are due to human rather than
technological weaknesses.

So, we can say that


A COMPUTER NEVER MAKES
ANY MISTAKE
Sri Vinayaka Computer Education, Doddaballapur
VERSATILITY
Computers seem capable of performing any task, provided
the task can be broken to a series of logical steps.

The computer actually performs only four basic operations :


• Exchanges information with the outside world via INPUT /
OUTPUT devices
• Transfers data within the computer to the different units
• Performs basic arithmetical operations
• Performs operations of comparison

We can reduce the daily activities into steps of the above


operations with the help of Programming.

Sri Vinayaka Computer Education, Doddaballapur


AUTOMATION
Once a program to perform a particular
task is stored in the computer, the
individual instructions in the program
are carried out one after the other
automatically to complete the task.

Hence the user requires to just press


certain keys and give the data input. The
data is automatically processed to
produce the output.
Sri Vinayaka Computer Education, Doddaballapur
DILIGENCE
Being a machine, a computer does not suffer
from the human traits of tiredness and lack of
concentration. If 5 million calculations are to be
performed, it will perform all of them, even the
last one with exactly the same accuracy and
speed.

In fact, there are some computers which are


constantly on for hours, days, months and years
are never switched off.

Sri Vinayaka Computer Education, Doddaballapur


BASIC STRUCTURE
The computer receives input, processes it and
delivers output.
To perform these tasks it has different units and
each unit is responsible for a specific task.
The units are INPUT, MEMORY, CONTROL UNIT
(CU), ARITHMETIC & LOGIC UNIT (ALU) AND
OUTPUT.
The CU and ALU together are called CENTRAL
PROCESSING UNIT (CPU).

Sri Vinayaka Computer Education, Doddaballapur


INPUT DEVICE
It is used for transferring data from
the users’ end to the computer.
OUTPUT DEVICE
It is used to transfer processed
information from the computer to
the user in a way required by the
user.
Sri Vinayaka Computer Education, Doddaballapur
MEMORY UNIT
It stores instruction and data and provides
them to the various other units as and when
required. It is basically the working memory
of the computer system. This memory unit is
volatile, i.e. it is temporary memory and
nothing can be stored here permanently. The
information is stored in the main memory as
long the computer is switched on or as long
as it is required by the computer.

Sri Vinayaka Computer Education, Doddaballapur


CONTROL UNIT
Controls the various operations
within a computer. It basically
manages all the other units and
devices of the computer system. It
does so by transmitting timing and
control signals to the various devices
and units.

Sri Vinayaka Computer Education, Doddaballapur


ARITHMETIC & LOGIC UNIT
It performs the various arithmetic
and logical operations on the data
stored in memory, as dictated by the
instruction.
There are various basic circuits to
perform these operations.

Sri Vinayaka Computer Education, Doddaballapur


SECONDARY STORAGE
It stores the various data, information
and programs permanently for future
retrieval. The information is
organised in such a way to retrieve it
in minimum time whenever required.
The stored information remains as
long the user wants it.

Sri Vinayaka Computer Education, Doddaballapur


BUS
These are a set of connecting wires
used for setting interconnection
between the various devices in the
system. Each set of bus has a specific
function to perform like carrying
data, carrying control signals and
addresses.

Sri Vinayaka Computer Education, Doddaballapur


BLOCK DIAGRAM
DATA FLOW CONTROL FLOW

SECONDARY
STORAGE

INPUT MEMORY OUTPUT


DEVICE UNIT DEVICE

CONTROL
UNIT

ARITHMETIC
& LOGIC UNIT CPU
Sri Vinayaka Computer Education, Doddaballapur
DATA REPRESENTATION WITHIN A COMPUTER

CHARACTER :

A character is the smallest amount of


information that can be communicated to
the computer. All data, information and
instruction are represented by a
combination of these characters.

All alphabets, digits and symbols are


characters. Even a blank space is a
character.
Sri Vinayaka Computer Education, Doddaballapur
How does the computer
understand a character?
Computer being an electronic device,
can represent only two states –
VOLTAGE and NO VOLTAGE.

Voltage is represented as 1
No voltage is represented as 0

Sri Vinayaka Computer Education, Doddaballapur


A series of such 0s and 1s form a pattern.

1 0 1 1 1 0 0 1
Such a pattern represents a
CHARACTER.

For each character a separate pattern is


there within the computer.

Sri Vinayaka Computer Education, Doddaballapur


There are eight such positions to represent
0 or 1 and each such position is called a
BIT. Hence the pattern generated to
represent a character is a BIT PATTERN.
BIT
1 0 1 1 1 0 0 1

Two digits, 0 and 1 can generate 256


unique combinations if represented in
eight places. Hence we can represent 256
different characters in any computer.

Sri Vinayaka Computer Education, Doddaballapur


ASCII
American Standard Code for
Information Interchange.
It is difficult for us to remember all the 256 bit
patterns and their corresponding characters.
Hence we can convert the bit pattern to a decimal
number. This way each bit pattern will have a
different number and this number, fixed for a
character is called the ASCII code of the
character. All computers follow the same ASCII
code and bit pattern to represent characters.
Sri Vinayaka Computer Education, Doddaballapur
BINARY
The number system involving two
digits, 0 & 1 is called BINARY.

By using this system a bit pattern


(treated as a binary number) can
be converted to the decimal
number system.

Sri Vinayaka Computer Education, Doddaballapur


0 0 1 1 1 0 0 1
27 26 25 24 23 22 21 20
32 16 8 1

= 57

 Starting from right to left, raise 2 to


the power of 0 to 7.
 Add the values corresponding to the
BIT positions having the value 1.

Sri Vinayaka Computer Education, Doddaballapur


1 0 1 1 1 0 0 1 0 0 1 0 1 0 0 1
27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20
128 32 16 8 1 32 8 1

= 185 = 41

1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
27 26 25 24 23 22 21 20 27 26 25 24 23 22 21 20
128 64 32 16 8 4 2 1

= 255 =0
Sri Vinayaka Computer Education, Doddaballapur
BIT ASCII CODE CHARACTER
PATTERN
01000001 65 A
01100001 97 a
00110001 49 1
00101011 43 +
00100000 32
00101101 45 -
00011100 28 (
00101100 44 ,
Sri Vinayaka Computer Education, Doddaballapur
Sri Vinayaka Computer Education, Doddaballapur
UNIT FOR MEASUREMENT OF
INFORMATION

8 BIT = 1 CHARACTER = 1 BYTE

1024 BYTES = 1 KILO BYTE (KB)

1024 KB = 1 MEGA BYTE (MB)

1024 MB = 1 GIGA BYTE (GB)

1024 GB = 1 TERA BYTE (TB)

Sri Vinayaka Computer Education, Doddaballapur


HARDWARE

Input devices :

KEYBOARD : It is an input device to


give character based inputs to the
computer. All types of data,
instruction and information can be
given through the keyboard.

Sri Vinayaka Computer Education, Doddaballapur


Although the typing portion of the
computer keyboard is identical to a
standard typewriter, computers have
several additional keys that perform
different functions.

Sri Vinayaka Computer Education, Doddaballapur


MOUSE : It is used for graphics
based inputs. It can mainly select
some graphical icons and select
some options from a menu. It can
not be used for giving data to the
computer.

Sri Vinayaka Computer Education, Doddaballapur


Sri Vinayaka Computer Education, Doddaballapur
SCANNER : It is
used for graphical
inputs.

 
Pictures, images,
drawings etc. can
be scanned and                             

stored in the
                        

computer.

Sri Vinayaka Computer Education, Doddaballapur


Operation of the SCANNER :
On the simplest level, a scanner is a device which converts
light (which we see when we look at something) into 0s and
1s (a computer-readable format). In other word, scanners
convert analogue data into digital data.

Sri Vinayaka Computer Education, Doddaballapur


DIFFERENT INPUT TYPES
MICR : Magnetic Ink Character
Recognition.
This system uses highly stylized
character shapes printed in an ink
containing magnetic particles.
These characters pre-printed in
magnetic ink are recognised by a
device called MICR reader.
Mainly used in Bank Cheques.
Sri Vinayaka Computer Education, Doddaballapur
MICR CHEQUE NUMBER

Sri Vinayaka Computer Education, Doddaballapur


OMR : Optical Mark Reading
Forms and cards are pre-printed for
special purposes so that a mark can be
made in a specified position. Each
mark at a position has a specific
meaning and after scanning, the data
gets transferred to computer.
Mainly used in correcting answers to
Multiple Choice Question Papers.

Sri Vinayaka Computer Education, Doddaballapur


Sri Vinayaka Computer Education, Doddaballapur
Sri Vinayaka Computer Education, Doddaballapur
BAR-CODE RECOGNITION : Lines or
bars can be arranged in a code and
are used particularly for labelling
goods etc. Bar-code reading is
performed by a scanner. A sequence
of bits is generated and the
information is recorded.

Sri Vinayaka Computer Education, Doddaballapur


BAR CODE FOR PRODUCT CODE

Sri Vinayaka Computer Education, Doddaballapur


VOICE INPUT : This system accepts
spoken input. The waveform
created by the input is analysed,
patterns are extracted and matched
against pre-stored patterns to
identify the input. The words and
phrases the system is to recognise,
are spoken with the system and the
patterns are created for future
matching. For the voice of more
than one person, training with the
system must be done separately.
Sri Vinayaka Computer Education, Doddaballapur
OUTPUT DEVICES

VDU : Visual Display Unit. Also


called a monitor or a screen. It a
device similar to a TV screen. The
output on a VDU is temporary.

Sri Vinayaka Computer Education, Doddaballapur


The technology behind monitors and televisions is
The cathode-ray tube, or CRT, A CRT is an sealed
glass bottle with no air inside. It begins with a slim
neck and tapers outward until it forms a large base.
The base is the monitor’s ‘screen’ and is coated on
the inside with a matrix of thousands of tiny
phosphor dots. Phosphors are chemicals which emit
light when excited by a stream of electrons: different
phosphors emit different coloured light.

Each dot consists of three


blobs of coloured phosphor:
one red, one green, one blue.
These groups of three
phosphors make up what is
known as a single pixel.
Sri Vinayaka Computer Education, Doddaballapur
PRINTER : A printer produces
output on paper which can be
permanently kept.

TYPES OF PRINTERS :
• DOT MATRIX
• INK JET PRINTER
• LASER PRINTER
Sri Vinayaka Computer Education, Doddaballapur
Operation of Ink Jet Printer :

Inkjet printing, like laser printing, is a non-impact


method. Ink is emitted from nozzles as they pass
over a variety of possible media, and the operation
of an inkjet printer is easy to visualise: liquid ink in
various colours being squirted at the paper to build
up an image. A print head scans the page in
horizontal strips, using a motor assembly to move it
from left to right and back, as another motor
assembly rolls the paper in vertical steps. A strip of
the image is printed, then the paper moves on, ready
for the next strip. To speed things up, the print head
doesn’t print just a single row of pixels in each pass,
but a vertical row of pixels at a time.
Sri Vinayaka Computer Education, Doddaballapur
 Most inkjets use thermal technology, whereby heat
is used to fire ink onto the paper. There are three
main stages with this method. The squirt is initiated
by heating the ink to create a bubble until the
pressure forces it to burst and hit the paper. The
bubble then collapses as the element cools, and the
resulting vacuum draws ink from the reservoir to
replace the ink that was ejected.

Sri Vinayaka Computer Education, Doddaballapur


Operation of a LASER printer :
Where the image to be printed is communicated to it via a
page description language, the printer’s first job is to convert
the instructions into a bitmap. This is done by the printer’s
internal processor, and the result is an image (in memory) of
which every dot will be placed on the paper.

At the heart of the laser printer is a small rotating drum - the


organic photo-conducting cartridge (OPC) - with a coating
that allows it to hold an electrostatic charge. A laser beam
scans across the surface of the drum, selectively imparting
points of positive charge onto the drum's surface that will
ultimately represent the output image. The area of the drum
is the same as that of the paper onto which the image will
eventually appear, every point on the drum corresponding to
a point on the sheet of paper. In the meantime, the paper is
passed through an electrically charged wire which deposits a
negative charge onto it.
Sri Vinayaka Computer Education, Doddaballapur
Sri Vinayaka Computer Education, Doddaballapur
DOT MATRIX INK-JET
                         
                    
                  

LASER
Sri Vinayaka Computer Education, Doddaballapur
DOT INK LASER
MATRIX JET

CHARACTER YES YES YES


BASED
OUTPUT
GRAPHICS NO GOOD EXCELLENT
BASED
OUTPUT
OUTPUT OK GOOD EXCELLENT
QUALITY

COST LOW HIGH VERY HIGH


EFFECTIVE RECURRIN RECURRING RECURRING
G COST COST COST
COLOR NO OK EXCELLENT

Sri Vinayaka Computer Education, Doddaballapur


PLOTTER : It is a special kind of
printer for printing drawings on
large sheets of paper.

Sri Vinayaka Computer Education, Doddaballapur


STORAGE DEVICES

HARD DISK : It a device fixed to a


computer and can store large
volumes of information. It uses
magnetic media and electro
magnetic theory to read and store
information.
The standard capacity : 10 – 20 GB

Sri Vinayaka Computer Education, Doddaballapur


FLOPPY DISK : It is a cassette like
device to store information. It is
external to a computer and can be put
into a floppy disk drive (FDD) attached
to a computer for reading and writing
information. It also uses electro
magnetic theory.
Since it is not fixed to a computer,
information can be copied from the hard
disk of a computer to a floppy and can
be used in another computer.
Standard capacity : 1.44 MB
Sri Vinayaka Computer Education, Doddaballapur
CD : It stands for COMPACT DISK. It is
the same as any other music or video
CD. It is also external to a computer and
can be put into a CD drive attached to a
computer for reading information. It
uses OPTICAL technology to read
information.
Information once written into a CD can
not be erased or changed. Hence it is
called a ROM (Read Only Memory).
Standard capacity : 650 MB

Sri Vinayaka Computer Education, Doddaballapur


FLOPPY DISK HARD DISK

CD ROM
Sri Vinayaka Computer Education, Doddaballapur
Hard drives are magnetic storage devices that
contain several discs inside called "Platters" that
are attached to a spindle motor. The number of
platters varies depending on the capacity of the
drive. Platters are coated with a film of
magnetically sensitive substance that is primarily

 
made of iron oxide. Another important ingredient is
a thin layer of cobalt alloy.

The read/write heads are


responsible for reading and
                                                       

writing to the platters and


are attached to the head
actuator which is in charge
of moving the heads around
the platters.

Sri Vinayaka Computer Education, Doddaballapur


There’s a read/write head for each
side of each platter, mounted on
arms which can move them
towards the central spindle or
towards the edge. The arms are
moved by the head actuator, which
contains a voice-coil - an
electromagnetic coil that can move
a magnet very rapidly. Loudspeaker
cones are vibrated using a similar
mechanism.
The heads are designed to touch the platters when the
disk stops spinning - that is, when the drive is powered off.
During the spin-down period, the airflow diminishes until it
stops completely, when the head lands gently on the
platter surface - to a dedicated spot called the landing
zone (LZ). The LZ is dedicated to providing a parking spot
for the read/writeSriheads, andEducation,
Vinayaka Computer never contains data.
Doddaballapur
When a disk undergoes a low-level format, it is divided it into
tracks and sectors. The tracks are concentric circles around
the central spindle on either side of each platter. Tracks
physically above each other on the platters are grouped
together into cylinders which are then further subdivided into
sectors of 512 bytes apiece. The sector is a disk's smallest
accessible unit. To improve performance, data sectors are
allocated in groups called clusters.
Sri Vinayaka Computer Education, Doddaballapur
Floppy drives are the slots on the front
of your computer that you insert disks
into, copy files to, and install programs
from. These drives accept 3½" disks.
These diskettes come in different
densities. The standard disks of today
are called high-density. They usually
hold 1.44 MB of data. The newest disks
are called extended-capacity and they
hold 2.88 MB.

Sri Vinayaka Computer Education, Doddaballapur


Floppy disks are also a form of
magnetic storage that function
similarly to hard drives. There is a
spring loaded metal cover that is
moved aside during operation that
exposes a mylar disk that is coated
with a ferro-magnetic substance.
The drive's read/write heads access
the disk as it turns on a spindle.

Sri Vinayaka Computer Education, Doddaballapur


The Compact Disc itself is a thin
plastic disk some 12 cm. in diameter.

Information is encoded in a plastic-


encased spiral track contained on the
top of the disk.

The spiral track is read optically by a


noncontact head which scans
approximately radially as the disk
spins just above it.
Sri Vinayaka Computer Education, Doddaballapur
MEMORY : There are two types of
memory : RAM & ROM.

RAM : Random Access Memory. It is


the main memory of the computer.
It is volatile memory and the
information gets erased whenever
the power supply is switched off.

Sri Vinayaka Computer Education, Doddaballapur


There are different types of RAM:

Static RAM (SRAM) This RAM will maintain its


data as long as power is provided to the memory
chips. It does not need to be rewritten periodically.
SRAM is very fast but much more expensive than
DRAM. SRAM is often used as cache memory due to
its speed. (CACHE memory is the memory used
directly by the CPU).

Dynamic RAM (DRAM) DRAM, unlike SRAM,


must be continually rewritten in order for it to
maintain its data. This is done by placing the
memory on a refresh circuit that rewrites the data
several hundred times per second. DRAM is used for
most system memory because it is cheap and small.
Sri Vinayaka Computer Education, Doddaballapur
ROM : Read Only Memory
Information is burnt into the ROM
chip at the time of manufacturing.
It can not be erased or altered and
fresh information can not be
written into the ROM. The BIOS is
stored on ROM because the user
cannot disrupt the information.
BIOS : Basic Input Output System.
It contains some instructions
required internally by the computer.
Sri Vinayaka Computer Education, Doddaballapur
There are different types of ROM.

Programmable ROM (PROM) This is basically a blank


ROM chip that can be written to once. It is much like a CD-R
drive that burns the data into the CD. Some companies use
special machinery to write PROMs for special purposes.

Erasable Programmable ROM (EPROM) This is just like


PROM except that you can erase the ROM by shining a special
ultra-violet light into a sensor atop the ROM chip for a certain
amount of time. Doing this wipes the data out, allowing it to
be rewritten.

Electrically Erasable Programmable ROM (EEPROM)


(Also called Flash BIOS) This ROM can be rewritten through
the use of a special software program. Flash BIOS also
operates this way, allowing users to upgrade their BIOS.

ROM is slower than RAM, which is why some try to shadow it


to increase speed.
Sri Vinayaka Computer Education, Doddaballapur
CPU : Central Processing Unit. It is
also called the micro processor.

There are CPUs with varying


efficiency and the quality of the
computer depends mainly on the
CPU present on the main board.

Sri Vinayaka Computer Education, Doddaballapur


Example of some CPUs by Intel.
• 8088 1985
• 80386 1987
• 80486 1988
• Pentium – I1990
• Pentium – II 1994
• Pentium - III 1995
• Pentium – IV 2001
Sri Vinayaka Computer Education, Doddaballapur
MOTHER BOARD : The main circuit
board housing the microprocessor,
RAM, ROM and connecting
interfaces to the various other
devices and peripherals.

               

Sri Vinayaka Computer Education, Doddaballapur


Sri Vinayaka Computer Education, Doddaballapur
                     

CABINET HOLDING THE MOTHER


BOARD AND OTHER COMPONENTS
Sri Vinayaka Computer Education, Doddaballapur
                                  

A DESKTOP PERSONAL COMPUTER


Sri Vinayaka Computer Education, Doddaballapur
SOFTWARE :
A set of programs that utilises the
hardware and uses its’ capabilities
to perform various tasks.

Program : A program is a set of


instructions stored in the computer
to solve specific problems.

Sri Vinayaka Computer Education, Doddaballapur


C L A S S IF IC A T IO N O F S O F T W A R E

SO FTW ARE

SYSTEM A P P L IC A T IO N

O P E R A T IN G S Y S T E M TRANSLATO RS R E A D Y -M A D E C U S T O M IS E D

IN T E R P R E T E R C O M P IL E R

Sri Vinayaka Computer Education, Doddaballapur


SYSTEM SOFTWARE : The system
s/w are a set of programs specially
designed for performing tasks such
as, controlling the computer
hardware, and utilising the
resources to help the application
software solve specific problems.

Sri Vinayaka Computer Education, Doddaballapur


OPERATING SYSTEM : Programs to
control the hardware and provide
user interface. It is essential for
every computer.
Functions :
• Memory management
• CPU management
• Input / Output management
• Storage / File management
• Provide user interface
Sri Vinayaka Computer Education, Doddaballapur
TRANSLATOR : Translates high level
language to low level language and
vice-versa.

LOW LEVEL LANGUAGE : The


language of bits understood directly
by the computer. It is also called
the machine language.

HIGH LEVEL LANGUAGE : The


language of users understood by
the computer only after translation.
Sri Vinayaka Computer Education, Doddaballapur
A computer language comprises of
key words and syntax. Using the
key words and following the syntax,
commands and instructions are
written step by step to develop the
program.

The program is then translated into


machine language by using the
translators.

Sri Vinayaka Computer Education, Doddaballapur


There are many languages and any
one can be used to develop
programs.
Each language has it’s capabilities
and limitations.

COBOL Commercial applications


BASIC Beginners’ language
FORTRAN Mathematical and scientific applications
C System level programming

Sri Vinayaka Computer Education, Doddaballapur


There are two types of translators :
INTERPRETER & COMPILER.
An interpreter takes one instruction
at a time, translates it and moves
on to the next statement in the
program. Hence, executing the
entire program step by step.
Each time we execute a program
the source program and the
interpreter, both are required.
Sri Vinayaka Computer Education, Doddaballapur
A compiler takes all the high level
language instructions at a time and
creates a corresponding machine
language program which can be
directly executed by the computer.
Hence, after compilation neither the
source program nor the compiler
program is required.
HIGH TRANSLATION & MACHINE
LEVEL LANGUAGE
LANGUAGE COMPILATION PROGRAM
PROGRAM
Sri Vinayaka Computer Education, Doddaballapur
APPLICATION SOFTWARE :
These are programs developed
using one of the languages to
perform a specific task.

Sri Vinayaka Computer Education, Doddaballapur


READY MADE :
These are programs developed by
software companies for general
purpose applications. These
programs can be bought and can be
installed in the hard disk of a
computer.
Examples : MS-WORD, FACT, TALLY,
FOXPRO etc.

Sri Vinayaka Computer Education, Doddaballapur


CUSTOMISED OR TAILOR MADE :
These are programs developed for
SPECIFIC USER REQUIREMENT
within an organisation. These
programs are developed by
programmers as per the user
requirements.
Examples : Mark-sheet, Salary,
Sales information, Railway
reservation etc.
Sri Vinayaka Computer Education, Doddaballapur
MS-DOS

Microsoft
Disk Operating System

Sri Vinayaka Computer Education, Doddaballapur


FILE :
Related information or data is
stored in the form of a file in the
disk. Hence, the minimum chunk
of information that we can store in
or retrieve form a disk, is a file.
The files are either program files
or data files.

Sri Vinayaka Computer Education, Doddaballapur


Each file must have a unique
name.
The file name has two parts :
PRIMARY NAME &
SECONDARY NAME or extension.

The primary name is to identify


the contents and the extension is
to identify the type of the file.
Sri Vinayaka Computer Education, Doddaballapur
The primary file name can be
maximum 8 characters long.
The extension of the file name
can be maximum 3 characters
long.
The primary file name and the
extension is joined by a period.
The extension is optional.
Sri Vinayaka Computer Education, Doddaballapur
Legal characters in the file names
include all letters of the alphabet,
numeric digits and punctuation
marks except the following
characters :

*?=+|:[];,/\<>“
A blank space can not be used in
the file name.
Capital & small letters are treated
as the same.
Sri Vinayaka Computer Education, Doddaballapur
BIODATA.TXT VALID
SALARY.98 VALID
ACCOUNTS VALID
.COM INVALID
1 VALID
A.B VALID
MY FILE.DOC INVALID
Sri Vinayaka Computer Education, Doddaballapur
WILD CARD :
The wild card allows us to deal with
more than one file at a time and helps
us to group the files.

A substitute at the beginning


*
? A substitute at specific positions
Sri Vinayaka Computer Education, Doddaballapur
*.TXT BIODATA.TXT
BOOK.TXT
Primary name – anything
Extension - .TXT NOTES.TXT
SALARY.98
SALARY.* SALARY.DAT
Primary name – SALARY
Extension - anything SALARY.DOC

A*.* ALASKA.DOC
ABC.123
Primary name – starting with A
Extension - anything A

*.* All files


Primary name – anything
Extension - anything

*. SALARY
Primary name – anything BIODATA
Extension – nothing (must not be there)
Sri Vinayaka Computer Education, Doddaballapur
123
SALARY.TXT
?A*.TXT DATA.TXT
Primary name – second character A
Extension - .TXT RANA.TXT
SALARY.DOC
*.?O? COMMAND.COM
Primary name – anything
Extension – second character O NOTES.SOS

Sri Vinayaka Computer Education, Doddaballapur


DRIVE NAMES

A computer can have more than one


disk drives like hard disk, floppy disk
drive & CD-rom drive.

Each of these drives are identified by


an alphabet and a colon symbol as
A:, B:, C: etc.

Sri Vinayaka Computer Education, Doddaballapur


FIRST FLOPPY DISK DRIVE : A:
SECOND FLOPPY DISK DRIVE : B:
FIRST HARD DISK : C:
Rest of the drives are named as D: onwards.
CD-ROM DRIVE: D:

If the computer has a second hard disk and a cd-


rom drive –
SECOND HARD DISK: D:
CD-ROM DRIVE : E:
Sri Vinayaka Computer Education, Doddaballapur
In order to make the computer
work, the operating system
program files must be loaded into
the memory from the disk. This
process is automatically initiated
as soon as a computer is switched
on. This process is called booting.
The booting takes place with the
help of instructions in the ROM.
Sri Vinayaka Computer Education, Doddaballapur
Following tasks are carried out during
booting :
• Test the computer hardware
• Check all the devices
• Load the operating system files from
the disk

The computer is ready to interact with


the user only after booting is carried out
successfully.

Sri Vinayaka Computer Education, Doddaballapur


DOS program files necessary for
booting :
IO.SYS
Responsible for the INPUT / OUTPUT operations

MSDOS.SYS
Responsible for the DISK & FILE operations

COMMAND.COM
Acts as the command interpreter to translate the user instructions.

Sri Vinayaka Computer Education, Doddaballapur


After booting the command line prompt
appears on the screen. Any dos command
statement is typed at the command prompt
and an <enter> key is pressed to execute it.

C:\>=

Current Cursor
drive

Cursor indicates the point on the screen at which the next


character or the output will be displayed.
Sri Vinayaka Computer Education, Doddaballapur
DEFAULT DRIVE : This is the current drive in
which DOS will look for the files and carry out all
the operations in this drive until we specify
otherwise.

C:\>= (DOS prompt where current default drive is C:)

We can change the default drive just by typing the


drive name at the prompt.

C:\> A: <ENTER>

A:\>= (DOS prompt where current default drive is A:)

Sri Vinayaka Computer Education, Doddaballapur


SOME ELEMENTARY DOS COMMANDS:

CLS
This command clears the screen and
takes the prompt to the left-top
corner of the screen.

Sri Vinayaka Computer Education, Doddaballapur


DATE
To change the system date.
On typing this command the current
date is displayed and the user is
allowed to type in the new date.

Sri Vinayaka Computer Education, Doddaballapur


TIME
To change the system time.
On typing this command the current
time is displayed and the user is
allowed to type in the new time.

Sri Vinayaka Computer Education, Doddaballapur


DIR
This command gives a listing, called
the directory, of the files stored on a
disk.
It displays :
• file names
• Size
• date & time when the file was created or updated.

Sri Vinayaka Computer Education, Doddaballapur


Sri Vinayaka Computer Education, Doddaballapur
Options with DIR

DIR /P Pause after every screen full of information.

DIR /W Wide format displaying only the file names.

DIR /ON In order of file name.


DIR /OE In order of extension.
DIR /OS In order of size.
DIR /OD In order of date.

Sri Vinayaka Computer Education, Doddaballapur


Wild cards can be used with DIR to
display a group of files satisfying the
wild card criteria.

DIR *.TXT Files with extension .TXT

DIR SALARY.* Files with name SALARY

Sri Vinayaka Computer Education, Doddaballapur


The directory of another drive can be
displayed by specifying the drive name
with the command.

DIR A: Displays the directory of the floppy in drive A.

Sri Vinayaka Computer Education, Doddaballapur


BASIC FILE COMMANDS

COPY Make copies of files.

SYNTAX
COPY [SOURCE] [TARGET]
The source has to be a file name or wildcard specification.
It may or may not have a drive name. It it does not have a
drive name, the file(s) is collected from the default drive.

The target may be a file name or a drive name.

Sri Vinayaka Computer Education, Doddaballapur


Copy from one disk to another :
C:\>COPY MYFILE.TXT A:
Copies the file from the default drive ( C: ) to A:

C:\>COPY *.TXT A:
Copies the files with extension .TXT from the default drive
( C: ) to A:

Sri Vinayaka Computer Education, Doddaballapur


C:\>COPY A:SALARY.DAT
Copies the file from A: to the default drive ( C: )
In this case, since the target is the default drive it may
not be written in the command.

C:\>COPY A:*.* B:*.*


Copies all files the first floppy drive to the second floppy
drive.
In this case, the current or the default drive is not at all
involved in the copying.

Sri Vinayaka Computer Education, Doddaballapur


While making a copy of a file we can
also change the name of the file.

C:\>COPY MYFILE.TXT A:YOURFILE.TXT


Copies the file from the default drive ( C: ) to A: and the
name of the file in drive A: changes.

Sri Vinayaka Computer Education, Doddaballapur


We can make copies of the files in the
same disk also. But, while copying in
the same disk, the name of the target
file must be specified as different than
the source file.
C:\>COPY STUDENT.DOC PUPIL.DOC

C:\>COPY *.TXT *.DOC

Sri Vinayaka Computer Education, Doddaballapur


COMBINE THE CONTENTS OF SEVERAL
FILES INTO ONE FILE :

COPY POEM1.TXT+POEM2.TXT POEM3.TXT

This will combine the contents of the


files POEM1.TXT & POEM2.TXT and
create a new file named POEM3.TXT.

Sri Vinayaka Computer Education, Doddaballapur


DELETING FILES:
Files can be removed one at a time or
several files at a time by using wild cards.
The commands are DEL or ERASE.

DEL BIODATA.DOC Deletes the file BIODATA.DOC.

DEL *.txt Deletes all files having extension .TXT

DEL *.* Deletes all the files.

The command ERASE can also be used the


same way in place of DEL.
Sri Vinayaka Computer Education, Doddaballapur
RENAME FILES:

SYNTAX :
REN OLD-NAME NEW-NAME

REN STUDENT.99 STUDENT.00


The name of the file STUDENT.99 changes to STUDENT.00

REN *.99 *.00


The extension of all .99 files change to .00

Sri Vinayaka Computer Education, Doddaballapur


DIPLAYING FILE CONTENTS :

TYPE BIODATA.TXT
This will display the contents of the file BIODATA.TXT

TYPE displays the contents of text files


only.

Wild card can not be used with this


command, hence only one file can be
displayed at a time using the TYPE
COMMAND.
Sri Vinayaka Computer Education, Doddaballapur
CREATE A SMALL TEXT FILE USING COPY :

COPY CON NEWFILE.TXT


The cursor comes to the next line and we can enter
the text line after line. On completion of typing use
ctrl+Z to store the file.

Sri Vinayaka Computer Education, Doddaballapur


SUB-DIRECTORY :

A sub-directory is a separate storage


location in the disk where files can be
stored. This helps us to organise the files
in separate locations in the disk.

There can be several subdirectories in a


disk and the subdirectories are named the
same way as the files.
Sri Vinayaka Computer Education, Doddaballapur
The first directory that is always there in a disk is called
the root directory. All other directories are created
under the root directory in different levels.

ROOT

STUDENT ACCOUNT TEXT OTHER

MARKS LETTER

Sri Vinayaka Computer Education, Doddaballapur


PATH or ADDRESS of a directory or sub-directory :
The path helps us to access a directory. It always starts
from the root and ends with the destination directory.

ROOT \

STUDENT ACCOUNT TEXT OTHER


\STUDENT \ACCOUNT \TEXT \OTHER

MARKS LETTER
\STUDENT\MARKS \TEXT\LETTER

Sri Vinayaka Computer Education, Doddaballapur


CREATING SUB-DIRECTORIES ROOT

Command : MD or MKDIR STUDENT ACCOUNT TEXT OTHER

MD \STUDENT MARKS LETTER

MD \ACCOUNT
MD \TEXT
MD \OTHER
MD \STUDENT\MARKS
MD \TEXT\LETTER

Sri Vinayaka Computer Education, Doddaballapur


CHANGING FROM ONE ROOT

DIRECTORY TO ANOTHER
STUDENT ACCOUNT TEXT OTHER

Command : CD
C:\>CD \STUDENT MARKS LETTER

C:\STUDENT>=
C:\STUDENT>CD MARKS
C:\STUDENT\MARKS>=
C:\STUDENT\MARKS>CD \OTHER
C:\OTHER>=

C:\OTHER>CD \
C:\>= Sri Vinayaka Computer Education, Doddaballapur
COPYING FILES :
C:\>COPY \STUDENT\NOTES.TXT \TEXT
Copies the file NOTES.TXT from the sub-directory STUDENT to TEXT

C:\>COPY \STUDENT\NOTES.TXT \TEXT

FILE

SUB-DIRECTORIES

Sri Vinayaka Computer Education, Doddaballapur


MORE EXAMPLES :
C:\>COPY \OTHER\*.* \ACCOUNT
Copies all the files from the sub-directory OTHER to ACCOUNT

C:\>COPY \OTHER\*.*
Copies all the files from the sub-directory OTHER to root directory

C:\>COPY *.DOC \STUDENT\MARKS


Copies all the files from the root directory to the sub-directory MARKS

C:\>COPY \TEXT\LETTER\*.* A:
Copies all files from the Srisub-directory LETTER
Vinayaka Computer Education, to the drive A
Doddaballapur
REMOVING SUB-DIRECTORIES ROOT

Command : RD or RMDIR STUDENT ACCOUNT TEXT OTHER

We can not remove a sub-directory:


MARKS LETTER
• If it is not empty
• Staying in the same sub-directory

DEL \STUDENT\MARKS\*.*
RD \STUDENT\MARKS
DEL \STUDENT\*.*
RD \STUDENT

Sri Vinayaka Computer Education, Doddaballapur


INTERNAL & EXTERNAL COMMANDS
Internal commands are loaded at the time of
booting and are always available in the memory.
Hence these commands can be executed any
time after booting.
Example: DIR, COPY, TYPE, CD, MD, RD etc.

In fact all the commands we have discussed till


now are Internal Commands.

Sri Vinayaka Computer Education, Doddaballapur


External commands are separate utility
programs that accompany the operating system.
These commands are executed with the help of
program files present in the disk. Typically the
primary name of a program file for a particular
external command is the same as the command
itself and the extension is either .COM or .EXE.

Example: TREE, FORMAT, LABEL, SYS,


DISKCOPY, ATTRIB, SCANDISK, MORE etc.

Sri Vinayaka Computer Education, Doddaballapur


TREE - To display the sub-directory structure of a disk.
C:\> TREE C:\
Displays the sub-directory structure starting from
root directory.
C:\> TREE C:\TEXT
Displays the sub-directory structure starting from
the sub-directory TEXT.
C:\> TREE C:\ /F
The option F includes the files also in each sub-
directory.
Sri Vinayaka Computer Education, Doddaballapur
FORMAT – Prepares a blank disk for receiving
and storing data or creates a new blank disk from a
used one. Formatting an used disk will erase all
the contents and make it a new blank disk.
C:\> FORMAT A:
Formats the floppy disk in A: drive
C:\> FORMAT A: /S
The option S makes the disk bootable after
formatting.
DO NOT format the HARD DISK or all
the contents will be lost.
Sri Vinayaka Computer Education, Doddaballapur
LABEL – Adds or modifies the volume label of
the disk.

C:\> LABEL C:
Allows you to change the volume label of the Hard
disk.

Sri Vinayaka Computer Education, Doddaballapur


SYS – Copies the DOS system files into a disk and
makes it bootable.

C:\> SYS A:
Will transfer the system files to the floppy in drive
A: and make it bootable.

Sri Vinayaka Computer Education, Doddaballapur


DISKCOPY – Copies an entire disk into
another and makes an identical disk. It overwrites
the contents of the target disk.

C:\> DISKCOPY A: B:
Will copy the contents of the floppy in drive A: to
the floppy in drive B:

Sri Vinayaka Computer Education, Doddaballapur


ATTRIB – Changes the attributes of a file. A file
can be made read-only or hidden.
C:\> ATTRIB +R MYFILE.TXT
Makes the file read-only.
C:\> ATTRIB +H MYFILE.TXT
Makes the file hidden.
C:\> ATTRIB -R –H MYFILE.TXT
Removes the read-only and hidden attributes.
Wild cards can be used to change the
attributes of a group of files.
Sri Vinayaka Computer Education, Doddaballapur
SCANDISK – Analyses and repairs logical and
physical disk errors.

It identifies the bad sectors from the disk


and marks them so that no data is stored
there.

C:\> SCANDISK C:

Sri Vinayaka Computer Education, Doddaballapur


MORE – Displays the output one screen at a
time instead of continuous scrolling.

This command does not have any


function alone and is always used in
association with another command which
displays some output. PIPING SIGN is
given between the command and more.

C:\> TREE C:/ | MORE


Displays the subdirectory structure page-wise.
Sri Vinayaka Computer Education, Doddaballapur
End of show.

Thank you.
Sri Vinayaka Computer Education, Doddaballapur

Вам также может понравиться