Beruflich Dokumente
Kultur Dokumente
FUNDAMENTALS OF COMPUTING:
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.
The main features of Second Generation are:
Use of transistors
Reliable as compared to First generation computers
Smaller size as compared to First generation computers
Generate less heat as compared to First generation computers
Consumed less electricity as compared to First generation computers
Faster than first generation computers
Still very costly
A.C. needed
Support machine and assembly languages
IC used
More reliable
Smaller size
Generate less heat
Faster
Lesser maintenance
Still costly
A.C needed
Consumed lesser electricity
Support high level language
FUNDAMENTALS OF COMPUTING:
components of the computerfrom the central processing unit and memory to input/output
controlson a single chip.
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.
The main features of Fourth Generation are:
ULSI technology
Development of true artificial intelligence
Development of Natural language processing
Advancement in Parallel Processing
Advancement in Superconductor technology
More user friendly interfaces with multimedia features
Availability of very powerful and compact computers at cheaper rates
Components of a Computer
The five classic components of a computer are briefly described below.
3
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Datapath - manipulates the data coming through the processor. It also provides a small amount of
temporary data storage.
Control -
generates control signals that direct the operation of memory and the datapath.
Memory - holds instructions and most of the data for currently executing programs.
Input external devices such as keyboards, mice, disks, and networks that provide input to
the processor.
Output - external devices such as displays, printers, disks, and networks that receive data from
the processor.
Block Diagram of Computer its Various Components
Input: This is the process of entering data and programs in to the computer system. You should
know that computer is an electronic machine like any other machine which takes as inputs raw
data and performs some processing giving out processed data. Therefore, the input unit takes
data from us to the computer in an organized manner for processing.
4
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
2. Storage: The process of saving data and instructions permanently is known as storage. Data
has to be fed into the system before the actual processing starts. It is because the processing
speed of Central Processing Unit (CPU) is so fast that the data has to be provided to CPU with
the same speed. Therefore the data is first stored in the storage unit for faster access and
processing. This storage unit or the primary storage of the computer system is designed to do the
above functionality. It provides space for storing data and instructions.
The storage unit performs the following major functions:
All data and instructions are stored here before and after processing.
Intermediate results of processing are also stored here.
3. Processing: The task of performing operations like arithmetic and logical operations is called
processing. The Central Processing Unit (CPU) takes data and instructions from the storage unit
and makes all sorts of calculations based on the instructions given and the type of data provided.
It is then sent back to the storage unit. 4. Output: This is the process of producing results from
the data for getting useful information. Similarly the output produced by the computer after
processing must also be kept somewhere inside the computer before being given to you in human
readable form. Again the output is also stored inside the computer for further processing.
5. Control: The manner how instructions are executed and the above operations are performed.
Controlling of all operations like input, processing and output are performed by control unit. It
takes care of step by step processing of all operations inside the computer.
FUNDAMENTALS OF COMPUTING:
the help of operating system. System software just runs at the back so you dont need to bother
about it.
The system software provides an environment to run application software and it controls the
computer as well as the applications installed on the machine.
Application software
The subclass of a computer program which utilizes the capabilities of computer is called
application software. Application here means the application software and the implementation.
The example of application software programs includes media players, spreadsheets and word
processors. When multiple applications are packaged together then it is called application suite.
There is a common user interface in each application suite which makes it easier for the user to
learn different applications. In some cases, such as Microsoft Office, the various application
programs have the ability to interact with each other. This facility is very handy for the user. For
example, a user can embed the spreadsheet in a word processor using the application software.
Application software cannot run without the presence of system software.
Difference between system software and application software
System software gets installed when the operating system is installed on the
computer while application software is installed according to the requirements of
the user.
System software includes programs such as compilers, debuggers, drivers,
assemblers while application software includes media players, word processors,
and spreadsheet programs.
Generally, users do not interact with system software as it works in the
background whereas users interact with application software while doing different
activities.
A computer may not require more than one type of system software while there
may be a number of application software programs installed on the computer at the
same time.
System software can run independently of the application software while
application software cannot run without the presence of the system software.
Compiler: A Compiler translates high-level instructions directly into machine language.
Compiled programs generally run faster than interpreted programs.
A compiler reads, analyses and translates code into either an object file or a list of error messages
6
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Input Devices
Following are few of the important input devices which are used in Computer Systems
Keyboard
Mouse
Joy Stick
Light pen
Track Ball
Scanner
Graphic Tablet
Microphone
Magnetic Ink Card Reader(MICR)
Optical Character Reader(OCR)
Bar Code Reader
Optical Mark Reader
Keyboard
Most common and very popular input device is keyboard. The keyboard helps in inputting the
data to the computer.The layout of the keyboard is like that of traditional typewriter, although
there are some additional keys provided for performing some additional functions.
Keyboard are of two sizes 84 keys or 101/102 keys, but now 104 keys or 108 keys keyboard is
also available for Windows and Internet.
The keys are following
Sr. No. Keys
Description
1
Typing Keys
These keys include the letter keys (A-Z) and digits keys (0-9)
which are generally give same layout as that of typewriters.
7
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Numeric Keypad
Function Keys
Control keys
Mouse
Mouse is most popular Pointing device. It is a very famous cursor-control device. It is a small
palm size box with a round ball at its base which senses the movement of mouse and sends
corresponding signals to CPU on pressing the buttons.
Generally it has two buttons called left and right button and scroll bar is present at the mid.
Mouse can be used to control the position of cursor on screen, but it cannot be used to enter text
into the computer.
Advantages
Easy to use
Not very expensive
Moves the cursor faster than the arrow keys of keyboard.
8
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Joystick
Joystick is also a pointing device which is used to move cursor position on a monitor screen. It is
a stick having a spherical ball at its both lower and upper ends. The lower spherical ball moves in
a socket.TheJoystic can be moved in all four directions.
The function of joystic is similar to that of a mouse. It is mainly used in Computer Aided
Designing(CAD) and playing computer games.
Light Pen
Light pen is a pointing device which is similar to a pen. It is used to select a displayed menu item
or draw pictures on the monitor screen.It consists of a photocell and an optical system placed in a
small tube.
When light pen's tip is moved over the monitor screen and pen button is pressed, its photocell
sensing element detects the screen location and sends the corresponding signal to the CPU.
Track Ball
Track ball is an input device that is mostly used in notebook or laptop computer, instead of a
mouse. This is a ball which is half inserted and by moving fingers on ball, pointer can be moved.
Since the whole device is not moved, a track ball requires less space than a mouse. A track ball
comes in various shapes like a ball, a button and a square.
9
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Scanner
Scanner is an input device which works more like a photocopy machine. It is used when some
information is available on a paper and it is to be transferred to the hard disc of the computer for
further manipulation.
Scanner captures images from the source which are then converted into the digital form that can
be stored on the disc.These images can be edited before they are printed.
Digitizer
Digitizer is an input device which converts analog information into a digital form. Digitizer can
convert a signal from the television camera into a series of numbers that could be stored in a
computer. They can be used by the computer to create a picture of whatever the camera had been
pointed at.
Digitizer is also known as Tablet or Graphics Tablet because it converts graphics and pictorial
data into binary inputs. A graphic tablet as digitizer is used for doing fine works of drawing and
images manipulation applications.
10
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Microphone
Microphone is an input device to input sound that is then stored in digital form. The microphone
is used for various applications like adding sound to a multimedia presentation or for mixing
music.
11
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Output Devices:
Following are few of the important output devices which are used in Computer Systems
Monitors
Graphic Plotter
Printer
Monitors
Monitor commonly called as Visual Display Unit (VDU) is the main output device of a
computer. It forms images from tiny dots, called pixels, that are arranged in a rectangular form.
The sharpness of the image depends upon the no. of the pixels.
There are two kinds of viewing screen used for monitors.
Cathode-Ray Tube (CRT)
Flat- Panel Display
Cathode-Ray Tube (CRT) Monitor
In the CRT display is made up of small picture elements called pixels for short.The smaller the
pixels, the better the image clarity, or resolution.It takes more than one illuminated pixel to form
whole character, such as the letter e in the word help.
12
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
A finite number of character can be displayed on a screen at once.The screen can be divided into
a series of character boxes - fixed location on the screen where a standard character can be
placed.
The most screens are capable of displaying 80 characters of data horizontally and 25 lines
vertically. There are some disadvantage of CRT
Large in Size
High Power consumption
Emissive Displays - The emissive displays are devices that convert electrical energy into
light. Example are plasma panel and LED(Light-Emitting Diodes).
Non-Emissive Displays - The Non-emissive displays use optical effects to convert
sunlight or light from some other source into graphics patterns.Example is LCD(LiquidCrystal Device)
Printers
Printer is the most important output device, which is used to print information on paper.
There are two types of printers
Impact Printers
Non-Impact Printers
13
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Impact Printers
The printers that print the characters by striking against the ribbon and onto the paper, are called
impact printers.
Characteristics of Impact Printers are following
Character printers
Line printers
Character Printers:
Character Printers are printers which print one character at a time.
These are of further two types
Inexpensive
Widely Used
Other language characters can be printed
Disadvantages
Slow Speed
Poor Quality
14
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Daisy Wheel
Head is lying on a wheel and Pins corresponding to characters are like petals of Daisy(flower
name) that is why it is called Daisy Wheel Printer. These printers are generally used for wordprocessing in offices which require a few letters to be send here and there with very nice quality
representation.
Advantages
More reliable than DMP's
Better quality
The fonts of character can be easily changed.
Disadvantages
Slower than DMP's
Noisy
More expensive than DMP's
Line Printers
Line printers are printers which print one line at a time.
Drum Printer
Chain Printer
15
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Drum Printer
This printer is like a drum in shape so it called drum printer. The surface of drum is divided into
number of tracks. Total tracks are equal to size of paper i.e for a paper width of 132 characters,
Drum will have 132 tracks. A character set is embossed on track. The different characters sets
are available in market 48 character set, 64 and 96 characters set.One rotation of drum prints one
line. Drum Printers are fast in speed and speed in between 300 to 2000 lines per minute.
Advantages
Disadvantages
Very expensive
Characters fonts can not be changed
Chain Printer
In this printer chain of character sets are used so it called Chain Printers.A standard character set
may have 48, 64, 96 characters.
Advantages
Disadvantages
Noisy
Do not have the ability to print any shape of characters.
Non-impact Printers
The printers that print the characters without striking against the ribbon and onto the paper, are
called Non-impact Printers. These printers print a complete page at a time, also called as Page
Printers.
These printers are of two types
Laser Printers
Inkjet Printers
16
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Laser Printers
These are non-impact page printers. They use laser lights to produces the dots needed to form the
characters to be printed on a page.
Advantages
Very high speed.
Very high quality output.
Give good graphics quality.
Support many fonts and different character size.
Disadvantage
Expensive.
Cannot be used to produce multiple copies of a document in a single printing.
Inkjet Printers
Inkjet printers are non-impact character printers based on a relatively new technology. They print
characters by spraying small drops of ink onto paper. Inkjet printers produce high quality output
with presentable features.
They make less noise because no hammering is done and these have many styles of printing
modes available. Colour printing is also possible. Some models of Inkjet printers can produce
multiple copies of printing also.
Advantages
Disadvantages
17
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
RAM
ROM
PROM
EPROM
EEPROM
18
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
19
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Floppy Disk
Floppy Disks were an were a ubiquitous form of data storage between 1980's and early 2000's,
However they have now been superseded by data storage methods with much greater capacity,
such as USB flash drives. Floppy disks comes in 3 sizes: 8-inches, 5.5-inches and 3.5-inches.
The capacities of Floppy disks vary between 1-250 Megabytes and these devices were very slow,
reading data at rates of bytes and kbytes/second. However, most are very small and portable.
Hard Disk
The hard disk drive is the main, and usually largest data storage device in a computer. It is a nonvolatile, random access digital magnetic data storage device. A hard drive is made up of platters
which stored the data, and read/write heads to transfer data. A Hard Drive is generally the fastest
of the secondary storage devices, and has the largest data storage capacicity, approximately the
same as Magnetic Tapes. Hard drives however, are not very portable and are primarily used
internally in a computer system. Some persons use hard drives externally as a form of storage
and as a substitute for portable storage, hard drives used for these purposes are called external
hard drives.
A Hard Disk is divided into tracks and sectors, Data on this hard disk is positioned into these
tracks and sectors so they can be easily read by the heads and also to help reduce fragmentation
on the hard disk. Below are 2 diagrams depicting how a hard disk is divided into tracks and
sectors:
20
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Data
on
a
hard
drive
are
accessed
by
two
methods:
1. Fixed Head: Hard Disks with fixed heads have a read/write head for each track on the hard
disk, since there is no moving of heads to access data, the data access time is generally faster for
Fixed
head
Hard
Drives.
2. Moving Head: A moving head hard disk is one in which one or more read-write heads are
attached to a movable arm which allows each head to cover many tracks of information
Optical Disks
Optical disk is an electronic data storage medium from which data is read and written to by using
a low-powered laser beam. It is flat, circular, plastic or glass disk on which data is stored in the
form of light and dark pits. There are three basic types of optical disks: Read-only optical disks,
Write once read many Optical disks and Rewritable Optical disks. Two main types of optical
disks are:
CD - is an abbreviation of compact disk, and is a form of data storage that can transfer data up to
the speed of 7800 KB/s. A standard 120 mm CD holds up to 700 MB of data, or about 70
minutes of audio. There are two types of CD: CD-ROM and CD-RW, CD-ROM are stands for
CD-Read Only Memory and they function the same way Read Only Memory Does. CD-RW
Stards for CD-Rewritable, these disks can be erased and rewritten at any time.
DVD: is an abbreviation of Digital Versatile Disc, and is an optical disc storage media format
that can be used for data storage. The DVD supports disks with capacities of 4.7 GB to 17 GB
and access rates of 600 KBps to 1.3 MBps. A standard DVD disc store up to 4.7 GB of data.
There are two types of DVD's: DVD-ROM and DVD-RW. DVD-ROM are stands for DVDRead Only Memory and they function the same way Read Only Memory Does. DVD-RW Stards
for DVD-Rewritable, these disks can be erased and rewritten at any time.
21
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Flash Drive
A flash drive is a small external storage device, typically the size of a human thumb that consists
of flash memory. USB flash drives are removable and rewritable reads and writes to flash
memory. They are a solid-state storage medium that's both inexpensive and durable. Currently,
USB 2.0 flash drives on the market are able to reach a data transfer speed of 480 Mbit/s and USB
3.0 has transmission speeds of up to 5 Gbit/s. USB Flash drives vary in sizes from 8 Megabytes
to 512 Gigabytes. More commonly used sizes vary from 2 Gigabytes -16 Gigabytes.
DOS Commands
Microsoft Disk operating system, MS-DOS is a non-graphical command line operating system
created for IBM compatible computers that was first introduced by Microsoft in August 1981
and was last updated in 1994 when MS-DOS 6.22 was released.
DOS Commands are divided into 2 types:
22
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
1. Internal Commands
These are for performing basic operations on files and directories and they do not need
any external file support.
2. External Commands
These external commands are for performing advanced tasks and they do need some
external file support as they are not stored in COMMAND.COM
INTERNAL COMMANDS
1.
2.
3.
4.
5.
6.
These are those commands which are contained in command.com files of MS-DOS.
These are those functions that are built into the command interpreter.
There is no need of any external file in computer to read internal MS-DOS command.
These commands can be used as long as DOS is running on the system.
Internal commands do not vary from system to system.
These are ver, time, del, md, cd, copy con, cls, date, vol, ren, copy etc.
EXTERNAL COMMANDS
1.
2.
3.
4.
23
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
If you type DATE without parameters then it displays current date and prompts to enter
new date. We should give new date in mm-dd-yy format. If you want to keep the same
date just Press ENTER. DATE command with /T switch tells the command to just output
the current system date, without prompting for a new date.
2. TIME
This
command
is
used
The syntax is: TIME [/T | time]
to
displays
or
set
the
system
time.
Same as DATE command, typing TIME with no parameters displays the current time and
a prompt for a new one. Press ENTER to keep the same time. TIME command used with
/T switch tells the command to just output the current system time, without prompting for
a new time.
3. COPY CON
It is used to create a file in the existing directory. Here CON is a DOS reserved word
which
stands
for
console.
Syntax is: COPY CON filename after that press Enter and start typing your text and
after you're done typing your text, to save and exit hit F6 key.
4. TYPE
24
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
This command is used to display the contents of a text file or files. The syntax is: TYPE
[drive:][path]filename
Now, lets try to display the contents of the file named filename we've created earlier
using COPY CON command.
5. CLS
It is used to clear the screen. Syntax is CLS
6. REN
This command is
Syntax
is:
used to
REN
file
or files.
filename2.
Here, filename1 is source file for which you wanted to change the name, and filename2
will obviously becomes your new file name. Also note that you cannot specify a new
drive or path for your destination file.
7. DIR
This command displays a list of files and subdirectories in a directory. Syntax is: DIR
[drive:] [path] [filename]
[/A[[:]attributes]] [/B] [/C] [/D] [/L]
[/N] [/O[[:]sortorder]] [/P] [/Q]
[/S] [/T[[:]timefield]] [/W] [/X] [/4]
Here,
25
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
/A:attributes
/B
/C
Using this attribute with dir by default displays the thousand separator
in file sizes. To disable display or separator use /-C
/D
/L
/N
Display in new long list format where filenames are on the far right.
/O:sortorder
/P
/Q
/S
T:timefield
This sorts and displays the list based on time field specified. C for
Creation, A for Last Access, W for Last Written
/W
/X
This is used to display the short names generated for non-8dot3 file
names.
26
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Note that switches may be different in the DIRCMD environment variable, in which case
just override present switches by prefixing any switch with - (hyphen), for example
instead of using /P use /-P
8. PATH
This command displays the path that how we have come to the present position or sets a
search
path
for
executable
files.
Its
Syntax
is
PATH [[drive:]path[;...][;%PATH%]]
Typing PATH without any parameters displays the current path under current directory.
Typing PATH ; clears all search-path settings and direct cmd.exe to search only in the
current directory. And including %PATH% in the new path setting causes the old path to
be appended to the new setting.
9. VER
This command displays the version of the Microsoft Windows running on your computer.
10. VOL
It displays the disk volume label and serial number, if they exist for the drive specified. If
no
drive
is
specified
it
displays
for
the
active
drive.
Syntax is VOL [drive:]
11. DEL/ERASE
Used
Syntax
Here,
is
to
DEL
delete
[/P]
[/F]
one
[/S]
or
[/Q]
more
[/A[[:]attributes]]
files.
names
tr>
27
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
names
Specifies a list of one or more files or directories. Wildcards * and ? may be used to
delete multiple files. * indicates group of unknown characters whereas using
wildcard ? in file-names is for single unknown character. And using this command
if a directory is specified, all files within the directory will be deleted.
Prompts
for
(Y)es/(N)o
confirmation
before
deleting
each
/P
file.
/F
/S
Delete specified files from all subdirectories. If Command Extensions are enabled
DEL and ERASE change while using /S switch such that it shows you only the files
that are deleted, not the ones it could not find.
/Q
Delete files based on specified attribute. The attributes are: R for Read-only files, S
/A:attributes for System files, H for Hidden files, A for files ready for archiving and - Prefix
meaning not.
12. COPY
This command is useful in copying one or more files to another file or location. Syntax is
COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/A | /B ] source [/A | /B] [+ source [/A |
/B]
[+
...]]
[destination
[/A
|
/B]]
The different switches that can be used with this command as follow along with their use.
source
/A
/B
/D
28
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
destination This specifies the directory and/or filename for the new file or files.
/V
/N
Specifying this switch uses short filename, if available, when copying a file with a
non-8dot3 file name.
/Y
If destination file already exists, this switch suppresses prompting to confirm you
want to overwrite it and does it asap.
/-Y
Contrary to above switch, this causes prompting to confirm you want to overwrite an
existing destination file.
/Z
For appending multiple files for source use wildcard or file1+file2+file3 format and make
sure to specify a single file for destination.
13. MD, CD and RD
o MD (or MKDIR) command stand for make directory and it is used to create a
directory. Syntax is MD [drive:]path
CD (or CHDIR) stands for create or change directory and it allows to display the
name of or change the current directory or rather we can say come out of a
directory.
Syntax
is
CD
[/D]
[drive:][path]
Typing CD drive: displays the current directory in the specified drive. This CD
(or CHDIR) command does not treat spaces as delimiters due to which it allows to
CD into a subdirectory name that contains a space without surrounding the name
with
quotes.
For
example:
CHDIR
\program
files\mozilla
firefox
is
the
same
as:
CHDIR
"\program
files\mozilla
firefox"
If you type CD without any parameters it displays current drive and directory.
CD.. specifies that you want to change to the higher directory in the current path.
Whereas, using CD\ you can directly change to parent/root directory from any
29
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
location
in
the
current
drive.
is
used
is
to
modify
Using switch /B you can force the edit in monochrome mode. /H displays the maximum
number of lines possible for your system hardware. Whereas using /R and /S one can load
files in read-only mode and force the use of short filenames respectively. [filename(s)] is
used to specify file(s) to go edit. You can use wildcards (* and ?) to specify multiple
files.
2. XCOPY
This command is used to copy files and directory trees from one disk to another disk.
Syntax is XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]]
[/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O]
[/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1[+file2][+file3]...]
30
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
3. LABEL
It is used to
Syntax
LABEL [/MP]
create,
is
volume
label of a disk.
[drive:] [label]
[label]
Here, [drive:] is for secifying the drive letter of a drive to be labelled and [label] specifies
the label of the volume disk. [/MP] is used to specify that the volume should be created as
a mount point and [volume] is used to specify volume name, usually mentioned after
drive letter followed by colon and then giving volume name required.
4. DISKCOPY
This command copies the contents of one floppy from the source drive to a formatted or
un-formatted floppy disk in the destination drive. This command copies the data from
particular position on the source disk to exactly the same position on the destination disk.
Syntax
Diskcopy A: B:
copies contents of A: to B: drive. This command can be used with /V switch which
verifies that the disk is copied correctly.
5. CHKDSK
This command is used to check a disk and display a status report with properties of disk
like serial number, volume label, memory and other properties along with errors on the
disk
if
any.
Syntax is CHKDSK [volume path] [/F] [/V] [/R] [/X] [/I] [/C] [/L[:size]]
[volume path] is where you specify the drive letter followed by a colon and volume name
to be checked. using /F switch allows you to fix errors on the disk. /V display full path
and/or cleanup message if any. /R is used in tandem with /F and used to locate bad
sectors and recover readable information. If you wanted to perform a less vigorous check
of index entries on the disk then the right option is to use /I or /C rather then /R as they
skip checking of cycles on the volume and helps in reducing the amount of time required
to run chkdsk. Using /X forces the volume to dismount first before checking is
performed. /L:size is all about specifying the log file size in kilobytes.
6. TREE
This command is very useful to view the list of directories and subdirectories present on
the disk in graphical form. If you wanted to include files also with directories and
subdirectories, then you'll have to give the command line as tree/f which presents the tree
31
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
view of all the content on your disk. Here is the syntax for this command with allowed
switches:
TREE
[drive:path]
[/F]
[/A]
In case you wanted use ASCII instead of extended characters, then go ahead include /A in
the command line.
7. DELTREE
This command is used to remove a directory along with its contents.
Syntax
is
deltree
[drive:path]
here, [drive:path] specifies the directory name to be deleted. All the subdirectories and
files in this directory will be deleted without prompt and there's not getting back. So,
keep caution while using this command.
8. DOSKEY
This command is generally used to edits command lines and recalls commands.
Syntax
is
DOSKEY [/REINSTALL] [/HISTORY] [text]
Here, /REINSTALL installs new copy of doskey, /HISTORY is used to display all
previously given commands stored in memory. And [text] specifies the commands you
want to record.
9. FIND
This command searches for a specific text string in a file or files. Syntax is FIND [/V]
[/C]
[/N]
[/I]
[/OFF]
"string"
[[drive:][path]filename[
...]]
The basic essential elements in the command line for find are - the string enclosed in " "
and [[drive:][path]filename(s)]. String specifies the text string to find in the file and
[[drive:][path]filename(s)] specifies the file or files where the text string search is to be
done. If a path is not specified, FIND searches the text typed at the prompt or piped from
another command. When you append /OFF in the command line, it searches and finds
even those files with offline attribute set. Apart from searching the text string, this
command is useful in:
o
o
o
10. SORT
32
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
This command is used to arrange the data of a file in alphabetical order (A-Z, 0-9) or
reverse
alphabetical
order.
Syntax is SORT [/R] [[drive1:][path1]filename1]
[drive3:][path3]filename3]
/R in command line reverses the sort order; that is, the data of the specified file sorts sorts
Z to A, then 9 to 0. [drive1:][path1]filename1 specifies the file to be sorted.
/T [drive2:][path2] is used in cases of data overflow in main memory and it specifies the
path of the directory to hold the sort's working storage. And /O [drive3:][path3]filename3
specifies the file where the sorted input is to be stored.
11. FORMAT
This command creates a new root directory and a File Allocation Table (FAT) for the
disk. In order for MS-DOS to be able to use a new disk you must use this command to
format the disk.
FORMAT with /S switch
When the disk is formatted with /s option, the disk can be used as a booting disk.
C:\>DOS>Format
A:
/s
The above command copies the OS files MSDOS.SYS, IO.SYS and COMMAND.COM
which are required for booting the machine from your system startup drive to the newly
formatted disk. The disk can then be used for booting.
FORMAT with /U switch
Here's
the
command
C:\DOS>Format
A:
/U
This command specifies an Unconditional Format which destroys all existing data and
prevents you from later unformatting the disk.
FORMAT with /Q switch
This can be used only with the previously formatted disk. This deletes FAT, Root
directory and data of disk but doesn't scan for the bad errors. This is generally used for
Quick
formatting.
Warning As Format command deletes all existing data, use this command with extreme
caution. Any disk formatted (except with /U switch) may be later unformatted using the
UNFORMAT command.
33
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
12. BACKUP
The Backup command backs up one or more files from one disk to another. You can
backup files onto either a hard disk or on a floppy disk. Syntax is
BACKUP Source Destination
Here source specifies the location of files to be backed up and destination drive specifies
the drive on which you want to store the backup files. The backed-up files are stored in
backup.nnn and control.nnn files where nnn represents the backup disk number.
Backup with Switches
o
The /S switch can be used to backup the contents of all files in the source
including the contents of sub-directories.
The /N switch can be used to backup only those files that have changed since the
last backup.
Backup command with /D:mm-dd-yyyy switch will backup files that have
changed since the data specified.
13. RESTORE
o
The RESTORE command restores files that were backed up by using BACKUP
command.
Syntax:
RESTORE drive1 drive2:path
Here drive1 specifies the drive on which backup files are stored.
drive2:path specifies the path to which those backup files will be restored.
Using backup command with /S switch is used to restore all backup files to their
original directories and sub-directories.
Introduction to flowcharts
A flowchart is a graphical representation of an algorithm. These flowcharts play a vital role in
the programming of a problem and are quite helpful in understanding the logic of complicated
and lengthy problems. Once the flowchart is drawn, it becomes easy to write the program in any
high level language. Often we see how flowcharts are helpful in explaining the program to
others. Hence, it is correct to say that a flowchart is a must for the better documentation of a
complex program.
34
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
Input x
Steps:
Input y
1.
2.
3.
4.
5.
input x
input y
sum = x + y
average = sum /2
output average
Sum = x + y
Average = sum/2
Output
Average
35
END
1st Sessional Notes
FUNDAMENTALS OF COMPUTING:
or
e. Only one flow line should enter a decision symbol, but two or three flow lines, one for
each possible answer, should leave the decision symbol.
h. If the flowchart becomes complex, it is better to use connector symbols to reduce the
number of flow lines. Avoid the intersection of flow lines if you want to make it more
effective and better way of communication.
i. Ensure that the flowchart has a logical start and finish.
j. It is useful to test the validity of the flowchart by passing through it with a simple test
data.
36
1st Sessional Notes