Sei sulla pagina 1di 185

COMPUTER

FUNDAMENTALS

What is a computer ?

A computer is an ELECTRONIC device


capable of performing ARITHMETIC and
LOGICAL operations.
It can store a large AMOUNT of DATA.

Arithmetic operations involve the


general mathematical operations
Addition
Subtraction
Multiplication
Division

etc

Logical operations involve the following


>

GREATER THAN

<

LESS THAN

EQUAL TO

<=

LESS THAN EQUAL TO

>=

GREATER THAN EQUAL TO etc.

How does a computer


work?
INPUT

PROCESS

OUTPUT

How does a computer


work?
INPUT consists of DATA &
INSTRUCTION
fed in by the user.
Input devices are the means to
provide
this input which is required to solve

How does a computer


work?
PROCESS is the step by step execution
of stored instructions in the computer
to solve the problem provided by the
user.
The process is also called a PROGRAM.

How does a computer


work?
OUTPUT is the set of results generated after
PROCESSING the INPUT.
Output devices are the means for displaying
the result in a form understandable by users.
Terminals and printers are popular output
devices.

DATA & INFORMATION

DATA is described as some FACTS,


FIGURES and STATISTICS about a
particular instance.
Example: MARKS in individual subjects.

DATA & INFORMATION

INFORMATION is FACTS, FIGURES &


STATISTICS which help in decision
making.
making
Generally information is the result of data
processing.
Example : PERCENTAGE & GRADE.

HARDWARE
These are the PHYSICAL COMPONENTS of
the Computer System which we can
touch and see.
Examples :
Electronic parts.
Cables.
Peripherals.

SOFTWARE

These are the LOGICAL COMPONENTS


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

Characteristics of Computer
o

SPEED

STORAGE

ACCURACY

VERSATILITY

AUTOMATION

DILIGENCE

SPEED
The computer was first conceived as a
high-speed calculator.
Since a computer is an electronic device,
electrical pulses are used to store data
and they travel at incredible speed.
Internal speed is virtually instantaneous.

SPEED
The speed with which the computer works can be
understood by the units of measurement of time
within a computer.
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
A powerful computer is capable of adding two 18
digit numbers in 300 nanoseconds

STORAGE
A computer stores a large volume of
data and information.
The factors to be considered for storage
are :
RETREIVAL INSTATANEOUS
SPACE MINIMUM
MEDIA MAGNETIC / OPTICAL
LONGIVITY LIFE LONG

ACCURACY

The accuracy of the computers is


consistently high.
Errors in the machinery may occur, but
due to efficient error-detecting
techniques, these do not lead to wrong
results.

ACCURACY
Errors in computing are due to human
rather than technological faults.

GIGO Garbage In, Garbage Out


A COMPUTER NEVER MAKES ANY MISTAKE

VERSATILITY
Computers are capable of performing almost
any task,
provided these can be broken down into a
series of
logical steps.
The computer actually performs 4 basic
operations:
1. Exchanges information with the outside
world
via INPUT / OUTPUT devices
2. Transfers data within the computer to the

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.

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,

BLOCK DIAGRAM OF A COMPUTER SYSTEM


SECONDARY
STORAGE

INPUT
DEVICE

MEMORY
UNIT

OUTPUT
DEVICE

CONTROL
UNIT
CONTROL FLOW

Registers
DATA FLOW

ARITHMETIC
& LOGIC UNIT

CPU

COMPONENTS
THE COMPUTER RECEIVES INPUT,
PROCESSES IT AND DELIVERS
OUTPUT.
To perform these tasks it has
different units or components and
each component is responsible for
a specific task.

COMPONENTS
The components are INPUT, OUTPUT ,
PRIMARY
MEMORY, SECONDARY MEMORY,
REGISTERS,
CONTROL UNIT (CU) AND ARITHMETIC &
LOGIC
UNIT (ALU).

INPUT DEVICES
Used for transferring data from the
users end to the computer.

OUTPUT DEVICES
Used to transfer processed
information from the computer to
the user in a way desired by the

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

