Computer Applications
Computer Applications
Table of Contents
Page
Chapter 1
Introduction . . . . . . . . 3
Data Representation in a Computer . . . . 3
Time in the Computer World . . . . . 4
Computer Generations . . . . . . 4
Chapter 2
Computer Hardware . . . . . . . 8
Peripheral Devices . . . . . . . 8
The Storage Pyramid. . . . . . . 16
The central processing Unit. . . . . . 18
Computer Performance. . . . . . . 17
Types of Instructions. . . . . . . 18
The Clock . . . . . . . . 18
Memory Measurement . . . . . . 19
Categories of Computers . . . . . . 19
Selecting Computer Technology . . . . . 21
Chapter 3
Computer Software . . . . . . . 22
System Software . . . . . . . 22
Application Software . . . . . . 26
Database and File Systems . . . . . . 32
Database Structures . . . . . . . 36
Chapter 4
Data communications and Networks . . . . 39
Networks Components. . . . . . . 39
Peer to Peer model . . . . . . . 40
Client server model . . . . . . . 41
Network Topologies. . . . . . . 41
Network Types . . . . . . . 45
Developments in Information Technology. . . . 50
Data and Information Movements . . . . . 51
Chapter 5
Computer Security . . . . . . . 52
Security in Architecture . . . . . . 54
Chapter 6
Computer Viruses . . . . . . . 57
Computer Virus Symptoms. . . . . . 58
How Viruses Spread. . . . . . . 58
Help Prevent Computer Viruses . . . . . 59
Chapter 7
Data Protection Act And legal Issues . . . . 60
1
Introduction to Computers
Chapter 8
Computer Ergonomics Health and Safety . . . . 63
Computer Related Injuries . . . . . . 63
Chapter 9
Introduction to MS-DOS . . . . . . 69
Essential Components of DOS . . . . . 69
The BIOS . . . . . . . . 70
Simple MS_DOS Commands . . . . . 77
References . . . . . . . . . 96
2
Introduction to Computers
Chapter 1
1.1 Introduction
1.1.2 Computer
A computer is an electronic device that receives input, stores and manipulates data, and
provides output in a useful format. It does all that it does by following a program stored
in its own memory (the store program concept). Although mechanical examples of
computers have existed through much of recorded human history, the first electronic
computers were developed in the mid-20th century (1940–1945). These were the size of a
large room, consuming as much power as several hundred modern personal computers
(PCs). Modern computers based on integrated circuits are millions to billions of times
more capable than the early machines, and occupy a fraction of the space. Simple
computers are small enough to fit into small pocket devices, and can be powered by a
small battery. Personal computers in their various forms are icons of the Information Age
and are what most people think of as "computers". However, the embedded computers
found in many devices from MP3 players to fighter aircraft and from toys to industrial
robots are the most numerous.
Combinations of zeros and ones are converted to languages that we can understand
through the use of the EBCDIC (Extended Binary Coded Decimal Interchange Code) or
ASCII (American Standard Code for Information Interchange).
3
Introduction to Computers
There is literally nothing you can do faster than the typical computer. Computers operate
on nanoseconds (billionth of a second). You just can't beat them. And every year they get
faster and faster, and able to process more and more operations per second. Every time
we think manufacturers have maximized the computer's capabilities, they surprise us and
create even faster, more powerful machines.
The ENIAC used thousands of vacuum tubes, which took up a lot of space and gave off a
great deal of heat just like light bulbs do. The ENIAC led to other vacuum tube type
computers like the EDVAC (Electronic Discrete Variable Automatic Computer) and the
UNIVAC I (UNIVersal Automatic Computer).
4
Introduction to Computers
of the computers and were long lasting and reliable as well. Storage improved with the
introduction of magnetic disk storage and magnetic cores for main memory. High speed
card readers, printers and magnetic tapes were also introduced. The measure of time was
in microseconds. Just the same as first generation, a particular computer was designed to
process either scientific or business oriented problems but not both. Programming the
computer improved from machine language to Assembly language. This allowed the
programmers to use mnemonics (natural language like instructions) operation codes for
instruction operation and symbolic names for storing variables. Compilers (more natural
language like instruction) were also introduced.
The third generation computers could carry out instructions in billionths of a second
(nanoseconds) New mass storage, such as the data cell, was introduced during this
generation boosting storage capacity to megabytes. Drum and disk capacity and speed
was improved. Portable disk pack and high-density magnetic tapes came into use.
Applications using online processing, real-time processing, time-sharing, multiprocessing
and teleprocessing became widely accepted.
5
Introduction to Computers
Instead of punched cards and printouts, users interacted with the third generation
computers through keyboards and monitors and interfaced with an operating system,
which allowed the device to run many different applications at one time with a central
program that monitored the memory and input-output devices. Computers for the first
time became accessible to a mass audience because they were smaller and cheaper than
their predecessors
However what really triggered the tremendous growth of computers and its significant
impact on our lives is the invention of the microprocessor. Intel Corporation Company
invented a chip the size of a pencil eraser that could do all the computing and logic work
of a computer. The microprocessor was made to be used in calculators, not computers. It
led, however, to the invention of personal computers, or microcomputers. On the other
side the Motorola started producing the MC68XX series of microprocessors. This led to
the development of the Apple Macintosh computers, which is a competitor to Intel
Corporation.
The major thrust of this generation was based on Artificial Intelligence. Voice
recognition, machine vision, and machine perception. Computers that could recognize
and respond to natural language input and are capable of learning and self-organization.
6
Introduction to Computers
This present generation has platform from the many gains in parallel computing, both in
the hardware area and in improved understanding of how to develop algorithms to exploit
diverse, massively parallel architectures. Parallel systems now compete with vector
processors in terms of total computing power and most expect parallel systems to
dominate the future!
Pervasive computing goes beyond the realm of personal computers: it is the idea that
almost any device, from clothing to tools to appliances to cars to homes to the human
body to your coffee mug, can be imbedded with chips to connect the device to an infinite
network of other devices. The goal of pervasive computing, which combines current
network technologies with wireless computing, voice recognition, Internet capability and
artificial intelligence, is to create an environment where the connectivity of devices is
embedded in such a way that the connectivity is unobtrusive and always available.
7
Introduction to Computers
Chapter 2
Computer System
If you use a desktop computer, you might already know that there isn't any single part
called the "computer." A computer is really a system of many parts working together to
achieve a specific objective. A computer system has basically five (5) classes or
categories of essential components or elements i.e. input devices, CPU output devices,
secondary storage and primary storage.
8
Introduction to Computers
Keyboard
There are many alternatives to keyboard layouts. These are distinguished by the
arrangement of letters on the keys. The common layout is the QWERTY. Looking at any
keyboard and checking the arrangement of letters, the probability that the arrangement of
letters is following a QWERTY format is very high. The notable alternative to the
QWERTY layout is the DVORAK layout, which has proved to allow much faster speeds
with a higher degree of accuracy. However this is not common as many users are already
familiar with QWERTY.
Mouse
Allows the recording of relative positions, used to control a number of graphical pointing
devices, One, two or three buttons are common.
Joy Stick
Used mainly for interacting with games, the joystick allows the recording of relative
movements in any direction, along with the transmission of game switches.
Digitizing/Graphics Tablet
Graphic artists usually find a Mouse to be an unnatural drawing tool. A pressure sensitive
surface that can be drawn on using a stylus is a popular alternative. Digitising tablets are
able to translate the relative position of the stylus into a set of XY coordinates that can
then control a pointing device on a graphical system.
Scanner
Flat-Bed and Hand Held scanners are common and are, available in monochrome and full
colour. Mono scanners sample the image they are given at pre-determined resolutions;
producing a stream of binary data that breaks the image into scan lines of pixels. Colour
scanners typically scan the image taking 3 or 4 readings at a time, each pass detecting the
relative intensities of each of the colours RED, GREEN, BLUE, then combining that data
into a colour image bit stream for display.
9
Introduction to Computers
Digital Scanner
Digital scanner technology extends far beyond the page scanners attached to personal
computers or used in offices. The scanners grocery stores use at the checkout counter are
a great example of this technology. Bar Code Readers are also typical of the ability of
technology to increase human productivity. (eg SHOPRITE and MACRO) The biggest
benefit of this technology lies in the fact that input errors are greatly reduced. The
computer reads what is there and processes it. If an error occurs, which does happen in
groceries about 5 % of the time, it isn't because of the computer. It's because the human
programming the computer made a mistake.
Microphone
Sound cards are capable of sampling audio data at very high rates, converting analogue
sound waves into digital sound bytes. Microphones can be used in the place of mice and
other input devices for those with mobility problems, for dictation and music mixing etc.
Voice Recognition
The latest trend for input devices is voice recognition. This technology allows you to put
data into a computer using a combination of a microphone headset and software on your
computer that recognizes your voice. You speak into the microphone and the software
interprets your voice and records your words. You can also use this technology to execute
commands on your computer, such as "Save this file" or "Print this document."
The software associated with voice recognition technology is very complex because no
two people speak alike. We all have accents, voice inflections, slang words, or even
colds that change the tone of our voice. When you initially use voice recognition
software, you have to "train" the computer to recognize your voice and all of its
characteristics. It typically takes 2 to 3 hours for the initial training with additional
training as you continually use the software. In essence, you build your own dictionary of
words that are unique to you.
Touch Screens
Touch screens are also becoming more common for general usage. Touch screens have
been used in ATM banking machines for years. Now they are coming to a screen near
you – cell phone, computer, television or other household appliances.
10
Introduction to Computers
The most common output device is the monitor or VDU which produces a soft copy of
the work produced on a computer. It displays the results of processing, and responses by
the computer. Modern monitors are usually Liquid Crystal Displays (LCD) or Thin Film
Transistors (TFT) monitors. Older monitors are Cathode Ray Tube (CRT) monitors.
The Printer
A printer is an output device that produces text and graphics on paper. It produces a hard
copy of work produced on a computer.
Types of Printers
Printers can be divided into two main groups, impact printer and non-impact printer.
Impact printer produces text and images when tiny wire pins on print head strike the ink
ribbon by physically contacting the paper. Non-impact printer produces text and graphics
on paper without actually striking the paper.
Printers can also be categorized based on the print method or print technology. The most
popular ones are inkjet printer, laser printer, dot-matrix printer and thermal
printer. Among these, only the dot-matrix printer is an impact printer and the others are
non-impact printers.
Some printers are named because they are designed for specific functions, such as photo
printers, portable printers and all-in-one/multifunction printers. Photo printers and
portable printers usually use inkjet print method whereas multifunction printers may use
inkjet or laser print method.
Laser printers are quite expensive to buy and run but produce a high quality
output and are quiet and fast.
Ink-jet printers offer black and white or colour printing with reduced levels of
quality and speed. Colour ink jet printers are cheaper to buy than colour laser
printers.
Dot matrix printers are not so common today. They are comparatively noisy and
low quality but are cheap to run and are used when carbon copies or duplicates
need to be made, such as for wage slips. Also, they are useful in dirty
environments such as a garage because they are much sturdier than the other two
types of printer.
11
Introduction to Computers
Plotters
A plotter can be used to produce high quality, accurate, A3 size or bigger drawings. They
are usually used for Computer Aided Design (CAD) and Computer Aided Manufacture
(CAM) applications, such as printing out plans for houses or car parts.
USB flash drives also are called thumb drives, memory sticks, jump drives, pen drives,
key drives, tokens, or simply USB drives.
Floppy Disk
Fig. 7 Diskettes
A reusable magnetic storage medium introduced by IBM in 1971. It was called a floppy
because the first varieties were housed in bendable jackets. Woefully undersized for
today's use, it is no longer standard equipment on computers. However, until the early
12
Introduction to Computers
1990s, the floppy was the primary method for distributing software and was widely used
for backup. By the mid-1990s, it had mostly given way to the CD-ROM.
Also called a "diskette," the floppy is a flexible circle of magnetic material similar to
magnetic tape, except that both sides are used. The drive grabs the floppy's center and
spins it inside its housing. The read/write head contacts the surface through an opening in
the plastic shell or envelope. Floppies rotate at 300 RPM, which is from 10 to 30 times
slower than a hard disk. They are also at rest until a data transfer is requested. Following
are the three types developed, from newest to oldest, and their raw, uncompressed storage
capacity.
Housing Capacity
3.5" rigid 1.44MB
3.5" rigid 2.88MB
5.25" flexible 1.2MB
8" flexible 500KB
Although floppy disks look the same, what is recorded on them determines their capacity
and compatibility. Every new floppy must be "formatted," which records the sectors on
the disk that hold the data.
Hard Disks
These are permanent storage devices. Hard disks are much faster and provide much
greater storage than floppy disks. They are used to store programs and large amounts of
data. The data is stored in circular tracks which are concentric tracks subdivided into
units called sectors. The capacity can range from several Megabytes to more than a
hundred Gigabytes.
When you save data or install programs on your computer, the information is typically
written to your hard disk. The hard disk is a spindle of magnetic disks, called platters,
that record and store information. Because the data is stored magnetically, information
recorded to the hard disk remains intact after you turn your computer off.
The hard disk is housed inside the hard drive, which reads and writes data to the disk.
The hard drive also transmits data back and forth between the CPU and the disk. When
you save data on your hard disk, the hard drive has to write thousands, if not millions, of
ones and zeros to the hard disk. It is an amazing process to think about, but may also be a
good incentive to keep a backup of your data
13
Introduction to Computers
rate, decrease the seek time, and automatically backup data. RAID can provide up to
more than 7 Terabytes of storage capacity.
The advantage of multiple disks is that if any single disk fails, the data is transferred to a
neighboring disk (concept of disk mirroring) and the system continues to operate without
loss of data. It supports hot swapping. Multiple disks can be accessed simultaneously
which makes reading from and writing to the RAID system very fast. Hard disks provide
bulk storage of data. However for offline storage magnetic tapes, floppy disks, opto-
magnetic disks can be used. These can be evaluated using the following, data access
speed, storage capacity, reliability, data transfer rate, cost per storage unit etc.
Optical Disks
While floppy and hard disks use magnetic charges to represent data and programs, optical
storage uses reflected light there are two types of optical disks:
Compact Discs
Compact Disc; most commonly used optical disc. The typical capacity is 650 MB. There
are three basic types:
i. CD-ROM (Compact Disc Read Only Memory): Used to distribute large
databases, references, archival and application packages
ii. CD-R: also known as WORM (Write Once, Read Many) used to create custom
music CDs and to archive data
iii. CD-RW: reusable; used to create and edit large multimedia presentations
Digital Versatile Disc; also known by the acronym DVDs are high capacity storage
devices. The typical capacity of DVD is 4.7 Gigabytes for a single layer single side
device. There are three basic types:
i. DVD-ROM: used to distribute full-length feature films with theatre quality video
and sound
ii. DVD-R: expected to replace CD-R as prices decline
iii. DVD-RAM and DVD-RW: reusable DVDs used to develop very large-scale
multimedia projects.
Magnetic Tape
Sequential-access storage medium, used to back up or duplicate data and programs
There are two types:
Magnetic Tape Streamers: Known as backup tape cartridge units, they use tape cartridges
to back up hard disks in microcomputers. DAT (digital audiotape) is a high capacity,
advanced technology for magnetic tape
Magnetic Tape Reels: Used to back up minicomputer and mainframe storage devices.
The tape is run on magnetic drives or magnetic tape units
14
Introduction to Computers
Primary storage, also known as main storage or memory, is the main area in a computer
in which data is stored for quick access by the computer's processor. On today's smaller
computers, especially personal computers and workstations, the term random access
memory (RAM) - or just memory. Primary memory is divided into two types: the
Random Access Memory (RAM) and Read Only Memory (ROM).
Every time you use a personal computer, the Operating System software and
Applications software that you use must be moved from the hard drive (secondary
storage) to the primary storage area called Random Access Memory (RAM).
If your personal computer starts to run slower and slower over time, it could be because
your programs are requiring more space in the RAM memory than you have available.
The slang term is "RAM Cram." That is, you are trying to cram too many instructions
into too little RAM and your computer just slows down as it moves instructions back and
forth between primary and secondary storage. Sometimes, instead of buying a whole new
computer, you can significantly improve the performance of your current computer by
increasing the amount of RAM. It's relatively cheap and easy to do so.
Features of RAM
It holds data and programs that are currently in use.
It a very limited capacity
It is volatile i.e. it only holds data while the power is on.
Data can be read and written to.
It is the main part of primary memory.
ROM memory is non-volatile. It has the ability to retain data and programs forever, even
after a power failure. The data and instructions necessary when the power is first
switched on are usually stored in ROM.
15
Introduction to Computers
Features of ROM
It is non-volatile i.e. its contents are retained even when the power is lost.
It is used during start up (Basic Input/Output System- BIOS)
It contains some device drivers
It is a small portion of Main memory.
Registers
Disks
Tapes
The Processor
The processor as its name suggests is the unit that does the work of the computer system
i.e. it executes computer programs. Software is composed of instructions, which are
executed (obeyed) by the processor. These instructions tell the processor when and what
to read from a keyboard; what to display on a screen; what to store and retrieve from a
disk drive and so on. A computer program is a set of such instructions that carries out a
meaningful task. A processor can do arithmetic, compare numbers and perform
input/output (read information and display or store it) operations. It has no magical
powers.
16
Introduction to Computers
In addition to the ALU and CU, the processor has a small number (usually less than 100)
of storage locations (REGISTERS) to store information that is currently being processed.
Depending on the processor, a register may typically store 8, 16, 32 or 64 bits. The
register size of a particular processor allows us to classify the processor. Processors with
a register size of n-bits are called n-bit processors, so that processors with 8-bit registers
are called 8-bit processors, similarly there are 16-bit, 32-bit and 64-bit processors. An n-
bit processor is said to have an n-bit word size so a 32-bit processor has a 32-bit word
size. The greater the number of bits the more powerful the processor is, since it will be
able to process a larger unit of information in a single operation. For example, a 32-bit
processor will be able to add two 32-bit numbers in a single operation whereas an 8-bit
processor will only be able to add two 8-bit numbers in a single operation. An n-bit
processor will usually be capable of transferring n-bits to or from memory in a single
operation. This number of bits is also referred to as the memory word size. On some
machines a word is taken to mean a 16-bit quantity and the term long word is used to
refer to a 32-bit quantity.
2.4.4 Registers
In computer architecture, a processor register (or general purpose register) is a small
storage location available on the CPU whose contents can be accessed more quickly than
storage available elsewhere. Typically, this specialized storage is not considered part of
the normal memory range for the machine. Most, but not all, modern computers adopt the
so-called load-store architecture. Under this concept, data is loaded from some larger
memory — be it cache or RAM — into registers, manipulated or tested in some way
(using machine instructions for arithmetic/logic/comparison) and then stored back into
memory, possibly at some different location. Processor registers are at the top of the
memory hierarchy, and provide the fastest way for a CPU to access data.
17
Introduction to Computers
18
Introduction to Computers
Currently, PCs are being marketed with clock rates ranging from 2 to 4 GHz and
the rate continues to increase.
A bit is the smallest element of data storage. Bits grouped together form a byte.
With the ASCII code 8 bits make a byte. For example when you type the letter
“a” the computer will understand it as a combination of zeros and ones, e,g,
01100001. The following indicate the relationship between the different data
units:
Bit = 1 or 0
Byte = 8 bits
Kilobyte = 1024 bytes
Megabyte = 1024 kilobytes
Gigabyte = 1024 megabytes
Terabyte = 1024 gigabytes
Mainframes: These are the huge computers housed in very large rooms. Until the
mid-1970s they were the only computers available. With the invention of the
mini-computer and later the personal computer, many people said mainframes
were too big, too expensive, and not needed anymore. The Internet and the advent
of computer networks literally saved the mainframe from oblivion. Mainframes
have the necessary power and speed to process millions of transactions from the
Internet and networks and have the storage capacity needed for all the data
captured and processed by larger Information Systems. America Online, the
largest Internet Service Provider in the world in the 90s, used many mainframes
connected together to process all the transactions across its network and to
19
Introduction to Computers
provide Internet access to the 17 million users who subscribed to the AOL
service. How many subscribers have ZOL, ECOWEB, ZARnet, TELCONET?
Laptop Computers.
Laptop computers were designed to facilitate the computing needs of mobile users
or users who are in transit. A laptop is a computer, which integrates screen,
keyboard, secondary storage and motherboard in one single piece, a single
portable case. Battery power supply is used to power the laptop computers during
outreach programs or field surveys where there is no electrical power supply.
However the lifespan of laptop batteries are short ranging from one to ten hours.
They also run on adapters that are used to charge laptop batteries, the same
technique that is used to charge cell phone batteries. Laptop computers are
smaller than desktop computers and usually weigh about one to three kilograms.
They are called laptops because they can be placed on one’s lap and operated with
ease. However agronomists believe that the use of laptops in this manner cause
one to be impotent. They argue that the amount of heat produced can make one
sterile. Studies have been conducted in the past to determine whether the concerns
of agronomists are valid. Unfortunately the results are, thus far, inconclusive. This
is a very interesting topic to health professionals which are encouraged to further
this research and come up with conclusive results.
20
Introduction to Computers
21
Introduction to Computers
Chapter 3
22
Introduction to Computers
jobs to be processed, allocating memory to processes, and giving a user some feedback
on the status of a job being processed. Following is simple list of operating system
functions:
The following are programs that make up the OS; job management programs, supervisory
programs, and input/output programs.
Multiprogramming
Operating systems do allow a number of jobs or processes to be executed
seemingly at the same time by allowing different data sets and programs to
23
Introduction to Computers
Multitasking
However some computers are single user. Single user computers can also
implement a form of “multiprogramming” called multitasking using
multitasking operating systems. Multitasking is where a given user can run
many independent programs or application on the same computer with
different windows being displayed on the screen. There will be a foreground
task, the active task, the background task, which is not active, and a several
intermediate tasks. Users can switch from one task to the other using a
combination of hot keys or simple clicking on a task button on the task bar.
The process of switching between several active tasks is called task switching.
Time Slicing
An alternative to multi programming is time slicing where each program is
given a fixed time slot once it elapses it is moved out of memory to wait for
its next time slot. The difference between multiprogramming and time slicing
are the factors that determine when a job is supposed to be moved out of
memory. In time slicing, it is the elapse of the permitted time slot regardless
of whether the processing is complete or not. Whereas in multiprogramming it
is as a result of a logical input delay encountered, otherwise a job can be
processed to completion without interruption. It should be noted that a given
CPU will always process only one job at any given time and there is no way
they can process many jobs simultaneously.
Multiprocessing
Computers with more than one CPU can process jobs and tasks
simultaneously through multiprocessing and parallel processing techniques.
24
Introduction to Computers
3.1.4 Translators.
Language translators are used to convert developed programs into computer or machine
language. The examples are: assembler, compiler, and interpreter. They consists of
library programs and linkage editors whose definitions, and use is beyond the scope of
this course synopsis.
25
Introduction to Computers
of keyboarding commands users move around a pointer on the screen and click on
programs to activate them. The process of finding a desired data, file or program
through the use of a pointer thereafter activating it by clicking on it may be
loosely described as “ Point and Shoot” process. Some operating systems use
touch screen systems where users simple touch a desired icon on the screen using
either a light pen or a finger to activate it. Research is on going to come up with
systems that can be activated using voice. One has to mention the name of the file
to run it using voice recognizers.
Application program are designed to perform specific tasks or solve specific business
problems. They are referred to as user systems or user oriented systems, systems that are
used by users to interface with the operating system. Examples of application systems
are: Spreadsheet programs, Word processors, Presentation programs, Database
Management Systems, payroll, Hospital Information Systems, and many more. These
application tools are developed by application programmers and they are known by
different names depending on their purpose and who developed them and for which
group of people. For example, there are general purpose/off the shelf and customized
software/tailor made or bespoke applications.
26
Introduction to Computers
as compared to customized software due to production costs that are spread over a
number of copies produced.
Advantages of Packages.
They are readily available.
They are cheaper.
They are more reliable.
Offer excellent documentation.
Offer after sales support and training.
A long-term relationship can be easily cultivated.
A company benefits from yearly upgrades and enhancements.
They are less risky as they are rigorously tested through beta testing.
They are developed by highly skilled and experienced developers.
Cutting edge technology is used.
They can be easily customized.
Organization owns and controls the system.
They are easy to understand.
Their interface is standardized and their look and feel is also standardized.
Disadvantages of Packages.
May not be compatible with already installed systems.
May not be compatible with the operating system.
May fail to meet the needs and the objectives of the organization.
Not designed to meet specific requirements of a given organization.
Does not recognize specific organizational policies, and standards.
Modifications are very expensive.
Annual License fees are heavy and are paid in hard currency.
Organization has no control over the system
27
Introduction to Computers
Spreadsheet.
A spreadsheet is sometimes called a worksheet. it is an electronic version of a
ledger sheet. It is made up of rows and columns which are labeled using numbers
and letters The columns are labeled with alphabetic letters whereas rows with
numeric data. It is designed to manage and to manipulate numeric data. A
spreadsheet uses a set of inbuilt formulas to perform calculations. There are also
inbuilt formulas that perform basic functions such as summing, computing an
average, maximum, minimum and counting entries etc. Spreadsheet programs can
also recalculate automatically range of cells once data entries have been changed
within a given range with a formula. Formatting tools can be used to enhance the
appearance and outlook of the spreadsheet. Data can also be represented
graphically using inbuilt graphical tools. E.g. MS-Excel, QuatroPro, Lotus 1-2-3
and others.
Database
A database is a collection of logical related files. They are designed to address the
short comings of traditional file approach. The disadvantages that are addressed
are; data independence, data redundancy, data duplication, inefficient use of
resources, and lack of security. Large amount of data can be easily stored in a
database in an organized manner. With databases, users can classify and organize
information, can quickly access and manipulate data, generate and print reports,
can find, sort, filter data easily and can create mailing lists and query data stored.
E.g. MS- Access, Dbase, Oracle and many other packages.
28
Introduction to Computers
Mining Software
Virtually all industries have software that is designed to meet their needs. The
mining and its related industries for example have software that is designed to
meet their specific needs. In exploration users may want be confident that their
expensively acquired drilling data is stored in a safe and easy to access repository
and that you are able to consolidate and view data from various sources quickly
and efficiently. With Surpac, they can effortlessly link into most common data
sources (Access, SQL, Oracle, DataShed etc) by following a simple mapping
process. Alternatively, Surpac has the facility to create a fully relational database
and manage the loading of raw data into this database. You will have complete
control in table design to handle the complexities of your particular project data
and quality control procedures to validate data as it is uploaded.
E.g. Surpac, Vulcan
29
Introduction to Computers
Freeware (from "free" and "software") is computer software that is available for use at
no cost or for an optional fee. Software classified as freeware is normally fully functional
for an unlimited time with no cost, monetary or otherwise. Freeware is software available
at zero price. The author usually restricts one or more rights to copy, distribute, and make
derivative works of the software. The software license may impose restrictions on the
type of use including personal use, individual use, non-profit use, non-commercial use,
academic use, commercial use or any combination of these. For instance, the license may
be "free for personal, non-commercial use".
Shareware is usually offered either with certain features only available after the license is
purchased, or as a full version but for a limited trial period of time. Once the trial period
has passed the program may stop running until a license is purchased. Shareware is often
offered without supports or updates which only become available with the purchase of a
license. The words "free trial" or "trial version" are indicative of shareware.
30
Introduction to Computers
3.2.6 Disadvantages
Promote the development of poorly designed and documented system with hard to
detect system faults.
End users lack skill and programming experience. They can waste their time on
task that are not achievable with available technology.
User developed systems have poor internal controls.
User developed applications are usually incompatible.
There is sometimes duplication of efforts due to lack of coordination.
UDAs do compromise the security of corporate database with every user
interested in interfacing his system with the main database.
Many end users lack corporate vision and do not conform to organizational
vision, mission, goals, and objectives and to system of strategies.
Lack of continuity in the event of a user leaving the organization or otherwise.
The next person will struggle in the position since all the system tools required for
the execution of the tasks will be untraceable.
Integrity of database is compromised through incidental database corruptions and
deletion of records, data elements and files. The entire database may be wiped
out.
Programming languages or tools are not user tools. End users have little contact with
programming languages they only get to use systems that have been developed using
these tools. Development software is widely used by programmers or developers who
need to first learn and understand the languages before using them. These languages can
be loosely described as a form of language like any language spoken in the world.
31
Introduction to Computers
However programming languages are very strict when it comes to syntax and semantics
of a given programming language. Syntax is defined as a set of strict rules that have to
be closely followed by software developers when they are developing software using a
particular programming language. It should be noted that programming languages do
differ when it comes to rules that govern them. Knowing one programming language
does not necessarily mean a programmer can easily understand the next language, though
it is an advantage.
Following faithfully the strict set of rules of a given programming language does not
guarantee that software tools that are going to be developed will be usable and of high
quality. They may fail to achieve what they were designed for, hence the semantics.
Semantics has to do with the meaning of the program and its ability to achieve what it
was designed to achieve. For example if it was designed to sum two numbers, it should
add the two numbers instead of subtracting one number from the other for it to be
semantically correct.
Data element
A data element is a field, a logical collection of alphanumeric characters. For
example name, surname and student registration number.
Record
A record is a collection of logically grouped data elements or fields. The fields
should also be interrelated for them to be treated as records for example; details of
John form a record.
File
A file is a collection of interrelated records e.g. a student file, employee file, a
patient file, and beneficiary file.
32
Introduction to Computers
Database.
Is a collection of interrelated and logically grouped files that can be accessed from
a central point. The files are cross-referenced and have at least one common data
element used for referencing one file from the other.
33
Introduction to Computers
34
Introduction to Computers
Data Dictionary.
A data dictionary (DD) does contain names and descriptions of every filed in the
database. It contains descriptions of how data elements relate to each other. With
data dictionary data is stored in a consistent manner with no duplications. It also
ensures that the length of data elements is uniform and is of a common character
data for easy access of any application program. The use of a data dictionary in
this manner ensures that there is no data program dependence. Database users can
easily change the characteristics of data elements without having to change the
application programs. Data dictionary is also useful in resolving name clashes by
keeping track of all names of data elements. It is a piece of software used for
managing and controlling data definitions. It is a Meta data, it holds data about
data, and it contains descriptions of data and information about their technical
characteristics and their interrelationships. It includes information about where
data is used, length of the filed and whether it is numeric, alphabetic or
alphanumeric. It gives a complete reference system for all available data
elements.
Data Languages.
There are two types of Data Languages (DL); these are Data Description
Language (DDL) and Data Manipulation Language (DML). DDL is used to place
data in the data dictionary; it is the language, which is used to describe the
characteristics of data elements. DML is a data manipulation language for
uniform access to data. It uses standard set of commands to manipulate data. The
standard commands are used to retrieve data, process data, store, search, save,
delete and many more operations. The following are examples of some of the
standard commands: FIND, GET, SORT, SEARCH, PRINT, DELETE, and
SAVE.
Teleprocessing Monitor.
A Teleprocessing Monitor (TP) is communication software that is designed to
manage communications between a database and remote terminals. They are used
to manage order entry systems that have terminal located at various remote sites.
Application Development Software.
These are set of programs or tools used by developers to develop user defined
application programs that process data into desired forms.
Security Software.
Security software takes care of security needs of the database system. It provides
a variety of tools that shield the database from unauthorized access and from
security attacks. Passwords, level of access, transaction log files, system log files
and encryption are some of the security features that can be employed to secure a
database.
Archiving and Recovery Systems.
This component of the system provides means and techniques of making copies of
a database or for backup. They also have restart and recovery tools for data
reconstruction in the event of database corruption. Restart and recovery tools help
in the recovery of lost data.
35
Introduction to Computers
The most important role of a Database Administrator is to ensure that users give up their
ownership of data, which is a shared resource.
36
Introduction to Computers
A network database structure is similar to hierarchical structure but its more flexible and
user friendly. It views data in sets; each set is composed of an owner record and one or
more member records. A record is allowed to be a member of one or more sets, and an
owner record can also have one or more member records.
37
Introduction to Computers
3.4.6 Disadvantages
Concurrency problems.
Ownership.
Expensive as more resources are required for backup, maintenance, DBA,
Equipment, memory space, and other devices.
Data insecurity, once security has been breached all the data can be lost since
data storage is usually centralized.
38
Introduction to Computers
Chapter 4
Coaxial Cable
This is usually used for TV cables. It has a very low bandwidth and is not very
common transmission media.
Fibre Optic
An optic fibre is a thin strand of glass that transmits pulsating beams of light
instead of electrical frequencies. It can transmit data at more than 2000Mbps. It is
not susceptible to electromagnetic interference nor is it easy to tape data from it as
a hacker. However it is expensive to install.
Wireless Links
Wireless communication networks are common these days. Wireless transmission
is a form of an unguided media, so it offers flexibility in terms of network layout.
Weather can affect wireless links.
Router
A router will look at the IP portion of the packet for a destination network. Then it
looks at its internal tables for the best way to send the IP packet to the next router
or the destination network. Routers are used when connecting multiple networks,
and managing network traffic on the basis of protocol.
39
Introduction to Computers
Bridge
A Bridge sends data packets across a network link based on the (Media Access
Control) MAC-layer source and destination address. A bridge looks at the source
address in the Ethernet packet, and then builds its address table. It also looks at
the destination information to decide whether to send the packet over the WAN or
LAN. It is used when the major concern is to avoid lading down either LAN
segments with unnecessary transport.
Router
A router is used to route data packets between two networks. It reads the
information in each packet to tell where it is going. If it is destined for an
immediate network it has access to, it will strip the outer packet (IP packet for
example), readdress the packet to the proper ethernet address, and transmit it on
that network. If it is destined for another network and must be sent to another
router, it will re-package the outer packet to be received by the next router and
send it to the next router. Routing occurs at the network layer of the OSI model.
They can connect networks with different architectures such as Token Ring and
Ethernet. Although they can transform information at the data link level, routers
cannot transform information from one data format such as TCP/IP to another
such as IPX/SPX. Routers do not send broadcast packets or corrupted packets. If
the routing table does not indicate the proper address of a packet, the packet is
discarded.
Modem
A modem is a device that is used to convert digital signals to analogue signals and
vice versa. It is actually a modulator-demodulator, hence the name MODEM. Its
practical use is to connect a computer to a phone line for the sake of transferring
data to remote computers. Modems can be internal or external. Typical modem
speed for data transfer is 56Kbps.A network is an interconnected group of nodes;
or a series of points, or stations connected by communications channels. A
network can consist of at least two nodes. The main purpose of a network is to
share resources.
40
Introduction to Computers
bus
ring
star
tree
mesh
More complex networks can be built as hybrids of two or more of the above basic
topologies.
Bus networks (not to be confused with the system bus of a computer) use a common
backbone to connect all devices. A single cable, the backbone functions as a shared
41
Introduction to Computers
communication medium that devices attach or tap into with an interface connector. A
device wanting to communicate with another device on the network sends a broadcast
message onto the wire that all other devices see, but only the intended recipient actually
accepts and processes the message.
Ethernet bus topologies are relatively easy to install and don't require much cabling
compared to the alternatives. 10Base-2 ("ThinNet") and 10Base-5 ("ThickNet") both
were popular Ethernet cabling options many years ago for bus topologies. However, bus
networks work best with a limited number of devices. If more than a few dozen
computers are added to a network bus, performance problems will likely result. In
addition, if the backbone cable fails, the entire network effectively becomes unusable.
In a ring network, every device has exactly two neighbors for communication purposes.
All messages travel through a ring in the same direction (either "clockwise" or
"counterclockwise"). A failure in any cable or device breaks the loop and can take down
the entire network. Ring topologies are found in some office buildings or school
campuses.
42
Introduction to Computers
Many home networks use the star topology. A star network features a central connection
point called a "hub" that may be a hub, switch or router. Devices typically connect to the
hub with Unshielded Twisted Pair (UTP) Ethernet. Compared to the bus topology, a star
network generally requires more cable, but a failure in any star network cable will only
take down one computer's network access and not the entire LAN. (If the hub fails,
however, the entire network also fails.)
43
Introduction to Computers
Tree topologies integrate multiple star topologies together onto a bus. In its simplest
form, only hub devices connect directly to the tree bus, and each hub functions as the
"root" of a tree of devices. This bus/star hybrid approach supports future expandability of
the network much better than a bus (limited in the number of devices due to the broadcast
traffic it generates) or a star (limited by the number of hub connection points) alone.
Mesh topologies involve the concept of routes. Unlike each of the previous topologies,
messages sent on a mesh network can take any of several possible paths from source to
44
Introduction to Computers
destination. (Recall that even in a ring, although two cable paths exist, messages can only
travel in one direction.) Some WANs, most notably the Internet, employ mesh routing.
A mesh network in which every device connects to every other is called a full mesh. As
shown in the illustration below, partial mesh networks also exist in which some devices
connect only indirectly to others.
Topologies remain an important part of network design theory. You can probably build a
home or small business computer network without understanding the difference between
a bus design and a star design, but becoming familiar with the standard topologies gives
you a better understanding of important networking concepts like hubs, broadcasts, and
routes.
LAN and WAN were the original categories of area networks, while the others have
gradually emerged over many years of technology evolution. Note that these network
types are a separate concept from network topologies such as bus, ring and star.
A LAN connects network devices over a relatively short distance. A networked office
building, school, or home usually contains a single LAN, though sometimes one building
will contain a few small LANs (perhaps one per room), and occasionally a LAN will span
a group of nearby buildings. In TCP/IP networking, a LAN is often but not always
implemented as a single IP subnet.
In addition to operating in a limited space, LANs are also typically owned, controlled,
and managed by a single person or organization. They also tend to use certain
connectivity technologies, primarily Ethernet and Token Ring.
As the term implies, a WAN spans a large physical distance. The Internet is the largest
WAN, spanning the Earth.
45
Introduction to Computers
A WAN differs from a LAN in several important ways. Most WANs (like the Internet)
are not owned by any one organization but rather exist under collective or distributed
ownership and management. WANs tend to use technology like ATM, Frame Relay and
X.25 for connectivity over the longer distances.
A MAN is a network spanning a physical area larger than a LAN but smaller than a
WAN, such as a city. A MAN is typically owned and operated by a single entity such as a
government body or large corporation.
E-Mail
Electronic mail(e-mail), allows computer users locally and worldwide to
exchange messages. Each user of e-mail has a mailbox address to which messages
are sent. The capability to send electronic files to an e-mail address renders e-mail
very useful communication tool. These files are referred to as MIME attachments.
MIME stands for Multimedia Internet Mail Extension, and was developed to help
e-mail software handle a variety of file types. Electronic mail is not necessarily
part of the World Wide Web but simply one of the services of the Internet.
Telnet
Telnet is a program that allows you to log into computers on the Internet and use
online databases, library catalogues, chat services, and more. There are no
graphics in Telnet sessions, just text. To Telnet to a computer, knowledge of its
address is necessary. Telnet is available on the World Wide Web and is one of the
common Web-based resources available through.
46
Introduction to Computers
FTP
FTP stands for File Transfer Protocol. This is both a program and the method
used to transfer files between computers. Anonymous FTP is an option that
allows users to transfer files from thousands of host computers on the Internet to
their personal computer account. FTP sites contain books, articles, software,
games, images, sounds, multimedia, course work, data sets, etc. FTP transfers can
be performed on the World Wide Web without the need for special software. In
this case, the Web browser will suffice. Whenever a download is from a Web site
to a local machine, FTP will be in use. Search engines such as FtpFind, located at
http://www.ftpfind.com/ provides access to FTP
Usenet News
Usenet News is a global electronic bulletin board system in which millions of
computer users exchange information on a vast range of topics. The major
difference between Usenet News and e-mail discussion groups is the fact that
Usenet messages are stored on central computers, and users must connect to these
computers to read or download the messages posted to these groups. This is
distinct from e-mail distribution, in which messages arrive in the electronic
mailboxes of each member. Usenet discussion forums are called newsgroups.
Communication
The Internet enables efficient and effective communication. It is as easy to
communicate with people around the globe, as it is to communicate with people in
the next building. Using tools like electronic mail, mailing lists and newsgroups,
the human network of any individual can be expanded to include others with
similar interests all around the world. These communication tools allow us to
share ideas, collaborate on projects, ask questions and request information from
experts, researchers, professionals and enthusiasts in a wide variety of fields.
Despite its technological nature, the Internet is a place where people
communicate.
47
Introduction to Computers
Dissemination of Information
The Internet allows quick and easy distribution of information. Internet
information is distributed and can be located anywhere in the world and be
accessible to an international audience. This makes the dissemination process
very efficient. The Internet is an ideal way to distribute government information
to citizens, health information to patients, consumer information to the public and
current event information to all who are interested.
48
Introduction to Computers
Protocol: http
Host computer name: www
Second-level domain name: zsm
Top-level domain name: co
Country Code Top Level Domain (ccTLD) zw
Directory name: infotech
File name: notes-on-html.pdf
Subject Directories
A subject directory is a service that offers a collection of links to Internet
resources submitted by site creators or evaluators and organised into subject
categories. Directory services use selection criteria for choosing links to include,
though the selectivity varies among services. Most directories are searchable.
Directories are useful when you are doing topic-based research.
49
Introduction to Computers
When there is need to avoid viewing low-content documents that often turn up on
search engines
E-commerce.
E –commerce allows business partners to do business over the Internet. Trading is
done on the Internet electronically. Government services can also be availed over
the Internet. There are a number of subdivisions of electronic commerce; these are
Business-to-Business or E business (B2B), Business to Commerce (B2C),
Commerce to Business (C2B), and Commerce-to-Commerce (C2C). The
government Internet services are classified as Government to Consumer (G2C).
E Banking.
E banking is where banking activities and transactions are carried over the
Internet. Financial obligations are settled over the Internet on line.
Remote Access.
Corporate databases can be accessed and queried from a remote site using either
leased or dial up facilities.
Intranet.
A company Internet that is restricted to internal users only. Incoming and out
going data streams are filtered and subjected to defined communication rules and
protocols.
Extranet.
It is a form of Internet that is only accessible to an organization or neighbourly
organization, which are usually in the same line of business. It could be a network
50
Introduction to Computers
Broadband Networks.
Broadband networks are able to carry multimedia data in the form of text, video
and voice for data transmission, teleconferencing, and data conferencing. They
transmit data at high speeds.
Mobile Commerce.
Mobile commerce involves the use of hand held devices to transact using wireless
communication systems for example cellular technology.
Mobile Computing.
Mobile computing is designed for mobile users who are always in transit so that
they can be always in touch with their corporate databases and offices and work
away from work through remote access. The most common technology under this
category is telecommuting.
Chapter 5
51
Introduction to Computers
The technologies of computer security are based on logic. As security is not necessarily
the primary goal of most computer applications, designing a program with security in
mind often imposes restrictions on that program's behaviour.
There are various strategies and techniques used to design security systems. However
there are few, if any, effective strategies to enhance security after design. One technique
enforces the principle of least privilege to great extent, where an entity has only the
privileges that are needed for its function. That way even if an attacker gains access to
one part of the system, fine-grained security ensures that it is just as difficult for them to
access the rest.
Defence In Depth
The design should use "defence", where more than one subsystem needs to be
violated to compromise the integrity of the system and the information it holds.
Defence in depth works when the breaching of one security measure does not
provide a platform to facilitate subverting another.
The idea behind the defence in depth approach is to defend a system against any
particular attack using several, varying methods. Defence in depth is originally a
military strategy that seeks to delay, rather than prevent, the advance of an
attacker by yielding space in order to buy time. The placement of protection
mechanisms, procedures and policies is intended to increase the dependability of
an IT system where multiple layers of defence prevent espionage and direct
attacks against critical systems. In terms of computer network defence, defence in
depth measures should not only prevent security breaches, but buys an
52
Introduction to Computers
Using more than one of the following layers constitutes defence in depth.
Fail Safe
Despite popular belief , "fail safe" does not mean that the device or system is
designed so that failure is impossible; it simply means that when failure does
occur, it should occur in the safest fashion.
Audit Trails
Webopedia defines an audit trail as "a record showing who has accessed a
computer system and what operations he or she has performed during a given
period of time." Audit trail or audit log or usage logging is a chronological
sequence of audit records, each of which contains evidence directly pertaining to
and resulting from the execution of a business process or system function.
53
Introduction to Computers
Security Architecture can be defined as the design artefacts that describe how the security
controls (security countermeasures) are positioned, and how they relate to the overall
information technology architecture. These controls serve the purpose to maintain the
system's quality attributes, among them confidentiality, integrity, availability,
accountability and assurance.
While many software based security solutions encrypt the data to prevent data from being
stolen, a malicious program or a hacker may corrupt the data in order to make it
unrecoverable or unusable. Similarly, encrypted operating systems can be corrupted by a
malicious program or a hacker, making the system unusable. Hardware-based security
solutions can prevent read and write access to data and hence offers very strong
protection against tampering and unauthorized access.
Working of hardware based security: A hardware device allows a user to login, logout
and to set different privilege levels by doing manual actions. The device uses biometric
technology to prevent malicious users from logging in, logging out, and changing
privilege levels. The current state of a user of the device is read both by a computer and
controllers in peripheral devices such as harddisks. Illegal access by a malicious user or a
malicious program is interrupted based on the current state of a user by harddisk and
DVD controllers making illegal access to data impossible. Hardware based access control
is more secure than logging in and logging out using operating systems as operating
systems are vulnerable to malicious attacks. Since software cannot manipulate the user
privilege levels, it is impossible for a hacker or a malicious program to gain access to
secure data protected by hardware or perform unauthorized privileged operations. The
hardware protects the operating system image and file system privileges from being
tampered. Therefore, a completely secure system can be created using a combination of
hardware based security and secure system administration policies.
One use of the term computer security refers to technology to implement a secure
operating system. Much of this technology is based on science developed in the 1980s
and used to produce what may be some of the most impenetrable operating systems ever.
Though still valid, the technology is in limited use today, primarily because it imposes
some changes to system management and also because it is not widely understood. Such
ultra-strong secure operating systems are based on operating system kernel technology
that can guarantee that certain security policies are absolutely enforced in an operating
environment. An example of such a Computer security policy is the Bell-La Padula
54
Introduction to Computers
The following terms used in engineering secure systems are explained below.
55
Introduction to Computers
that in which the original files are contained. Some individuals and companies
also keep their backups in safe deposit boxes inside bank vaults. There is also a
fourth option, which involves using one of the file hosting services that backs up
files over the Internet for both business and individuals.
Backups are also important for reasons other than security. Natural disasters, such
as earthquakes, hurricanes, or tornadoes, may strike the building where the
computer is located. The building can be on fire, or an explosion may occur.
There needs to be a recent backup at an alternate secure location, in case of such
kind of disaster. Further, it is recommended that the alternate location be placed
where the same disaster would not affect both locations. Examples of alternate
disaster recovery sites being compromised by the same disaster that affected the
primary site include having had a primary site in World Trade Center I and the
recovery site in 7 World Trade Center, both of which were destroyed in the 9/11
attack, and having one's primary site and recovery site in the same coastal region,
which leads to both being vulnerable to hurricane damage (e.g. primary site in
New Orleans and recovery site in Jefferson Parish, both of which were hit by
Hurricane Katrina in 2005). The backup media should be moved between the
geographic sites in a secure manner, in order to prevent them from being stolen.
Chapter 6
56
Introduction to Computers
A computer virus is a computer program that can copy itself and infect a computer.
Computer viruses are small software programs that are designed to spread from one
computer to another and to interfere with computer operation. A virus is a program that
piggy-backs on other programs. It can be attached to a Word or Excel file. Each time the
file is run, the virus runs too. It attaches itself to other programs and continues to
reproduce. A virus might corrupt or delete data on your computer, use your e-mail
program to spread itself to other computers, or even erase everything on your hard disk.
The term "computer virus" is sometimes used as a catch-all phrase to include all types of
malware, even those that do not have the reproductive ability. Malware includes
computer viruses, computer worms, Trojan horses, spyware, dishonest adware and other
malicious and unwanted software, including true viruses.
Worm
A computer worm is a malicious program that can replicate and run itself. It
differs from a computer virus in that it doesn’t need to embed itself into a host
program to run. Computer worms usually spread through networks, although
other methods of transport can be utilized such as local drives. A worm can
exploit security vulnerabilities to spread itself automatically to other computers
through networks,
Trojan horse
Trojan horse is a program that appears harmless but hides malicious functions.
Worms and Trojan horses, like viruses, may harm a computer system's data or
performance. Some viruses and other malware have symptoms noticeable to the
computer user, but many are surreptitious or simply do nothing to call attention to
themselves. Some viruses do nothing beyond reproducing themselves.
Spyware
This is software that sends information about your Web surfing habits to its Web site.
Often quickly installed in your computer in combination with a free download you
selected from the Web, spyware transmits information in the background as you
move around the Web. Also known as "parasite software," "scumware," "junkware"
and "thiefware," spyware is occasionally installed just by visiting a Web site
After you open and run an infected program or attachment on your computer, you might
not realize that you've introduced a virus until you notice something isn't quite right. Here
are a few primary indicators that your computer might be infected:
57
Introduction to Computers
These are common signs of infection but they might also indicate hardware or software
problems that have nothing to do with a virus.
Computer viruses also spread through downloads on the Internet. They can be
hidden in illicit software or other files or programs you might download.
They can also be spread through sharing of storage media such as USB flash and
diskettes.
Nothing can guarantee the security of your computer. You can continue to improve your
computer's security and decrease the possibility of infection by using a firewall, keeping
58
Introduction to Computers
Note: Because no security method is guaranteed, it's important to back up critical files
on a regular basis before you encounter a virus or other problems.
59
Introduction to Computers
Chapter 7
The purpose of the Act is to protect the rights of the individual about whom data is
obtained, stored, processed or supplied rather than those of the people or organisations
who control and use personal data. The Act applies to both computerised and paper
records. The Act requires that appropriate security measures will be taken against
unauthorised access to, or alteration, disclosure or destruction of personal data and
against accidental loss or destruction of personal data.
This section provides a quick overview of what the Key Principles of information-
handling practice mean. The Key Principles themselves are discussed below in the
context of their definition in law.
Data may only be used for the specific purposes for which it was collected.
Data must not be disclosed to other parties without the consent of the individual
whom it is about, unless there is legislation or other overriding legitimate reason
to share the information (for example, the prevention or detection of crime). It is
an offence for Other Parties to obtain this personal data without authorisation.
Individuals have a right of access to the information held about them, subject to
certain exceptions (for example, information held for the prevention or detection
of crime).
Personal information may be kept for no longer than is necessary and must be
kept up to date.
Personal information may not be sent outside the European Economic Area unless
the individual whom it is about has consented or adequate protection is in place,
for example by the use of a prescribed form of contract to govern the transmission
of the data.
Subject to some exceptions for organisations that only do very simple processing,
and for domestic use, all entities that process personal information must register
with the Information Commissioner's Office.
Entities holding personal information are required to have adequate security
measures in place. Those include technical measures (such as firewalls) and
organisational measures (such as staff training).
Subjects have the right to have factually incorrect information corrected (note:
this does not extend to matters of opinion)
60
Introduction to Computers
All staff and students have a duty to observe the Principles of the Act. Individuals who do
not handle data as part of their normal work have a responsibility to ensure that any
personal data they see or hear goes no further. This includes personal data and
information extracted from such data, thus, for example, unauthorised disclosure of data
might occur by passing information over the telephone, communicating information
contained on a computer print-out or even inadvertently by reading a computer screen.
General Guidelines
The Data Protection Act creates rights for those who have their data stored (subjects), and
responsibilities for those who store, process or collect personal data.
The person who has their data processed has the right to:
View the data an organisation holds on them, for a small fee, known as 'subject
access fee'
Request that incorrect information be corrected. If the company ignores the
request, a court can order the data to be corrected or destroyed, and in some cases
compensation can be awarded.
Require that data is not used in any way that may potentially cause damage or
distress.[5]
Require that their data is not used for direct marketing.
61
Introduction to Computers
Personal data shall be processed in accordance with the rights of data subjects
under this Act.
Appropriate technical and organisational measures shall be taken against
unauthorised or unlawful processing of personal data and against accidental loss
or destruction of, or damage to, personal data.
Personal data shall not be transferred to a country or territory outside the area of
origin unless that country or territory ensures an adequate level of protection for
the rights and freedoms of data subjects in relation to the processing of personal
data.
7.1.5 Exceptions
The Act is structured such that all processing of personal data is covered by the act, while
providing a number of exceptions. Notable exceptions are:
62
Introduction to Computers
Chapter 8
Ergonomics is the science of designing machines, tools, and work environments to best
accommodate human performance and behaviour. It aims to improve the practicality,
efficiency, and safety of a person working with a single machine or device (e.g., using a
telephone, driving a car, or operating a computer terminal). Taking the user into
consideration has probably always been a part of tool design;
Some of the common ailments that computer users suffer from are Musculoskeletal
Disorders (MSD), Repetitive Strain Injury (RSI), Carpal Tunnel Syndrome, and others.
All these ailments need proper care of an orthopedic MD for the right treatment at the
right time. Every computer user should know the different signs and symptoms of these
disorders so that they can seek prompt medical attention while they encounter with any
kind of difficulty.
Carpal tunnel syndrome is a medical problem of the hands. The pinching of a large nerve,
the medial nerve that travels under the palm, causes the problem. Normally, the nerve
63
Introduction to Computers
carries information about the sensation of touch from the hand to the brain, but when the
nerve is pinched, the sensation of touch can be blocked.
Other computer injury ailments are many risk factors for repetitive strain injury (RSI).
Some are well-known, such as spending long hours working with a mouse or sitting in a
poorly configured workstation. Others are not readily apparent. For example, having long
fingernails leads you to type with flat rather than curved fingers. But if you do not know
the major risk factors then you add another: ignorance. You cannot take preventive
measures if you are not aware of the dangers.
a) The users experience constant pain in the hands, elbows, shoulders, neck,
and the back. Other symptoms of Repetitive Strain Injury are cramps,
tingling, and numbness in the hands. The hand movements of the user may
become clumsy and the person may find it difficult even to fasten buttons.
b) Another variant of Repetitive Strain Injury is that, it may produce painful
symptoms in the upper limbs, but the site may be difficult to locate.
c) A major cause is due to long unbroken periods of work. Ergonomics or the
lack of it plays a very important role. Lack of information about the
condition leads to neglect by the concerned individuals.
64
Introduction to Computers
Prevention
The following are simple steps that can be taken to prevent or reduce chances of RSI:
a) Type using neutral wrist position, not bending the wrist toward the little
finger nor toward the thumb.
b) Adjust (or replace) the Keyboard. The correct keyboard adjustment is one
where the keyboard is flat and at or below elbow level. This position
makes it easiest to type with your wrists in the neutral position. If you
can't have the keyboard at the correct height, you should choose the
adjustment which keeps your wrists as near to the neutral position as
possible.
c) Watch out for that mouse! You may be able to cut down on your mouse
usage by using keyboard shortcuts instead. You may also want to switch
your mouse hand.
d) Take regular breaks. One of the most frequent pieces of advice you will
hear if you have RSI is to take regular breaks. It's also one of the most
difficult pieces of advice to follow. It has been suggested that, for RSI
prevention purposes, you should take a five minute break after every 20 or
30 minutes of continuous activity. If you are suffering from RSI you
should clearly take more frequent and longer breaks.
e) Sit up straight. Don't slouch. Your mother probably told you this. It was
good advice, and she probably didn't know how many hours you would be
spending in front of a keyboard. Bad posture is a primary risk factor in
RSI. Choose and adjust your seat so that you sit up straight, rather than
leaning forward over the keyboard. Adjust your display so that the
monitor is directly in front of you, with the top of the screen at eye.
Computer vision syndrome (CVS), defined as a complex of eye and vision problems that
are experienced during and related to computer use, is a repetitive strain disorder that
appears to be growing rapidly, with some studies estimating that 90 percent of the 70
million U.S. workers using computers for more than 3 hours per day experience it (CVS)
in some form. Your eyes also need proper care as the other parts of the body. It is the
worst affected organ in case you have to sit in front of the computer for long hours.
Eyestrain and Computer Vision Syndrome (CVS) are the most common disorders that the
eyes encounter with.
Symptoms
a) Eyestrain
b) Blurred vision
c) Dizziness or nausea
65
Introduction to Computers
d) Difficulty concentrating
e) Headaches
f) Red, dry or burning eyes
g) Increase in nearsightedness
h) Change in color perception
i) Slow refocusing
j) Excessive fatigue
k) Occasional double vision
Prevention
Musculoskeletal Disorders can range from general aches and pains to more serious
Problems. Medical practitioners do recommend that all the users who use computers
regularly should report signs and symptoms as early as possible to prevent serious injury
or permanent damage.
Symptoms
66
Introduction to Computers
i) Cramping
j) Loss of color in affected regions
k) Weakness
l) Tension stress headaches and related ailments
Prevention
a) Taking regular breaks from working at your computer - a few minutes at least
once an hour
b) Alternating work tasks like mixing computer tasks with non computer tasks
alternately to avoid strain
c) Regular stretching to relax your body
d) Using comfort equipment such as footrests, wrist/palm rests, and document
holders if required
e) Keeping the mouse and keyboard at the same level
f) Avoiding gripping your mouse too tightly – it is always recommended to hold the
mouse lightly and click gently
g) Familiarize yourself with keyboard shortcuts for applications you regularly use
like Ctrl+S to save and Ctrl+P to print (to avoid overusing the mouse).
Sitting
Sitting in one place for long periods is a risk because it slows blood circulation.
Continuously holding your elbows bent in the palms-down position strains the nerves and
muscles of the arms and upper body. Poor sitting habits compound the problem. For
example, leaning on your elbow can compress the nerve, or sitting on one foot can
impede circulation in your legs.
Repetitive movements
Making the same movements again and again, such as typing numbers into a spreadsheet
or circling a mouse or trackball, tires the muscles. Research says that a user can be
injured by as little as two hours of clicking per day, and is in the danger zone at four
hours per day. Working for extended periods without taking breaks does not allow the
muscles time to recover from the exertion.
Static loading
67
Introduction to Computers
slumping, which strains muscles of the upper body from neck to fingertips. (Sitting with
your feet up on the desk and the keyboard in your lap is not a great idea, either.)
Faulty technique
Faulty technique includes resting your wrists, forearms, or elbows on the desk or armrest
as you type or winging your elbows away from your body. Cradling the telephone
between your ear and shoulder with your head cocked to the side is also a bad habit. And
you should not pound the keys or grip the mouse, twisting your wrists from side to side or
up and down.
Bad workstations
Working in awkward positions not only makes people grumpy, it leads to injury because
the muscles become strained and fatigued. Awkward positions can be cultivated by
working in a cubicle that is too small or sitting on an uncomfortable chair. Many
monitors are too high, too low, or off to one side. Keyboards on desktops are often too
high, but on your lap they are too low. Mice are often too far away to be reached without
straining.
Work habits
People who have strong work ethics may ignore their own needs to get ahead in their
careers or because they feel obliged to give 110 percent. Others work on cyclical
deadlines, where weekly, monthly, or quarterly crunch times result in unusually long
hours at the computer. RSI can be a "nice guy's disease," felling people who habitually
volunteer to take on extra work or cannot say no.
Awareness of discomfort
People have varying degrees of awareness about pain and comfort or how they move, sit,
and stand. Some people zone out at the computer, concentrating so much that they forget
about their posture or movements. Becoming sensitive to these matters helps you become
aware of symptoms and avoid injury or reinjury.
68
Introduction to Computers
Chapter 9
When IBM launched its revolutionary personal computer, the IBM PC, in August 1981, it
came complete with a 16-bit operating system from Microsoft, MS-DOS 1.0. This was
Microsoft's first operating system, and it also became the first widely used operating
system for the IBM PC and its clones.
MS-DOS 1.0 was actually a renamed version of QDOS (Quick and Dirty Operating
System), which Microsoft bought from a Seattle company, appropriately named Seattle
Computer Products, in July 1981. QDOS had been developed as a clone of the CP/M
eight-bit operating system in order to provide compatibility with the popular business
applications of the day such as WordStar and dBase. CP/M (Control Program for
Microcomputers) was written by Gary Kildall of Digital Research several years earlier
and had become the first operating system for microcomputers in general use.
QDOS was written by Tim Paterson, a Seattle Computer Products employee, for the new
Intel 16-bit 8086 CPU (central processing unit), and the first version was shipped in
August, 1980. Although it was completed in a mere six weeks, QDOS was sufficiently
different from CP/M to be considered legal. Paterson was later hired by Microsoft.
Until its acquisition of QDOS, Microsoft had been mainly a vendor of computer
programming languages. Gates and co-founder Paul Allen had written Microsoft BASIC
and were selling it on disks and tape mostly to PC hobbyists.
MS-DOS soared in popularity with the surge in the PC market. Revenue from its sales
fuelled Microsoft's phenomenal growth, and MS-DOS was the key to company's rapid
69
Introduction to Computers
emergence as the dominant firm in the software industry. This product continued to be
the largest single contributor to Microsoft's income well after it had become more famous
for Windows.
DOS is composed of a number of files. You can choose to keep all of its components
available on disk so that you can use all the facilities it offers (this is the norm if space is
not a constraint). Alternatively you may choose to have a minimal setup in which case
not all of its features will be available. However at a minimum there are three system
files which you must have.
The disk which your computer uses to load and run DOS must contain these files and is
called the System, or Startup, or Boot, disk.
COMMAND.COM - The command processor (or shell) is the part of DOS that executes
(or processes) the commands we will be looking at. These commands are either internal
to the command processor (i.e. part of it), or external to it.
You must not create a file with the same name as an Internal Command. Examples of
such commands are DIR, DEL and COPY, which are part of the COMMAND.COM
program. You will find that the names of these commands cannot be seen when you list
the files on your disk.
Each External Command is a separate executable program. When the user enters the
name of an external command DOS reads the appropriate program file into memory and
control of the computer system is passed to it; when the command terminates the
command processor regains control of the system. External Commands e.g. XCOPY, can
be seen when you list your files.
All IBM compatible PCs have a program which is not part of DOS but interacts with it to
provide peripheral device support. This software is called the BIOS (Basic Input/Output
System) and it contains the basic instructions for controlling such things as the disk
drives (see below), keyboard and serial/parallel ports while the machine is running. It
also contains instructions for testing various parts of the computer (e.g. memory, floppy
disk drives and the various interfaces) which are executed when the computer is starting
or 'powering' up. This POST (Power On Self-Test) routine will display a message if there
are any problems.
Once the tests are all passed the operating system is loaded from disk and the machine is
ready for use. This BIOS program is classed as firmware and stored in ROM (Read Only
Memory).
70
Introduction to Computers
Disk drives are those parts of the computer hardware which hold the disks and perform
the writing and reading of data to and from disk. Within a DOS command line they are
referenced by a letter plus a colon. The hard disk drive, containing the large capacity, fast
access, fixed disk, is normally referred to as C:(i.e. the C drive), the floppy drive is A:
and if there is a second floppy drive it is B:
When your PC is running a Prompt appears at the left of the screen indicating that the
computer is ready for you to type in commands. This System, or DOS, or Command,
Prompt includes a letter to indicate the current or default drive. That is the disk drive
DOS will use when executing the command if no other is specified in the command line.
For example A>and C> are both common prompts indicating the floppy and hard drives
respectively.
When the floppy disk drive writes data to a floppy disk it places it in concentric circles
called tracks. A floppy disk contains either 40 or 80 tracks each of which is divided into
small sections called sectors, each sector containing 512 bytes. The disk drive contains a
read/write head which moves from one track to the next as the disk rotates either finding
data to be read, or locating free space to which it can write (depending on whether DOS
has requested a read or write operation).
On a floppy disk it is possible to physically enable or disable writing to the disk. This
allows you to prevent accidental writing to the disk or unintentional formatting of the
disk.
To disable writing to a 5.25" floppy disk a notch called the write protect notch should be
covered by non transparent tape on both side of the disk.
If you look at the back of a 3.5" disk you will see there is a write protect window with a
plastic sliding tab in the lower right corner. Sliding the tab down to open the window
Write Protects the disk.
A new floppy disk must be formatted before DOS can read from and write to it. DOS
provides the FORMAT command to allow the user to format disks. Information on how
to use the FORMAT command will be given later. When you format a disk DOS reserves
a small part of it for its tracking system. This consists of the File Allocation Table and
Root Directory which allow DOS to store and locate files on the disk (see next section).
When formatting a disk DOS also marks defective sectors so that it will not store
information there.
71
Introduction to Computers
The Root Directory - This contains the name, attributes (see later), time and date of last
modification and size of each file on the disk. It also identifies the disk location of the
first cluster of each file.
A Cluster, or Allocation Unit, is a group of consecutive sectors (in the case of a floppy
disk 2 sectors). It is the smallest unit of disk space that can be allocated to a file.
Files are divided into clusters because there is not always a single piece of free disk space
big enough to accommodate a particular file. Therefore it has to be broken up and
distributed over different parts of the disk where there is free space i.e. where there are
free clusters. As a result of this files, and disks themselves, are often referred to as being
fragmented, a characteristic which slows down the processes of writing to and reading
from the disk.
The File Allocation Table (FAT 1) - After the first cluster of a file has been located the
FAT is used to locate subsequent clusters. It contains the address of each subsequent
cluster in the allocation chain.
FAT 2 - A copy of FAT 1 which DOS uses to verify the integrity of the filing system.
The Boot Sector - When a disk is formatted as a boot (or system) disk a small program
called the Bootstrap Loader is placed in the Boot Sector, the first sector on the disk. This
program loads the operating system from disk into memory after the BIOS has
successfully completed its POST.
It is possible to store hundreds of files on a disk and it can a tedious task trying to find a
particular one you are looking for if they are not categorised in any way. Therefore DOS
allows you to group related files together in directories. The main directory on a disk is
called the ROOT directory, which is represented by \ (a back slash) and it is created by
DOS when formatting the disk. You can create directories in the ROOT directory and
within each other and they can each contain a number of files. The directory structure is
often thought of as an inverted tree structure with the root at the top branching down into
lower layer directories and subdirectories. For example -
72
Introduction to Computers
Data and programs are stored on disks in files. DOS itself consists of a number of files
working together to provide the operating system. Other computer programs such as
word processors and spreadsheets are also constructed from a number of files. When you
save work produced with one of these packages (e.g. a document from a word processor)
you save it to a file. When naming a file it is always a good idea to use a name which
indicates the contents of the file. Likewise when naming a directory, which is a special
type of file, you should use a name which helps to identify the files it contains.
File extensions can have special meaning to DOS or other programs and are often used to
indicate the type of a file.
e.g. The .BAT extensions signifies a Batch files. A batch file contains a batch or group of
DOS commands which are performed one after the other when the file is executed (or
run). You execute a batch file by typing its name, without the .BAT extension, at the
DOS prompt. AUTOEXEC.BAT is a batch file which is often found on the boot disk.
73
Introduction to Computers
DOS accesses this file in the last stage of booting (i.e. starting) your system and executes
each command it contains.
Here are some commonly used extensions and the type of file they indicate
These follow the same rules as ordinary file names except that extensions are not allowed
in version 5 and earlier versions of MS-DOS. Remember that a directory is just a special
kind of file - i.e. a file which can contain other files.
When a list of files is displayed on screen the label <DIR>is appended to those names
which in fact indicate directories.
Commands are entered at the DOS prompt, e.g. A> or C> or F> which, as previously
noted, informs you of the default or current drive. The exact form of the initial prompt
depends on what type of disk booted the computer and whether the startup file
AUTOEXEC.BAT, has customised the prompt. A letter plus > (greater than sign) is the
default prompt.
For example A:\> indicates that the computer was booted with a floppy disk, whereas C:\
> means the computer was booted from a hard disk and F:\> indicates that the computer
may have been booted from a networked machine.
A command line can contain just a command itself i.e. a single word, but most commands
can take parameters (or arguments) indicating files or directories on which the command
is to operate. Parameters are separated from commands by one or more spaces.
74
Introduction to Computers
You finish a command line by pressing the Return or Enter key (<return> or <enter), and
this signals the computer that you have finished typing in your command and that it
should carry it out.
Unless you specify in a command line a particular (Disk) Drive to use, DOS will attempt
to execute the command on the current, or default, drive. i.e. It will look for the
directories and files referenced in the command line on the disk in the drive indicated by
the screen prompt, e.g.
A> (diskette)
Suppose the current/default drive is C and you are going to perform a lot of operations on
your diskette in drive A. To avoid typing A: in your command line every time you
execute a command you can change the default drive.
Very usefully DOS buffers (i.e. remembers) the last command you typed in. If you want
to run that command again simply press F3 and then <return> to run it. F3 Recalls the
last command the user entered
This is a simplified illustration of the basic format of DOS command lines. The
command-name is of course essential but, depending on what that command is, the other
elements of the command line may or may not be present. Moreover some command
lines will contain additional elements not included in this example. The components of
the command line are explained below.
(Note - it is not necessary to understand this abstract illustration of the DOS command
line as examples are given for each of the commands discussed in these notes. Indeed you
might prefer simply to look at the actual commands.)
75
Introduction to Computers
DRIVE: = a letter plus colon indicating the relevant disk (drive) for the following path
and directory/file.
Usually
C: for the hard disk drive.
A: for the floppy disk drive.
B: if there is a second floppy disk drive.
F: for a network disk.
PATH = a hierarchy of directories, each preceded by a \ (back slash), from the Root
directory of the disk (represented by the first \) to the directory containing the directory or
file on which the command is to be executed.
e.g. \faculty\dep_ment\admin
Note - If you are already in the directory which contains the file or directory to be
manipulated then the drive and path do not need to be specified.
If a path has been specified then a \ must be placed before this item to separate it from the
path.
e.g. \faculty\depart\admin\minutes.doc
Throughout the notes, a number of possible switches are listed for each
Switches can usually be combined - i.e. you can have more than one switch for a
particular command.
Note - Very often elements of this syntax can be omitted, in which case DOS will use
defaults. e.g. If no DRIVE: is specified in the command line, then DOS attempts to
execute the command on the current drive (i.e. that indicated by the screen prompt). If
no PATH is specified, then DOS attempts to execute the command in the current
directory (i.e. the directory in which you are currently working).
76
Introduction to Computers
An example of how the commands are presented in the notes is now given using the DIR
command. The command name and a brief note of what it does is given in the heading,
followed by a little more explanation, its syntax and some examples.
This command lists information about files and subdirectories and the amount of free
disk space.
Example: List the contents of the root directory of the hard disk
DIR C:\
Version 5 of DOS came with a command which helps the user establish what each DOS
command can do. (DOS 6 provides a similar, more graphical facility.)
Example 1: Display a brief description of what all the DOS commands do.
HELP
HELP DIR
or DIR / ?
This will provide the syntax of the command in a form similar to that used in the notes.
77
Introduction to Computers
A disk must be formatted for a particular operating system before it can be read from or
written to by that operating system. DOS formatting creates:
a) A new root directory and file allocation table on the disk, it also
b) Destroys anything already on the disk.
Therefore do not format a disk until you are sure there is nothing on the disk that you
want to preserve.
You will not normally need to format a disk a second time (i.e. after your initial format of
a blank disk). If you do reformat a disk, all existing data on it will be destroyed.
S - create a DOS system/boot disk - i.e. Format the disk and automatically install the
DOS system files (IO.SYS, MSDOS.SYS and COMMAND.COM) on it
F:x - where x is the floppy disk size i.e. one of 160, 180, 320, 360, 720, 1.2, 1.44, 2.88
FORMAT A: /F:720
If you use the FORMAT command without switches on a 3.5" disk in a HD (1.44 MB)
drive, DOS will attempt to format that disk to 1.44 MB even if it is a DD disk. This will
result in a disk which is unreadable on DD drive machines. By using the F:720 switch the
disk will be readable on both types of machine.
Other SWITCHES
Together these provide an alternative to the F:x switch for specifying the size of the disk
being formatted, e.g.
78
Introduction to Computers
Remember
A machine with a HD drive can read and format both HD and DD disks.
A machine with a DD drive can read and format only DD disks.
FORMAT A:
FORMAT A: /S
FORMAT A: /F:720
/T:80 /N:9
If you already have a formatted disk which you want to be able to use as a System (or
Boot) disk, you can install the 3 essential system files to it using this command.
Example: Make the diskette in drive A a system disk by installing the system files on the
hard disk to it
SYS C: A:
Note - that to make a disk a system disk you must either use the /S switch with the
FORMAT command, or use the SYS command. Simply copying the system from one
disk to another does not create a system disk.
The UNFORMAT command is a limited safe guard introduced in DOS 5 to recover data
from a disk which have been lost as a result of performing a FORMAT.
You should not really need to use this command if you are careful. It is good practice
always to use the DIR command on a disk to see if it has already been used before trying
to format it. If DIR displays information about files and directories or disk space then the
79
Introduction to Computers
disk is already DOS formatted. (However this simple test does not let you know if the
disk has already been formatted but for a Macintosh computer.)
Note - Unformatting a disk only works if the UNFORMAT command is used before
putting any new files on it.
Where SWITCH is
TEST - display only, non committal of data. This shows how UNFORMAT would
attempt to recreate the information on the disk, but does not actually unformat the disk
and do so.
UNFORMAT A: /TEST
UNFORMAT A:
DISKCOPY makes an exact copy of one floppy disk (the source disk) on another (the
destination or target disk). The original contents of the destination disk are destroyed. If
the destination disk is unformatted DISKCOPY will format it. The disks should be of the
same type (e.g. two 1.44 MB HD disks), however if the destination disk is of a different
type from the source disk DISKCOPY will try to format it to match the source diskette
but this may not be possible.
Note - The XCOPY command (see later) is the best command to use when copying files
between different types of disk (e.g. a 720 KB DD disk and a 1.44 MB HD disk), or when
you want to preserves the original contents of the destination disk.
Example 1: Make a copy of a diskette using two identical drives. (The copy will be from
the diskette in drive A to the diskette in drive B)
DISKCOPY A: B:
If you only have one floppy disk drive, which is normal, you can still make an exact copy
of a diskette. You specify drive A twice in the command line, start the copy with the
80
Introduction to Computers
source diskette in that drive, and swap it with the target diskette as directed during the
copying operation until the copy is complete.
DISKCOPY A: A:
MD C:\DOCS
MD C:\DOCS\WORK
MD C:\DOCS\WORK\TEMP
Example 4: If you were already in the WORK directory (see next section re changing
directory) the following would be sufficient to create the TEMP subdirectory
MD TEMP
The CD or CHDIR command is used to move from one directory to another; or to show
the current directory path (i.e. the hierarchy of directories from the root directory to the
81
Introduction to Computers
one you are currently working in). The directory you are currently in is known as the
current or default directory. When you move to another directory it becomes the current
directory. Once your system has booted your initial current directory will normally be the
root.
DOS uses the following 'special' characters to reference particular directories within the
directory structure and these can also be used with the CD command.
CD C:\DOCS\WORK\TEMP
Example 2: Display the path to the current directory (i.e. Current Directory Path)
CD
CD ..
Example 4: Move back to the subdirectory TEMP (this example assumes you are
currently in subdirectory WORK; use example 2 to check before moving)
CD TEMP
Example 5: Move to the root directory. (This will make the root the current directory)
CD \
It is useful if you can see immediately from the command/screen prompt what directory
you are currently working in (i.e. the current directory) and the path to that directory. The
PROMPT command enables you to do this.
To make the command prompt show the path to the current directory, and not just the
letter representing the default disk drive, type
PROMPT $P$G
82
Introduction to Computers
Your AUTOEXEC.BAT file may already include this command line, if not it can be
edited to do so. In this way a useful prompt will be set up every time you start a new
session on your computer.
After typing PROMPT $P$G as indicated, move up and down through the directory
structure to see how the prompt changes.
The TREE command enables the user to obtain a graphical view of the structure of
directories and subdirectories on a disk.
Where SWITCH is
TREE C:\DOCS
TREE C: /F
RMDIR or RD is used to remove a directory. This command will only work if the
directory concerned is empty.
RD C:\DOCS\WORK\TEMP
DOS 6 introduced the DELTREE command which allows you to delete directories
whether or not they are empty. (i.e. it allows you to delete all the files and subdirectories
in a directory plus the directory itself with a single command.) This command should be
used with care.
Renaming directories
In DOS 5 there is no single command that allows you to rename a directory. You have to
use a combination of the MD, XCOPY, DEL and RD commands. This has been
83
Introduction to Computers
addressed in DOS 6 with the introduction of the MOVE command which can be used to
rename directories or move files. (For DOS 5 renaming directories is simpler with
DOSSHELL - see later.)
For many DOS commands there is a program file which has to be executed in order for
the command to work. In the examples so far we have assumed that this is not a problem
but in fact DOS has to know where on disk, i.e. in which directory, the corresponding
program file is. If it cannot find the file then the command will fail. By default DOS will
only look in the current directory for this program/executable file. If it is not there then
DOS has to know the path (i.e. the hierarchy of directories from the root) to it.
This can be achieved by prepending the relevant path to the command name whenever
composing a command line. However it would be better if DOS could simply be told in
which directories to look for program files whenever a command name was entered. This
can be achieved by using the PATH command. It enables you to specify the path to
directories DOS should search, after the current directory for the program file for a
command. Once this command has been issued DOS will remember these directories
until the command is used again either to clear the search path or set a new search path,
or until the machine is switched off.
Example 1: Set a path to \ (the root directory), and the DOS directory
PATH C:\DOS
This instructs DOS that after it has searched the current directory for a program file, it
should then search the root directory of C: and then the DOS subdirectory of the root.
This should be a minimum search path when using DOS because most of the DOS
program files are usually kept in the DOS subdirectory and the root directory. It allows
the DOS commands to be used, as in these notes, without prepending them with a path. A
search path containing at least these elements is usually set up in the AUTOEXEC.BAT.
Example 2: Add the directory MEMOS on the diskette to the search path
You can also use the PATH command to see what directories are currently in the search
path, and to clear it.
84
Introduction to Computers
This command lists the names of files and directories in the current directory, or one
specified in the command line. It can also provide additional information such as the
amount of free space on the disk, the dates directories were created, and the dates files
were last modified and there sizes.
85
Introduction to Computers
Example 1: List the contents of the root directory of the floppy disk
DIR A:\
Example 2: Produce a wide listing of the current directory of C one page at a time
DIR C: /P /W
Example 3: List every occurrence of the file AUTOEXEC.BAT in the current directory
and its subdirectories
DIR AUTOEXEC.BAT /S
Example 5: List only those files in the root of C which are hidden
Wildcard Characters ? *
A Wildcard Character is a character which has special meaning. In DOS wildcards are
the * (the asterisk) and ? (the question mark ). They are usable with many DOS
commands. The question mark represents any single character, and the asterisk a string of
characters. Wildcards enable you to do more with the basic commands.
As examples, suppose you wanted to use the DIR command to list only the files that
ended with a particular extension, or started with a particular word.
Example 1: Display only those files in the root of C whose name ends with the .COM
extension
Example 2: Display those files in the DOS directory which start with DISK, are followed
by 4 characters, and have any extension.
DIR C:\DOS\DISK????.*
You should get into the habit of using the DIR after you have executed a command (e.g.
the MD or CD commands discussed above, or the COPY, DEL etc. commands below) to
confirm the effects of that command.
86
Introduction to Computers
To create a text file in DOS you invoke the Screen Editor by using the EDIT command.
Carry out the following steps to create your own file; this will give you a file on which to
practice the other commands.
Then type in the bold text below, using your own name where it says your name. This
text will constitute the contents of the file. (If you make a mistake while typing use the
following keys to make corrections. - The Delete and BackSpace keys to remove letters;
the (Arrow) keys to position the Cursor without removing letters; and the
Insert key to switch between Insert and Over Write mode.)
@echo off
echo.
echo GOOD DAY your name
echo.
Once you have finished press the Alt key which, as indicated at the bottom of the screen,
activates the menus. You will see the first letters of the Menu Items at the top of the
screen become illuminated. The File item should be highlighted. If not use and to
87
Introduction to Computers
highlight it. Press the Return or Enter key to activate the File Menu. Use to move the
menu Bar down to Save As, and press <return< to select this option.
Type in the file name HELLO.BAT <return>. You have now created a file called
HELLO.BAT, containing the above text. Now leave the Editor by activating the File
Menu, and then selecting Exit.
The file you have just created is a simple Batch file - i.e. a file of DOS commands which
will be executed, one after the other, simply by typing in the name of the file (without the
.BAT extension).
To run this batch file type HELLO <return> at the DOS prompt.
The Editor provides an easy method of creating a new text file. It is particularly useful for
creating DOS batch files (which are special text files). If you want to modify/edit an
existing text file then you simply supply the name of that file as a parameter to the
command. Once in EDIT you can use a mouse, or simply the keyboard, to highlight text,
cut (or copy) and paste that text, select menu items, etc. Most of the commands in EDIT
are self explanatory and easy to use.
EDIT HELLO.BAT
The COPY command enables you to make copies of files. It may be used to make a copy
within a particular directory, to copy from one directory to another and to copy from one
disk to another. You can use the command to copy one file by using its filename, or
several files by using the DOS wildcard characters * and/or ?
COPY C:\HELLO.BAT A:
Example 2: Make a copy of a file within the same directory. You have to give the copy a
different name. e.g. GREETING.BAT
Example 3: Copy all the files in the root of A to a directory on the hard drive
88
Introduction to Computers
Now use the DIR command to list the files on drive A again.
The XCOPY command behaves in the same way as the COPY command, however it
allows the copying of all the files in a directory, and also its subdirectories.
Command Syntax:
Example 1: Copy the contents of the DOCS directory, and its subdirectories, including
empty ones, to directory TEMP-DIR on A
DOS will allow you to create the TEMP-DIR if it does not already exist.
Example 2: Copy all the files in the root directory of C modified on or after 1/1/96 to A
Example 3: Copy all the files in the A drive's TEMP-DIR directory to a directory with the
same name on the C drive
The DEL or ERASE commands perform the same operation; you can use either.
The P switch causes DOS to prompt the user with the name of the file to be deleted, to
confirm that this is really his intention, before actually carrying out the deletion. If the P
switch is omitted then the deletion is carried out silently.
89
Introduction to Computers
Example 1: Prompt the user with the name of each file in the current directory that has
the extension .BAK, and ask him to confirm whether it should be deleted
DEL *.BAK /P
DEL C:\DOCS\HELLO.BAT
DEL A:\*.*
Whenever the wildcard character is used in this manner, the user is always reminded that
all files in the directory will be deleted, and asked to confirm Yes or No.
Warning
NEVER delete the file COMMAND.COM file since it is the file which enables DOS
commands to run.
Be very careful when using wildcard characters with the DEL/ERASE command, as you
will not be asked to confirm the deletion of individual files when using it (unless you use
the /P switch) and so may delete a file which you really need to keep. You should always
use DIR to list the contents of the directory before you start deleting using wildcards, to
see exactly what files will be affected.
The UNDELETE command, which was not available before DOS 5, attempts to undo the
use of DEL. It provides a degree of protection against accidental deletion of files.
UNDELETE relies on the fact that DELeting a file does not physically remove it but
simply marks the area of disk concerned as available for reuse. Thus once you have
deleted a file you will not see it if, for example, you execute the DIR command but
providing it has not been subsequently overwritten it should be recoverable using
UNDELETE.
LIST - list all files deleted which have not been subsequently overwritten
ALL - undelete all deleted files without prompting the user
Example 1: Undelete the file called HELLO.BAT which has been deleted from the A
drive
90
Introduction to Computers
UNDELETE A:\HELLO.BAT
Directory: A:\
File Specifications: HELLO.BAT
Example 2: Undelete all files that are recoverable in the current directory
UNDELETE
DOS 5 does not have a specific command for moving files (DOS 6 does) but this can be
achieved by using the COPY (or XCOPY) and DEL commands. i.e. Making copies and
then deleting the originals.
Example: Move all the document files in the root directory of drive C to drive A
COPY C:\*.DOC A:
DEL C:\*.DOC
The RENAME or REN command is used to rename a file or a group of files. The file
contents and the location of the renamed files remains the same.
91
Introduction to Computers
The DOSKEY command is only available in DOS 5 and 6. Once the command is issued
and the DOSKEY program installed it saves subsequent command lines typed in at the
keyboard in an area, or buffer, of RAM; this in effect means that it 'remembers' previous
command lines. The user can recall these lines with a few simple keystrokes instead of
having to type them in again.
DOSKEY <return>
From this point on the command lines you input will be remembered.
You can then use the and (or F8 ) keys to view the command lines and <return> to
execute your choice.
You can edit a command line you have recalled by using the and keys to position
yourself within the line and using the Insert key to switch between Over Writing and
Inserting text before typing in your changes. You can also clear the current command line
by pressing the ESC key.
Additionally
The TYPE command is used to display the content of a textfile on screen. (If the screen
displays garbled characters, with regular beeping sounds, then it is likely that the file is a
non text file.) TYPE merely displays a file; it does not allow you to edit/change it.
TYPE MESSAGE.BAT
92
Introduction to Computers
The PRINT command allows you to obtain a print-out of a text file. Printers are slow
devices and are often shared by more than one computer. Obviously you do not want to
have to wait until your file is physically printed before being able to continue using your
machine. Therefore when you execute the PRINT command your file is added to a print
queue - this is a list, stored in memory, of files waiting to be printed. This 'queuing' of a
file by PRINT is very quick; much quicker than the actual printing of the file. Once the
PRINT command has been executed DOS is free to execute other commands even though
the relevant file might not yet have been printed. You can continue working and the file
will be printed, in the background, when it reaches the top of the queue.
T - Terminate printing i.e. remove all files from the print queue
PRINT /C MESSAGE.BAT
PRINT /T
The COPY command can be used as a quick method of creating a small text file. The
command line you use instructs DOS to copy all subsequent screen output (represented
by CON:) to the file you specify, until you terminate this action and close the file by
pressing Ctrl+Z (i.e. pressing the Ctrl key and before releasing it pressing the Z key) or
the F6 function key.
This method of creating a file is very crude. Unlike EDIT or other editors it does not
allow you to correct your mistakes as you are creating the file.
93
Introduction to Computers
Type in the following. Every thing you type after the COPY line will be stored in LONG-
MSG.BAT until you press Ctrl+Z or F6. If you make a mistake while typing you can
abort what you have done and return to the DOS prompt by pressing Ctrl+C (i.e. pressing
the Ctrl and C keys in the manner indicated for Ctrl+Z above). Use your own name where
it says your name.
Now run this batch file which you have just created.
ATTRIB enables you to assign files the properties, or attributes, of being Read Only (R),
Hidden (H) and System (S) files. Each of these attributes (R, H, and S) is assigned with +
and cleared with -
R - read only file attribute (file cannot be deleted or edited but can be listed with DIR and
viewed and copied)
S - system file attribute (file cannot be deleted or copied, nor is it visible with the DIR
command but it can be edited)
SWITCH is
94
Introduction to Computers
Example 1: Protect the MESSAGE.BAT file from being deleted or changed - i.e. making
it Read Only
ATTRIB +R MESSAGE.BAT
Try deleting or editing the file once you have added this attribute.
ATTRIB -R MESSAGE.BAT
ATTRIB +H *.BAT
ATTRIB +H *.BAT
Note, that although System and Hidden files cannot be seen using DIR, it is possible to
find out what files have these attributes (and their names if you have forgotten them) by
using ATTRIB on its own to view the attributes of all files in your directory.
REFERENCES
ELLISWORTH J.U.H and ELLSWORTH M.V, The new Internet Business Book New
York
John Willey and Sons Inc:, 1996
LAUDON, KC AND LAUDON J.P (4th Edition) Management Information Systems, and
the internet New York ,Drydon press, 1998
SUSAN B, PECK AND STEPHEN A, Building your own website: Everything you need
to reach your audience on the web, O’Leilly and Associates, 1996
95
Introduction to Computers
PASTORE, MICHAEL, SHOPERS Say E-commerce Was Good For Them URL:
http://www.cyberatlas.internet.com
Also Used WIKIPEDIA, HOWSTUFF WORK and many other Internet resources.
96