ARITHMETIC & LOGIC UNIT


It performs the various arithmetic
and logical operations on the data
as dictated by the instruction.
There are various basic circuits to
perform these operations.

REGISTERS
These are high speed storage
devices to provide information
sufficiently fast to the ALU.
Registers are very expensive
devices

MEMORY UNIT
It stores instruction and data and
provides these to the various
other units as and when
required.
It consists of RAM and ROM.
(1) RANDOM ACCESS MEMORY
(2) READ ONLY MEMORY

MEMORY UNIT
RANDOM ACCESS MEMORY It is a
volatile
memory where results of calculations
are
stored for subsequent use.
READ ONLY MEMORY Used for storing
permanent information.

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

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

HARDWARE
Input devices

KEYBOARD : It is an input device to


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

Input Devices

Although the typing portion of the


computer keyboard is identical to a
standard typewriter, computers have
several additional keys that perform

Input Devices

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.

Input Devices

SCANNER : It is
used for graphical
inputs.
Pictures, images,
drawings etc. can
be scanned and
stored in the
computer.

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.

Input Devices

Digital Cameras are peripheral


input devices that allow users to
create pictures and/or movies in
a digital format.
Some require specialized
software to import images
into the computer.
Some record digital images
directly to a disk that can be read
by the computer.

Touch pad
A touch pad is a device for pointing (controlling input
positioning) on a computer display screen. It is an
alternative to the mouse. Originally incorporated in laptop
computers, touch pads are also being made for use with
desktop computers. A touch pad works by sensing the
user's finger movement and downward pressure.

Graphics Tablet
A graphics tablet (or digitizing tablet) is a computer peripheral device
that allows for a relatively simple method of inputing hand-drawn
graphics or art into a computer in real time. They typically consist of a
large flat surface for drawing on, and an attached "stylus" for drawing on
the surface, originally as a part of the electronics, but later simply to
provide an accurate but smooth "point".
This device also allows the computer
user to control the mouse cursor by
tracking the stylus pen across the
tablet. To most users, the cordless,
stylus pen is much easier and faster
to use than a mouse and has less
strain on your hand.

TRACKBALL
A trackball is a computer cursor control device used in
many notebook and laptop computers. The trackball is
usually located in front of the keyboard toward the user.
Essentially, the trackball is an upside-down mouse that
rotates in place within a socket. The user rolls the ball to
direct the cursor to the desired place on the screen and can
click one of two buttons (identical to mouse buttons) near
the trackball to select desktop objects or position the cursor
for text entry.

TOUCHSCREEN
A touchscreen is an input device that allows users to operate a PC
by simply touching the display screen. Touch input is suitable for a
wide variety of computing applications. A touchscreen can be used
with most PC systems as easily as other input devices such as
track balls or touch pads. Browse the links below to learn more
about touch input technology and how it can work for you.
Touchscreen systems are
being used in a variety of
applications,
including
point-of-sale
systems,
public information displays,
industrial control systems,
and more. Follow this link
for additional examples of
how touch technology is
being used today.

Light pen
A lightpen is a device similar to a touch screen,
but is facilitated by use of a special light
sensitive pen instead of the finger. The
advantage of using a pen is more accurate screen
input other that of a touch screen.

JOYSTICK
A lever that moves in all directions
and controls the movement of a
pointer or some other display symbol.
A joystick is similar to a mouse,
except that with a mouse the cursor
stops moving as soon as you stop
moving the mouse. With a joystick,
the pointer continues moving in the
direction the joystick is pointing. To
stop the pointer, you must return the
joystick to its upright position. Most
joysticks include two buttons called
triggers.
Joysticks are used mostly for computer games, but they are also used
occasionally for CAD/CAM systems and other applications.

DIFFERENT INPUT TYPES


Magnetic Ink Character
Recognition.
MICR
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.

Magnetic Ink Character Recognition.


MICR

MICR CHEQUE NUMBER

Optical Mark Reading


OMR
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

Optical Mark Reading


OMR
Mainly used in
correcting
answers to
Multiple Choice
Question Papers.

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
bar code scanner. A sequence of
bits is generated and the
information is recorded.

BAR-CODE RECOGNITION

BAR CODE FOR


PRODUCT

VOICE INPUT
This system accepts spoken input.
The waveform created by the input
is
analysed, patterns are extracted
and
matched against pre-stored

VOICE INPUT
The words and phrases that 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.

Input Device

Description

Usage

Keyboard

Data can be entered by pressing the


corresponding keys on the keyboard.

Text input

Mouse/
Trackball

It uses the movement of a small ball


to control the pointer and uses
buttons to perform activities.

Touch pad

It uses the movement of a finger to


control the pointer and uses buttons
to perform activities.

Joystick

It uses the movement of a vertical


stem to control the pointer and uses
buttons to perform actions.

Moving
the
pointer, selecting
options
and
graphics input
Moving
the
pointer, selecting
options
and
graphics input
Playing
video
games

Input
Device

Description

Usage

Touch
screen

Data can be entered


touching the screen.

Digitizer

It converts points, lines and


curves from a drawing or a
photograph into digital signals.

Graphics input

Graphic
tablet

It allows a user to input graphic


designs into a computer.

Graphics input

Bar
code
reader

It identifies a bar code by the


reflected light pattern from the
bar code lines.

Reading
codes

by

Information
seeking

bar

Input
Device

Description

Usage

Optical
character
reader

It recognizes characters with


special typefaces.

Reading retail
prices,
text
input

Image
scanner

It captures images or text into


the computer.

Graphics input

Magnetic
card reader

It reads data stored in the


magnetic strip on a magnetic
card.

Reading
magnetic cards

Input Device

Description

Usage

Smart
reader

It reads data stored in the chip on a


smart card.

Reading
cards

Speech
recognition
device

Data or commands can be inputted to


the computer with spoken words.

Digital camera

It records images in the form of digital


data.

Security
purposes,
handicapped
people
Image input

Digital video
camera

It allows a user to input video images


into the computer in digital form.

card

smart

Video image input

OUTPUT DEVICES
VDU
VDU stands for 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.

OUTPUT DEVICES
VDU
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.

OUTPUT DEVICES
VDU
The base is the monitors screen and is
coated on the inside with a matrix of
thousands of tiny phosphor dots.
Each dot consists of
three blobs of
coloured phosphor:
red, green & blue.
These groups of three
phosphors make up
what is known as a

Output Devices
Projection systems or classroom TVs
can display information from a
computer system on a larger screen
for whole-class instruction.

OUTPUT DEVICES
PRINTERS
A printer produces output on paper
(hard copy) which can be kept
permanently.
TYPES OF PRINTERS :
DOT MATRIX
INK JET PRINTER
LASER PRINTER

DOT MATRIX

INK-JET

LASER

Operation of Ink Jet Printer


Inkjet printing, like laser printing, is a nonimpact 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 visualize: liquid ink in
various colours are sprayed onto 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.

Operation of Ink Jet Printer


Most inkjets use thermal technology, whereby
heat is used to fire ink onto the paper.
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 reservoir
to replace the ejected ink.

Operation of a LASER Printer

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

Operation of a LASER Printer

DOT
MATRIX

INK JET

LASER

CHARACTER YES
BASED
OUTPUT

YES

YES

GRAPHICS
BASED
OUTPUT

NO

GOOD

EXCELLENT

OUTPUT
QUALITY
COST
EFFECTIVE

OK

GOOD

EXCELLENT

LOW
RECURRING
COST

HIGH
RECURRIN
G COST

HIGH
RECURRIN
G COST

COLOUR

NO

OK

EXCELLENT

Comparisons between different output devices:


Output Device

Description

Usage

Visual display unit

It displays images on screen.

Image output

Dot-matrix printer

It is a noisy, low speed and quality


printer.

Printing multiple hardcopies in


one strike

Inkjet printer

It is a quiet, quite high speed and


quality printer.

Printing documents, graphics

Laser printer

It is quiet, high speed and best


quality printer.

Printing high quality documents


and graphics

Plotter

It produces high quality line


drawings.

Sound/speech
synthesizing
devices

It converts information into speech.

Producing
maps,
charts,
building plans and circuit
diagrams.
Automatic telephone answering
systems, voice dictionaries

DATA REPRESENTATION WITHIN A


COMPUTER

CHARACTER :
A character is the smallest unit of data
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

DATA REPRESENTATION WITHIN A


COMPUTER

Computer being an electronic


device, can represent only two
states VOLTAGE (on) and NO
VOLTAGE (off).
Voltage is represented as
1
No voltage is represented as
0

DATA REPRESENTATION WITHIN A


COMPUTER

A series of such 0s and 1s form a


pattern.
0 1 1 1 1 0 0 1
Such a pattern represents a
CHARACTER.
HARACTER
For each character a separate
pattern is there within the
computer.

DATA REPRESENTATION WITHIN A


COMPUTER

There are 8 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 BITBIT
PATTERN. 0 1 1 1 1 0 0 1

DATA REPRESENTATION WITHIN A


COMPUTER

0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1

255

Two digits, 0 and 1 can generate


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

ASCII
American Standard Code for
Information Interchange.
It is difficult for us to remember all the
256 bit patterns and their corresponding
characters.
We can convert the bit pattern to a
decimal no.
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.

American Standard Code for


Information Interchange
BIT PATTERN

ASCII CODE

CHARACTER

1000001
1100001
0110001
0101011
0100000
0101101
0011100
0101100

65
97
49
43
32
45
28
44

A
a
1
+
(
,

DATA REPRESENTATION WITHIN A


COMPUTER

UNITS FOR MEASUREMENT OF


DATA
8 BITS = 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)
Petabyte: Approximately 1015 bytes
Exabyte: Approximately 1018 bytes.

STORAGE
DEVICES
HARD DISK:
It a device fixed to a computer and
can store large volumes of
information. It uses magnetic media
& electromagnetic theory to read
and store information.
The standard capacity : 80 320 GB

STORAGE
DEVICES
FLOPPY DISK : ( obsolete nowadays)
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.

STORAGE
DEVICES
FLOPPY DISK :
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

STORAGE
DEVICES
Compact Disk:
It is a circular disk and 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

STORAGE
DEVICES
Compact Disk:
Information once written into a read only
CD cannot be erased or changed.
Information written onto a re-writable CD
can be erased or changed.
Standard capacity : 700 MB

Storage Technology

Electronic devices that store, retrieve,


and save instructions and data.
Todays microcomputers or PCs
include several types of storage
devices.
Capacity and speed are important
considerations when selecting a new
storage device for a PC.

FLOPPY DISK

HARD
DISK

CD or DVD

HARD DISKS
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, primarily made of
iron oxide.

HARD DISKS

The read/write heads are


responsible for reading and
writing to the platters.
They are attached to the head
actuator which is in charge of
moving the heads around the
platters.

HARD DISKS
Theres 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.

HARD DISKS
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.
The sector is a disk's smallest
accessible unit.

HARD DISKS
Tracks physically above each other on the
platters are grouped together into cylinders
which are then further subdivided into sectors
of 512 bytes apiece.

FLOPPY DISKS
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 highdensity. They usually hold 1.44 MB of
data.

FLOPPY DISKS
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

COMPACT DISKS

The Compact Disc itself is a thin plastic


disk some 12 cm. in diameter.
Information is encoded in a plasticencased spiral track present on the disk.
The spiral track is read optically by a noncontact head which scans approximately
radially as the disk spins just above it.

Blu-ray Disc
Blu-ray Disc (official abbreviation BD) is an optical disc
storage medium designed to supersede the DVD format. The
format defines as its standard physical media a 12cm (same
as DVDs and CDs), 25 GB per-layer optical disc, with dual layer
discs (50 GB) the norm for feature-length video discs and
additional layers possible later.

PRIMARY MEMORY
There are two types of primary
memory:

Random Access Memory

Read Only Memory.

PRIMARY MEMORY

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.
SRAM and DRAM are two types of
RAMs that are available.

PRIMARY MEMORY - 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 CPU).

PRIMARY MEMORY - RAM

Dynamic RAM (DRAM) - Unlike SRAM, it must


be continually rewritten in order 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.

PRIMARY MEMORY - 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
under normal operations.
The BIOS is stored on ROM because the user
cannot disrupt the information.
BIOS or Basic Input Output System contains
instructions required internally by the computer.

PRIMARY MEMORY - ROM


Programmable ROM (PROM): It is a ROM chip that
can be written once. It is like a CD-R that burns
the data once.
Erasable Programmable ROM (EPROM): This is just
like PROM except that one can erase the ROM by
shining a special ultra-violet light into a sensor on
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): This ROM can be rewritten through the

CPU

Central Processing Unit is the brain


of the computer. 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.

CPUs by Intel
8088

1985

80386

1987

80486

1988

Pentium I

1990

Pentium II

1994

Pentium - III

1995

Pentium IV

2001

Dual Core
Core 2 Duo

2006
2007

MOTHER BOARD

MOTHER BOARD : The main circuit board


housing the microprocessor, RAM, ROM and
connecting interfaces to the various other
devices and peripherals.

CONNECTING WIRES

CABINET HOLDING THE


MOTHER BOARD AND OTHER
COMPONENTS

PERSONAL COMPUTER - PC

SOFTWARE
A set of programs that utilizes 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.

CLASSIFICATION OF SOFTWARE
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
O P E R A T IN G S Y S T E M

A P P L IC A T IO N
TRANSLATO RS

IN T E R P R E T E R

C O M P IL E R

R E A D Y -M A D E

C U S T O M IS E D

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

OPERATING SYSTEM
Program to control the hardware
and provide user interface.
It is essential for every computer.
It is the link between the user and
the machine.

OPERATING SYSTEM

Functions :
Memory management
CPU management
Input / Output management
Storage / File management
Provide user interface

TRANSLATOR
Translates high level language to
low level language.
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.

COMPUTER LANGUAGES

Computer language comprises of


keywords and syntax.
Using the key words & following the
syntax, commands & instructions are
written step by step to develop the
program.
The program is then translated into
machine language by using the
translators.

COMPUTER LANGUAGES
There are many languages and any one can be
used to develop programs.
Each language has its capabilities and
limitations.
COBOL
(Common Business Oriented Language)
Commercial applications
BASIC
(Beginners All Purpose Symbolic
Instruction Code) For beginners.
FORTRAN (FORmula TRANslator)
Mathematical and scientific applications
C
System/Application level programming
C++/ JAVA Object Oriented Programming Language

TRANSLATOR

There are two types of translators :


INTERPRETER
COMPILER
HIGH
LEVEL
LANGUAG
E
PROGRA
M

TRANSLATION

MACHINE
LANGUAG
E
PROGRA
M

INTERPRETER
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

COMPILER

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.

APPLICATION SOFTWARE

These are programs developed


using one of the languages to
perform a specific task of the user.

READY MADE SOFTWARE


These are programs developed by
software companies for general
purpose applications.
These programs can be bought &
can be installed in the hard disk of
a computer.
Examples : MS-OFFICE, FACT, TALLY,
FOXPRO Photoshop, Dream weaver, SAP
(System Application Programming) etc.

CUSTOMISED SOFT WARE


These are programs developed for
SPECIFIC USER REQUIREMENT within an
organization.
These programs are developed by
programmers as per the users needs. It
is also called tailor made software.
Example: Mark-sheet, Salary, Sales
Information, Railway Reservation etc.

MS-DOS
Microsoft

Disk Operating System

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.

FILE
The files are either program files or
data files.
Each file must have a unique name.
The file name has two parts :
PRIMARY NAME &
SECONDARY NAME or extension.

FILE NAMES
The primary name is to identify the
contents and the secondary name is
to identify the type of the file.
The primary file name can be
maximum 8 characters long whereas
the extension of the file name can be
maximum 3 characters long.

FILE NAMES
The primary file name and the
secondary file name is joined by a
period.
The secondary file name or the
extension is optional.

FILE NAMES
Legal characters in the file names
include
1. all letters of the alphabets
A B C D E F G H ..
a b c d e f g h
2. numeric digits
1 2 3 4 5 6 7 8 .

FILE NAMES
Following characters are NOT
allowed:
*?=+|:[];,/\<>
A blank space CANNOT be used in
the file name.

FILE NAMES

BIODATA.TXT
SALARY.98
ACCOUNTS
.COM
1
A.B
MY FILE.DOC

VALID
VALID
VALID
INVALID
VALID
VALID
INVALID

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 for multiple character

positions.
? A substitute for specific character position.

FILE NAMES WITH WILD CARDS

*.TXT
Primary name anything
Extension - .TXT

SALARY.*
Primary name SALARY
Extension - anything

A*.*
Primary name starting with A
Extension - anything

BIODATA.TXT
BOOK.TXT
NOTES.TXT
SALARY.98
SALARY.DAT
SALARY.DOC
ALASKA.DOC
ABC.123
A

FILE NAMES WITH WILD CARDS

*.*

All files

Primary name anything


Extension - anything

*.
Primary name anything
Extension nothing (must not be there)

SALARY
BIODATA
123

FILE NAMES WITH WILD CARDS

?A*.TXT
Primary name second character A
Extension - .TXT

*.?O?
Primary name anything
Extension second character O

SALARY.TXT
DATA.TXT
LATER.TXT
SALARY.DOC
COMMAND.COM
NOTES.SOS

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 & a colon symbol as A: B: C:
etc.

DRIVE NAMES
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:

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

BOOTING

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.

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

COMMAND PROMPT
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
drive

Cursor

Cursor indicates the point on the screen


at which the next character/output will be

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 drive just by typing the


drive name at the prompt.

C:\>
A:\>=

A:

<ENTER>

(DOS prompt where current drive is A:)

ELEMENTARY DOS COMMANDS

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

ELEMENTARY DOS COMMANDS

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

ELEMENTARY DOS COMMANDS

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

ELEMENTARY DOS COMMANDS

DIR
This command gives a listing,
called the directory, of the files
stored on a disk.
It displays :
File names
Size

ELEMENTARY DOS COMMANDS

ELEMENTARY DOS COMMANDS

Options with DIR


C:\> DIR /P Display file names pagewise.
C:\> DIR /W Wide format displaying only file
names.
C:\> DIR /ON In order of file name.
C:\> DIR /OE In order of extension.
C:\> DIR /OS In order of size.
C:\> DIR /OD In order of date.

ELEMENTARY DOS COMMANDS

Wild cards can be used with DIR to


display a group of files satisfying
the wild card criteria.

C:\> DIR *.TXT

Files with extension

.TXT

C:\> DIR SALARY.*


SALARY

Files with name

ELEMENTARY DOS COMMANDS

The directory of another drive can


be displayed by specifying the
drive name with the command.

C:\> DIR A:

Displays the directory of


the floppy in drive A.

ELEMENTARY DOS COMMANDS

COPY - Make copies of files.


SYNTAX: COPY [SOURCE] [TARGET]
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
selected
from the default drive.

ELEMENTARY DOS COMMANDS

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:

ELEMENTARY DOS COMMANDS

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.

ELEMENTARY DOS COMMANDS

C:\>COPY A:*.*

B:*.*

Copies all files from 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.

ELEMENTARY DOS COMMANDS

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.

ELEMENTARY DOS COMMANDS

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 different from the source
file.
C:\>COPY STUDENT.DOC PUPIL.DOC

ELEMENTARY DOS COMMANDS

Combine the contents of several files


into one file :
C:\> 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.

ELEMENTARY DOS COMMANDS

DELETING FILES:
C:\> DEL biodata.doc

Deletes the file

C:\> DEL *.txt

Deletes all files with

C:\> DEL *.*

Deletes all the

BIODATA.DOC.

extension .TXT
files.

Files can be removed one at a time


or several files at a time by using

ELEMENTARY DOS COMMANDS

RENAMING FILES:
SYNTAX: REN OLD-NAME NEWNAME
C:\> REN STUDENT.99

STUDENT.00

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

C:\> REN *.99 *.00


The extension of all .99 files change to .00

ELEMENTARY DOS COMMANDS

DIPLAYING FILE CONTENTS :


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

CREATE A SMALL TEXT FILE USING


COPY
C:\> 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.

SUB-DIRECTORY
A sub-directory is a separate storage
location in the disk where files can be
stored.
This helps us to organize the files in
separate locations in the disk.

There can be several subdirectories in a


disk and the subdirectories are named

ROOT DIRECTORY

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

MARKS

ACCOUNT

TEXT

LETTER

OTHER

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

\ STUDENT

\ ACCOUNT

TEXT
\ TEXT

OTHER
\ OTHER

\ STUDENT\MARKS

MARKS

LETTER

\ TEXT\LETTER

CREATING SUBDIRECTORIES
Command : MD or MKDIR
MD
MD
MD
MD
MD
MD

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

CHANGING FROM ONE DIRECTORY


TO ANOTHER
Command : CD
C:\>CD \STUDENT
C:\STUDENT>=
C:\STUDENT>CD MARKS
C:\STUDENT\MARKS>=

CHANGING FROM ONE DIRECTORY


TO ANOTHER

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

COPYING FILES ACROSS


DIRECTORIES
C:\>COPY
\TEXT

\STUDENT\NOTES.TXT

Copies the file NOTES.TXT from the sub-directory


STUDENT to TEXT

C:\>COPY
\STUDENT\NOTES.TXT

\TEXT

FILE

SUB-DIRECTORIES

COPYING FILES ACROSS


DIRECTORIES

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

COPYING FILES ACROSS


DIRECTORIES
C:\>COPY *.DOC
\STUDENT\MARKS
Copies all the files with extension DOC from the root
directory to the sub-directory MARKS

C:\>COPY

\TEXT\LETTER\*.*

A:

Copies all files from the sub-directory LETTER to the


drive A

REMOVING SUBDIRECTORIES

Command : RD or RMDIR
We can not remove a sub-directory:
If it is not empty
Staying in the same sub-directory

REMOVING SUBDIRECTORIES
Objective: To delete Student
Directory
DEL \STUDENT\MARKS\*.*
RD \STUDENT\MARKS
DEL \STUDENT\*.*
RD \STUDENT

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

INTERNAL & EXTERNAL


COMMANDS
External commands are separate utility
programs that accompany the operating
system.
Typically the primary name of a program
file for a particular external command is
the same as the command itself and the
secondary name is either .COM or .EXE.
Example: TREE, FORMAT, LABEL, SYS,

EXTERNAL COMMANDS

TREE - To display the sub-directory


structure of a disk.

C:\> TREE C:\


Displays the sub-directory structure
starting from root directory.

EXTERNAL COMMANDS

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.

EXTERNAL COMMANDS

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

EXTERNAL COMMANDS

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

EXTERNAL COMMANDS

LABEL Adds or modifies the volume label


of the disk.

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

EXTERNAL COMMANDS

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.

EXTERNAL COMMANDS

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 entire contents of the
floppy in drive A: to the floppy in drive B:

EXTERNAL COMMANDS

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.

EXTERNAL COMMANDS

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.

EXTERNAL COMMANDS

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:

EXTERNAL COMMANDS

MORE Displays the output one screen at


a time instead of continuous scrolling.
This command does not have any function
alone & is always used with another
command. PIPING SIGN is given between
the command & MORE.

C:\> TREE C:\ | MORE


Displays the subdirectory structure
page-wise.

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.

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

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

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

= 185

32

= 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

= 255

=0

End of
Computer
Fundamentals

Potrebbero piacerti anche