Naming Files

Just as files are named in the manual system, computer files too are given names. A disk will not necessarily contain only one file. It will probably have more than one file and you may need to refer to a specific file. Hence there is a need for file names. A file name should be descriptive and meaningful. Certain conventions are followed while naming computer files. A file name can have two parts:

  • Primary name
  • Extension

The primary name and the extension are separated by a dot (.)

File Naming Conventions

File Naming Conventions

A primary name can have a maximum of eight characters while an extension can have a maximum of three characters.

A file name is valid even if it has no extension. However, extensions help in easy identification of a particular type of file. Therefore, a picture file has an extension of .bmp, a text file has an extension of .txt, and a program file has an extension of .prg and so on. File names can consist of the following characters:

  • An alphabet                        (A-Z)
  • A numeral                           (0-9)
  • Other characters                 ($, #,&,©,!, %, (), -, _, {},', ~,A) except ( \, /, *, ?, <>, and | )

While files are named by the people who create them, certain conventions are followed. Also, each file in a particular location on a disk needs to have a unique name.

Examples of some valid file names are:

  • EMPLOYEE.DAT
  • EXECUTIVE.T
  • XYZ
  • 123.45
  • HRD.RPT

The file name that you give must be meaningful. Meaningful file names enable easy identification of files. For example, if you want to create a file containing salary details of the employees, the name given to the file could be EMP.SAL or SALARY. These names indicate that these files contain data on salaries of employees.

If you were to name this file as XYZ.123 or $%$.TEN, you are most likely to forget the name of the file. Besides, the filename also does not convey what the file contains. Similarly, if your file contains a report of the financial status of a company, a name like FINANCE.RPT would make more sense than, say ABC.PQR.

Computer Files

In the Computer Overview module, you learnt about the various types of files and their storage. An organization maintains a number of files for keeping the records of various departments. Let us look at the manual system of file organization.

The employee file is one of the files that we examined in the Computer Overview module. The other files containing details of the stock of raw materials and the list of client details are also arranged in this filing cabinet (refer Figure).

Filing Cabinet

Different Files in a Filing cabinet

The files stored on a computer may be of different types which include text files that stores textual information, graphic files that stores information in the form of a picture or a graph or a program file that stores program code.

Data Organization

It has been mentioned earlier that in a computer system, the data that is input gets converted into information. We also identified the need for external storage media on which data can be stored for future use.

In our day-to-day lives, we store information in the form of files, be it our telephone directory, or the record of our monthly expenditure. The medium that is used in this type of manual storage is usually paper or other such physical media.

Similarly, information is also stored on the computer in the form of files, but the media is either external storage or internal storage. A computer may have the following types of files on its storage media:

  • Text files
  • Data files
  • Graphic files

Types of Files

Types of Files

Text Storage on a Storage Media

Example of a Text File

Example of a Text File

Any kind of text information, be it letters, documents or memorandums, is stored on the computer in the form of a file, which may be broadly classified as a text file. An example of a text file is shown in Figure.

Data Storage on a Storage Media

Manual Data File

A Manual Data File

Let us now look at how a company manually stores its data. In a manual system, data is stored in the form of a file. A manual file may contain the particulars of each employee in a company (refer Figure).

The manual employee file of a company has several cards, each with the details of one employee. The data to be used in a computer is also stored on a storage media i.e. the floppy disk or hard disk, in the form of a data file. However, a computer data file does not look like a manual data file. Data in a computer file is organized in a different manner (refer Figure).

Computer Data File

A Computer Data File

where

DESIG = designation

DEPT = department

AGE = age of the employee.

In a computer file, the particulars of each employee are contained in a single line. This is referred to as a record. For example, the complete data about employee ANN MURRAY, regarding his designation, department and age, is one record. Thus, a computer file is more compact than a manual file.

Each piece of data in the record is called a field. A field has two components—the field name and the field content (refer Figure). NAME, DESIG, DEPT and AGE are field names. Each record in the file contains these four fields. The field contents are JOHN BROWN, MARY MILLER, CONSULTANT, HRD, 52, etc. The contents of a field usually differ from record to record. You will recall that a character is any alphabet, numeral or symbol, such as %, *, etc. Each field comprises a number of characters. To sum it up, a field comprises several related characters, various related fields make up a record and many such records make up a file (refer Figure). Fields in the records have names.

Graphic Storage on a Storage Media

Example of a Graphic File

Example of a Graphic File

The computer is also capable of storing pictures, moving videos, sketches and other forms of visual information. This type of information is stored in the form of files that may be broadly classified as graphic files. An example of a graphic file is shown in Figure.

Software

A PC is incapable of performing any task with the hardware alone. It requires instructions that determine whether it will function as desired or not. Like data, instructions are also entered via the keyboard. In computer terminology, a set of instructions is called a program and one or more programs are called software.

Software used on computers may be of different types. Some important classes of software are:

Application Software

We spoke of computer applications and identified certain areas where computers are being used today. Software specially suited for specific applications is now available in the market. For example, software for billing systems, accounting software or software that enables the creation and storage of documents. Such software is called application software since it is designed for a specific application.

Application software that takes care of a variety of business and corporate needs can now be bought off the shelf. These are also called standard software packages. They are reasonably priced and can run on any standard PC.

Two popular standard software packages are Financial Accounting and Inventory Control packages.

In case a user is not satisfied with the available package, because it does not meet all the requirements, the package can be modified.

However, if the package cannot be modified, the user can opt for a customized software package. A customized package is developed for a user's specific needs and may not be relevant to any other user.

Though these packages are for very specific applications, there are general application softwares like database management systems (DBMS), spreadsheets and word processors.

Using a DBMS software, a user can maintain large volumes of data that can be modified, updated and queried.

A spreadsheet package allows a user to enter numeric data, specify formulae and perform calculations. Graphs can also be generated from the given data. The special feature of automatic recalculation allows changes made in any one item to reflect in all items dependent upon the first one.

A word processing package converts a PC into a sophisticated typewriting machine. It has the facility to perform spell checks, provide for synonyms, and allow changes or corrections in the document without having to re-type the entire document.

Compiler Software

Consider the case of four persons, Leonardo, Chou, Ivan, Hari, who understand and speak Spanish, Chinese, Russian and Hindi, respectively. To be able to understand each other, they would require some person or persons who could translate whatever is spoken into the language each understands.

Similarly, since there are so many programs written in different computer languages, the hardware also needs a translator to convert the computer language into a form that it can understand.

The computer only understands a language of electrical signals, called machine language.

Software called the compiler converts the computer language into machine language. For example, there is a C compiler that converts programs written in the C language to machine language.

Operating System

Besides the application software and compiler software, there is a third kind of software, called the operating system, which is very important for the working of the PC.

When a user wants to store any data or program, the data or program is stored at a location that is known only to the operating system. Therefore, the operating system performs the task of storage management.

Besides storage management, the operating system also performs device management. For instance, when a user wants to print information on the printer, or display information on the VDU, he or she does not have to bother about the actual transportation of the information from the internal storage to the VDU or to the printer. The operating system takes care of it.

Computer Languages

All application software packages are written in computer languages. There are various computer languages like C, C++, FORTRAN and Pascal. Each language is best suited for a particular application.

C and C++ languages are used to develop highly complex software. FORTRAN is used for scientific applications

Each language has its own vocabulary. There are some packages like FoxPro, MS Access and Sybase that are more English-like. Thus, even non-computer professionals, like executives and managers who have never studied computer science, can learn to use these languages.

Since each language has its own vocabulary, each language differs from the other.

Disk Drives

We have identified the need for an external storage media and made a comparison between two popular forms of storage media—the hard disk and the floppy disk. However, the microprocessor does not perform the task of writing on or reading from this media. A device specially designed to perform these functions is the disk drive.

Data is fed into the PC and written on the hard disk or the diskette by the disk drive. When the data is to be processed, it has to be read from the disk before processing actually takes place. The disk drive also performs this function of reading the data. Since the disk drive performs both the tasks of writing and reading the data, in other words, the input and output functions, it is referred to as an \nput-output device.

A simple analogy of how a disk drive works is the cassette tape recorder. It encodes music and stores it on a cassette tape as a series of signals. It also reads the stored signals on the cassette tape and converts them back to music. The cassette player records as well as plays back the music. Therefore, it performs both reading and writing. A disk drive works in much the same way, reading and writing whenever required.

The disk drive is contained within the system unit. The drive for a diskette is called a diskette drive while the drive for a hard disk is called the hard disk drive.

It is important to differentiate between the storage media and storage devices. While the diskette and the hard disk on which data is stored are the storage media, the disk drives are the devices that do the reading and writing. Going back to the analogy of the cassette tape recorder mentioned earlier, the cassette tape would be called the storage medium while the cassette player is the storage device.

External Storage

Since the internal storage capacity of PCs is limited, it places a restriction on how much data can be stored at a time for processing. However, this is not the only drawback. Once the PC is switched off, or in case of a power failure, all the data stored in the internal storage is lost. This means that every time you want to work on the PC, you would have to input the data required for processing.

For permanent storage of data, external storage media can be used with a PC system. External storage is also referred to as secondary storage.

There are two kinds of external storage media used with a PC, they are:

  • Floppy Disk
  • Hard Disk

Another media for external storage is the cartridge tape. It is particularly suitable for storage of large volumes of data. Now, CD-ROMs and Magneto-Optical (MO) disks have also become an important media to store large volumes of data.

Floppy Disk

Hard Disk

Also referred to as diskettes or floppies.Also referred to as the fixed disk.
Removable. Suitable for moving data from one computer to another.Non-removable. It is attached within the system unit.
Made of flexible vinyl material. Less resistant to damage by heat, dust and accidental twists.Less prone to damage since it is within the system unit and is packed airtight.
The diskettes currently in use have a diameter of 3.5 inches with a storage capacity of 720KB or 1.44MB.Can store data in the range of 20 MB to a few GB.
Diskettes having a diameter of 5.25 Inches and a typical storage capacity of 360KB is also used, but is slowly being phased out. 

Comparison between a Diskette and a Hard Disk

Internal Storage

Besides the microprocessor, the system unit also contains a storage area where the data is stored before being actually processed. This storage area is called the internal storage. It is also referred to as primary storage, main memory ox Random Access Memory (RAM).

Internal storage capacities may differ in different PCs. Typically; a PC will have an internal storage capacity of 640,000 characters or more.

In computer terminology, the storage capacity of a PC is measured in terms of bytes, where one byte can store one character. Character here refers to any alphabet, number or other symbol. Therefore, to store the word COMPUTER, 8 bytes would be required. Just as there is a basic unit, gram, and another unit, kilogram to measure weight, there is also byte and kilobyte (KB) to measure storage capacity. One KB is approximately equal to 1000 bytes. Therefore, 1 KB can store approximately 1000 characters. Another common unit of measurement of storage capacity is the megabyte (MB), which is equal to approximately 1000 KB. Very large storage capacities are measured in terms of gigabytes (GB). One GB is approximately equal to 1000 MB.

Comparison Between Printers

The output on the VDU cannot be stored for later reference. For a permanent output, you would require a printer that is also a common output device. Using the printer, you can obtain output on paper. Printers are capable of printing at very high speeds. The printers commonly used with the PC are the dot-matrix printer, the ink jet printer and the laser printer.

Dot matrix Printer

Ink-jet Printer

Laser Printer

Prints characters formed of dotsPrints fully formed charactersPrints fully formed characters
Speed: 200-540 characters per secondSpeed: 4-8 pages per minuteSpeed: 4-20 pages per minute
Accepts up to 132-column stationaryAccepts up to 80-column stationaryAccepts up to 80-column stationary
InexpensiveModerately pricedExpensive

Comparison between Printers

Visual Display Unit (VDU)

Now that you are familiar with some input devices of the computer, let us take a closer look at an output device. Data that has been processed needs to be displayed to the user. This is done using the monitor or the VDU. The VDU is similar to a TV screen and can display both text and graphic images. The display can be either in black & white or color.

Keyboard

The keyboard has already been identified as an input device. This is a component that closely resembles a typewriter console.

While working on the PC using a keyboard, you will notice a flashing point on the VDU. This is the cursor. When you press a key on the keyboard, a character is displayed at the point where the cursor is flashing and the cursor moves one position forward. The keyboard provides different keys to perform various operations.

Key

Function

F1- F12 (Function keys)Used to perform special functions that depend on the software being used.
Enter or ReturnUsed to execute an instruction or data being keyed in through the keyboard
Caps lockUsed for keying in capitalized alphabets.
ShiftCapslock off: If pressed simultaneously with a character key, a capitalized alphabet is input.
Capslock on: It reverses the above effect.
Also used to input the upper symbols for keys with two symbols or characters on them.
Ctrl, AltPressed with other keys, they input special messages to the computer.
BackspaceUsed to erase the character to the left of the cursor position.
NumlockUsed to activate the numeric keys on the Numeric keypad.
Cursor keysUsed to move the cursor in the direction indicated.
Home, End, PgUp, PgDnUsed to perform special functions, with which you will become familiar during the course.
InsUsed to insert characters at the current cursor position.
DelUsed to delete characters at the current cursor position.
EscDepends on the application. Usually used to cancel a command.
Print ScreenUsed to print whatever is displayed on the screen.
SysRqSystem Required; depends on the application.

The Keys and their Functions

Benefits and Limitations of Computers

The fact that computers have made their impact on almost all aspects of life in today's world can hardly be questioned. The question that you may ask here is how do you benefit from using a computer.

A computer provides three basic benefits:

  • Speed
  • Accuracy
  • Diligence

Computers work at very high speeds and are much faster than humans. The human equivalent of an average computer would be one million mathematicians working 24 hours a day. Computers rarely make mistakes. In fact, most computer errors are caused by human frailties. Unlike humans, computers simply do not get bored or tired. The monotony of repetitive work does not affect computers.

However, computers cannot take over all activities simply because they are less flexible than humans. They have to be explicitly told what to do. They cannot perform anything outside the defined scope. If an unanticipated situation arises, computers will either produce erroneous results or abandon the task altogether. They do not have the potential to work out an alternative solution.

Other Computer Systems

The PC is although the most popular computer system, there are other computer systems too, which are categorized on the basis of size, cost and performance.

Before we describe some of these computer systems, it is essential to understand the term system. A system is a group of integrated parts that have a common purpose of achieving an objective. These parts or components of the PC system will be discussed in detail later in the course.

A popular computer system is the mini-computer, which is a small, general-purpose computer. It can vary in size from a small desktop model to the size of a small filing cabinet. A typical mini system is more expensive than a PC and surpasses it in storage capacity and speed. While most PCs are oriented towards single users, mini systems are usually designed to simultaneously handle the needs of multiple users, i.e. more than one person use a mini-computer at the same time.

A mainframe is another form of a computer system that is generally more powerful than a typical mini system. Mainframes themselves may vary widely in cost and capability. They are used in large organizations for large-scale jobs.

However, there is an overlap between the expensive minis and small mainframe models in terms of cost and capability. Similarly, there is an overlap between the more powerful PC systems and the mini computer.

At the end of the size and capability scale are the supercomputers. These systems are the largest, fastest and the most expensive computers in the world. They are used for complex scientific and defense applications.

How Does a Computer Work?

Most activities follow the basic principle of Input-Process-Output. Consider an automobile assembly line. The raw materials required by an automobile assembling unit would include body, engine parts, tires, and so on.

These materials are forwarded to the assembling unit. This activity constitutes the input part of the cycle. The process is the actual building of the automobile. Therefore, the process acts upon what has been the input and produces the output, which in this case would be the finished automobile.

l-P-0 Cycle in an Automobile Manufacturing Unit

l-P-0 Cycle in an Automobile Manufacturing Unit

Like all other activities, a computer system too follows the Input-Process-Output or l-P-0 cycle. This can be best illustrated by an example of an airline reservation. A person who wishes to travel by air between Singapore and New York first has to fill in a request slip. This slip contains relevant data, i.e. details of name, age, place of destination, etc. The booking clerk keys in the data from the request slip into the computer. The process in this case includes examining the flight number, the date of the journey, the class requested, and determining whether seats are available as per the reservation details. The output of this process is some information confirming the booking, if seats are available. Otherwise, a message may be issued by the computer turning down the request.

Atlantis Airways

From: Singapore

To: New York

Name

Age

Date of Journey

Time

Class
Sally Chang

25

23rd November 1995

7.30p.m.

Executive

Example of Output in an l-P-0 Cycle

Now let us see how each component of the PC system is related to the l-P-0 cycle. The data in the request slip is input into the computer via the keyboard. Hence, the keyboard is an input device. The processing is performed by a component of the system unit called the microprocessor. The information regarding , availability of seats is displayed on the VDU. Hence, the VDU is an output device.

l-P-0 cycle components of a PC

The l-P-0 cycle components of a PC

The term hardware is used to refer to the physical components of a computer system. Thus, hardware comprises the input and output devices along with the system unit.

Managing Data and Software

Introduction

Before looking into data and software management, let us find out what is disturbing Mr. Croft of Croft Constructions. He and his employees seem to be having problems using computers in their office. The problems are related to managing data and software. Here are the problems as described by them.

Croft: On Thursday, I employed Sally, and decided to put her to work on the computer immediately. As Betty was using one of the machines, I asked her to use the other. This machine did not have MS Word. So I took out the original diskettes and began to load MS Word. To my dismay, I found that the diskettes were corrupted. I called up my software dealer and got another copy the next day. This meant a day wasted for Sally.

Betty: Mr. Croft wanted a list of clients based in New York. I had been updating the database file on both machines and could not remember which machine I had worked on last. As a result, I had to manually check the files. A waste of time and effort. Further, Mr. Croft does not want information about his clients falling into unauthorized hands. I keep files containing client information only on floppy disks, which means unloading and loading the diskettes each time I want to update the files,

Sally: As I was typing a letter for Mr. Croft, I found the message, Your PC is now STONED!', displayed on the screen. As I did not know what it was, I ignored it. Later Mr. Croft discovered that it was a virus. We had to do a major cleaning operation to get rid of the infection.

The above situation highlights some common problems of data and software maintenance. These problems can be easily rectified by maintaining multiple copies of data and software, hiding files containing confidential information and protecting files from viruses. These and related issues will form the contents of this session.

Master and Working Copies of Data and Software

Smallville High School had a file containing the names and marks of its students. While working with the diskette, the Principal accidentally deleted all the files. The results of the students could not be given on time.

The above mentioned problem would not have arisen if the Principal had additional copies of the same set of files.

Consider another situation. Suppose you open a file which contains a letter. To make modifications to it, you will open it, modify it and save the modified letter in the same file. If the power fails when you are saving the file, there is a chance that the data will get damaged. A damaged file is called a corrupted file in computer jargon. Now you will have to write the letter again, unless you had made a copy of the letter earlier. An additional copy of a file is called a backup.

Most computer users keep two or three copies of the same file. The original copy of data/software is called the master copy and the duplicates you make are called working copies. Most users use only the working copy so that the original is always available for emergencies. For example, the master copy will be useful if your hard disk crashes (a hard disk is said to have crashed if all the data and software stored in it cannot be accessed) and your working copy gets corrupted. Or, take the case when you are using your data after a long time. If the duplicate is corrupted, either due to bad storage or maintenance problems, you can always use the master.

Backing up is the process of archiving data and software. Since the amount of data to be backed up is usually very large (sometimes in excess of 500 MB), backups are typically taken on storage mediums like CD-ROM, cartridge tapes and M-0 disks. Most operating systems provide facility for backing up data and software.

Windows NT provides a utility for backing up and restoring files from tape drives. Windows NT Backup is a graphical tool for protecting data from accidental loss or hardware or media failures. NT Backup makes it easy to use a tape drive to backup and restore important files on the system.

Managing Floppy Disks

Adequate care has to be taken of floppy disks or they might get corrupted. Maintenance of floppy disks involves two major functions:

Identification of Data and Software

In contrast to the hard disk, where you store a large quantity of data in well-organized directories, a floppy typically stores specific software or data. The number of floppies you might have to maintain often runs into hundreds, or even thousands. Labeling floppy disks appropriately is the easiest method of identifying data and software.

Paper Labels

Paper labels are used with floppy disk for external identification. As soon as you save any data on a diskette, you should use the label to indicate the contents of the diskette.

Software Labels

Apart from the external labels, software labels, also known as volume labels can be assigned to diskettes. You can assign a character label to the disk to indicate its contents.

While you are formatting a diskette, you can assign a volume label. The DOS command LABEL may also be used for this purpose. It accepts a name from the keyboard and stores it as the volume label. For example, to label the diskette in drive A use the command:

LABEL A:

When a diskette is formatted, the volume label gets erased and you can assign a new one.

Security - Write-protecting Floppy Disks

Protection of data and software is vital, since unauthorized users tend to destroy valuable data and software. Since data and software is going to be stored on floppy disks or hard disks, protecting the floppy disks or hard disks ensures data security to a great extent.

Write-protecting Floppy Disks

You would often create files which have to be used extensively but do not require modification or deletion. These may be data files you are using only for reporting, and not for processing. Or, they may be programs, which you would like to save from being overwritten or accidentally erased.

One way is to make the whole floppy write-protected. In other words, no writing operation can take place on the disk. Data can only be read. In a microdisk, the write-protect tab is a small sticker that has to be stuck onto the floppy disk. In a microdisk, the write-protect tab on the diskette has to be pushed down to enable protection.

Write Protection on a 3½ Disk

Write Protection on a 3½ Disk

Handling Floppy Disks

Floppy disks need special care and handling, as they can get exposed to dirt, heat, and other environmental hazards. Such exposures tend to corrupt the floppy disks. The integrity of the data and software stored is lost. That is why each floppy disk is enclosed in its own protective cover. It also comes with a paper jacket. Some of the things you should observe while handling diskettes are:

  • Store diskettes in their boxes.
  • Hold a diskette always by the corner and write on labels with a felt-tipped pen (a pencil or ball-point pen can damage the disk if you press too hard).
  • Do not place heavy objects on top of diskettes.
  • Do not touch the exposed parts of the disk or bend it.

Microdisks have rigid plastic covers with metal shields that protect the disk from dirt and fingerprints. When you insert the disk into the disk drive, the computer automatically moves this shield aside to read the disk.

Whichever type of diskette you are using, it is important to store it in a safe place, away from dust, moisture, magnetism, and extreme temperatures.

File Access

On a PC, if you have files containing confidential information, you can prevent others from accessing them by denying access to the relevant files or to the machine itself.

You can prevent access to files in one of the following ways:

  • Giving passwords and permissions to the computer system
  • Hiding the files

Some software packages enable you to give passwords for the files you create. The file can be accessed only on supplying the password.

Windows NT provides a multi-layered security architecture. The Security Subsystem of Windows NT is responsible for maintaining security and access-restrictions in the system. The security model provides for discretionary access control so that the owner of a resource (file or folder) can specify which users or groups can access the resources and what type of access they are allowed (such as read, write, and delete). Windows NT also allows the users of the system to specify file access permissions for individual files. The Reference Monitor provides services for validating access to objects, checking user privileges, and generating audit messages.

You can hide files using the DOS ATTRIB command. When you hide a file, the filename will not be displayed in the directory listing. No person can display the file unless the name of the file is known. The file cannot be deleted or copied. The command for hiding one or more files is:

ATTRIB +H <filename>

This hides the specified file(s) from users. The -H option unhides the specified file(s). Figure shows the DIR command before and after hiding the file using the ATTRIB command.

Hiding Files Using the ATTRIB Command

Hiding Files Using the ATTRIB Command

If you want people to read your files but are concerned about them being modified, then you can make individual files read-only. A file is said to be read-only if you are able to examine the contents, but not change them. The command to use is:

ATTRIB +R <filename>

The <filename> can contain wildcard characters to make multiple files read-only. Once a file has been made read-only, it cannot be modified or deleted. An attempt to delete it returns an error message 'Access denied'. Once you have made the required files read-only, your system is secure.

However, if you wish to modify it, you will need to remove its read-only status. This is also done with the ATTRIB utility, with the -R option.

Machine Access

There are two ways of locking a machine. One is to install a mechanical lock that has to be opened by a key. Most of the PCs come with this lock.

Under Windows NT, the Logon Process and the Security Subsystem jointly ensure access restrictions and protection from unauthorized access. The Windows NT Logon Process provides for mandatory logon to identify users. Each user must have an account and must supply a password to access that account. The logon name and password provided by the user is authenticated by the Security subsystem. After successful authentication, whenever the user accesses an object, the Security Reference Monitor ensures that the user has permission to access the object.

Protecting Data and Software from Viruses

On May 14, 1988, most computers attached to the Israel University had their hard disks corrupted. It was reported that nearly 115,000 disks were corrupted on that day. Later on, it was found to be a virus that was programmed to change the system areas of all accessible hard disks. This virus was named the Jerusalem Black Hole virus.

In another incident, people purchasing BASIC programs suddenly found that characters on the screen started bouncing up and down. This was attributed to a virus known as the Italian Ping-Pong virus.

These are just two of the numerous news items related to computer viruses, which you have probably read. One of the buzzwords in the field of computers today is virus. A virus is an actively infectious computer program that places copies of itself into other applications and programs. It also infects data files and documents. The reason why a virus attaches itself to an executable program is that, in order to perform its destructive action, it has to get executed. Thus, it remains dormant until you run the application or program to which it is attached. Viruses, which infect document files, load the virus code into the RAM whenever the document is read.

Typically, on running the program to which a virus is attached, the virus infects all portions of memory and then infects other files on your disks (diskettes and hard disks). So the next person using the same diskette on a different computer spreads the virus to the new system.

The reason why viruses cause so much fear is that they destroy valuable data and programs, which could mean that you loose months of work.

When PCs have been connected together to form a network, the damage can be worse. This is because the virus program spreads from one PC to another, thus infecting all the workstations (the computers that form part of the network).

Effects of Viruses

The effect of a virus can sometimes be very destructive, involving large amounts of data. Different viruses have different effects. Some of these effects are listed below:

  • Corrupting files
  • Increasing file sizes
  • Interference with the display on the VDU
  • Formatting the hard disk, thus destroying data
  • Marking good sectors as bad
  • Destroying contents of some sectors at random
  • Slowing down the system
  • Scrambling file names by manipulating the directory contents; the data is all there, but the user is unable to access it
  • Changing all filenames to a single name.

Viruses are triggered off in various ways. For example, some viruses are triggered off by the date, such as the Jerusalem-B virus which waits for Friday the 13th, when it deletes the program files you execute without your permission. Other viruses are triggered by booting a system, such as the PC Stone virus, that occasionally displays the message 'Your PC is now STONED!' as your computer starts, and causes data loss on, both, the hard disk and floppy disks. The Raindrop virus waits till a .COM file is executed and then starts pushing the characters to the bottom of your screen. Hence, no proper display is possible till the virus is eradicated.

Types of Viruses

There are two main types of viruses. They are:

  1. File viruses
  2. Boot-sector/partition-table viruses

These two types may be detectable or non-detectable. Non-detectable viruses are called Stealth Viruses.

File Virus

A file virus attacks executable program files (files with extension .COM and .EXE). It may replace a portion of the original file with its own code, thus destroying the file, or it may attach itself to the file and yet allow the file to be executed. Examples of file viruses are Raindrop and Jerusalem-B.

Once an infected file is executed, the virus finds itself in the main or internal memory. It continues to exist in the memory even after the file has completed execution. When another file is executed, the virus attaches itself to this file and writes the modified file onto the disk, thus causing one more file to become infected. Some viruses infect a file only once, while others infect a file each time it is executed. The virus continues to infect files till the machine is switched off or re-booted.

How Boot-sector/Partition-table Virus damages your Computer

When an operating system is installed from a floppy disk, the first sector in the outermost track of the floppy contains a short program called the bootstrap loader. This program does the job of loading the operating system into the computer's memory when the computer is switched on. In a hard disk, the first sector contains a program called the master boot program, which does the same job of locating and loading the operating system into the computer's memory. This activity is called booting.

A boot sector virus substitutes itself for the bootstrap loader, and a partition-table virus substitutes itself for the master boot program. These viruses get loaded every time you switch on the system. Once the virus is loaded into RAM, it goes about infecting all files on the disk. Also, to simulate normal processing, the virus program transfers control to the original bootstrap loader so that booting can take place.

The virus infects other diskettes in the following manner. Whenever a diskette is accessed, the virus first checks whether the diskette is infected. If it is already infected, the requested disk access is performed and control is returned to the user. If the diskette is not infected, the virus moves the original boot record of the diskette to some other safe sector and copies its own code onto the boot sector, thus infecting this diskette. It then proceeds with the requested disk access. Some examples of boot-sector/partition-table viruses are C Brain, PC Stone and Birthday Joshi.

Stealth Virus

Stealth viruses are those written in a way so as to avoid detection by standard anti-virus software. A particular virus may be a file virus and a stealth virus, or a boot-sector virus and a stealth virus. The techniques used to avoid detection are self-encryption (where the virus converts its code into some sort of program code), and alteration of disk directory data. One example of a stealth virus is the Whale virus. This is, both, a file infector and a stealth virus. This virus infects .EXE files and adds 9216 bytes to each file size. The virus then subtracts 9216 bytes from this file's entry in the directory to give the impression that no change has taken place.

Virus Detection and Cleaning

Your machine first contracts a virus from an infected diskette. It then passes the infection to other diskettes. When those diskettes are used on other machines, they also get infected. In a networking environment, your workstation can get infected when you interact with other machines on the network.

Viruses are normally identified by the standard messages they use, such as 'Your PC is now Stoned' or 'Welcome to the Dungeon'. If they do not use messages, they can be detected by their signature, i.e. a series of bytes unique to a virus. The detection of viruses is normally carried out by standard software.

Virus Attack Symptoms

You look out for the following symptoms, which may indicate a possible virus attack, viz.

  • Programs take a long time to load.
  • Accessing the disk takes a long time.
  • Strange or irrelevant error messages or screen displays appear.
  • Files disappear; strange files may appear.
  • Executable files change in size.
  • Drive lights come on without reason.

Anti-virus Programs

Cleaning a disk of file viruses involves deleting the virus code from the infected file, while cleaning a disk of boot-sector/partition-table viruses involves deleting the virus code from the respective sectors and copying the boot programs back to their original space.

Although all this seems easy, the actual process is very complicated, and sometimes drastic measures have to be adopted to delete viruses, such as deleting infected files or formatting disks.

Anti-virus programs are mainly of two types:

  1. Scanners
  2. Antidotes

Scanners scan the hard disk or floppy disk and detect many viruses; for example, the program VirusScan by McAfee Associates. These programs normally check for a known number of viruses. Figure 2.5 shows the starting screen of McAfee virus scanner for Windows NT.

The scanner checks all the files on the disk that you specify for viruses and reports if it finds any. Then you can either delete the infected file or let McAfee clean the file. The scanning process is shown in Figure.

Starting Screen of McAfee Virus Scanner

The Starting Screen of McAfee Virus Scanner

Antidotes destroy viruses which they are programmed to detect. Examples are CPAV from Central Point and Norton Anti-Virus from Symantec Corp and McAfee.

McAfee Virus Scanner in Operation

McAfee Virus Scanner in Operation

Some virus scanners reside in the computer's memory and check for the entry of a virus after every I/O operation. On detection of a virus, a warning is displayed and all further operations are suspended.

Examples are Smartdog and UTRes.

However, these days most anti-virus software perform scanning as well as eradication of viruses. A typical example of this category is Norton Anti-virus.

Virus Preventior

Viruses spread when infected floppy disks are transported from one computer to another. It is always better to prevent virus attacks than cure infected disks. Here are a few precautions you should observe to prevent virus attacks.

  • Make sure that the system is always booted from the hard disk or a virus-free, write-protected system diskette.
  • Take frequent backups of all your files; in case of a virus attack, you can always replace your data.
  • Buy software from authorized selling agents; unauthorized software, besides being illegal, has a higher chance of having a virus.
  • Use write-protect tabs on floppy disks that do not need data to be written onto them.
  • Avoid updating the date of your system to match a date on which viruses tend to attack, like Friday the 13th.
  • Do not lend your program disks, as they may come back infected; if you have to give them, make a copy and check for viruses or format the disk when it is returned.
  • Do not let anyone use your system; if this is not possible, do not allow others to use their own diskettes.
  • Never run unknown programs before making sure that they have no virus.
  • Do not copy game-programs from other users who work on different computer systems. Since games are the most frequently distributed type of software, they are frequently infected with viruses.

Worms and Trojan Horses

Whenever viruses are discussed, both Trojan Horses and Worms are discussed in the same context. A Worm is a program that duplicates itself without attaching its code to other programs. Worms normally exist on networks rather than single machines. A Worm creates a number of copies of itself, all running simultaneously, and thus slowing down the system. An example of a Worm is the US Internet Worm, which was injected into the Internet network. This program multiplied uncontrollably, eating up the available memory space of all the infected computers on the network until they could no longer function.

Bulletin boards on networks are the most common source of viruses. In a network, most users wishing to share software, place such software in a place called the bulletin board along with messages for other users. Sometimes virus programmers place infected programs onto the bulletin board and, as a result, the network gets infected. Network users should only access bulletin boards, but not download software from them to their workstations without checking the software for infection.

A Trojan Horse is a supposedly useful program, which encourages you to run it. But its real purpose is to damage files on your system, or to plant a virus or a worm. An example of a Trojan horse is Egabtr, (pronounced as eggbeater). Egabtr is an acronym for enhanced graphics adaptor beater. It is supposed to enhance the images on your screen, but it actually destroys data and programs on disks.

Another Trojan Horse called Stars, is a program to display visual effects on the screen. It does that but, at the same time, locates files containing the network users' passwords and destroys them.

Note: The anti-virus programs for Win NT are different from those for the Windows95 machines. These programs differ in construction as well as usage.

Troubleshooting

Most PC users suffer from an acute fear of something going wrong with the hardware and not knowing what to do about it. Many of the problems that PCs develop are minor ones that can be fixed by the user. Some faults require the attention of a qualified engineer. Identifying the fault and being able to decide whether to call in the hardware engineer or attempt some troubleshooting yourself will go a long way into making you a complete PC user.

Some elementary troubleshooting techniques are listed here:-

Troubleshooting the Mouse

ProblemPossible CausesRemedies
Moving the mouse does not produce corresponding movement of the on-screen cursorBall is coated with dirtExtract the ball by opening the cover underneath the mouse and wash in warm water with soap; dry and replace
The movement of the onscreen cursor is erraticThe mouse cable is knotted/twistedStraighten the cable
The mouse is not responding at all to any movementThe mouse ball may be stuckClean the mouse ball
 The mouse cable may be brokenReplace the cable

Troubleshooting the Mouse

Troubleshooting the System Unit

ProblemPossible CausesRemedies
The computer does not get powered onBad power supplyUse another power point and check if it works
 System problemCall your customer support engineer
"Non-system disk or disk error"Non-bootable floppy in the A driveRemove floppy and boot again
 Corrupted system filesBoot from a new floppy; reinstall the OS if you know the procedure or call an engineer
 Virus InfectionBoot from a clean bootable diskette, scan hard disk and remove virus with anti-virus software

Troubleshooting the System Unit

Troubleshooting the Keyboard

ProblemPossible CausesRemedies
Keyboard does not respond at all or prints wrong charactersBad or loose cableRe-connect cable
 Bad circuitryCall engineer
One or more keys do not workBad key or chipCall engineer and get key or chip replaced
Keyboard allows you to enter either upper-case or lower-case characters onlyThe Shift or Caps Lock key may be stuckLoosen key
 Bad Shift or Caps Lock keyCall engineer and get key replaced

Troubleshooting the Keyboard

Troubleshooting the Printer

ProblemPossible CausesRemedies
Printer does not power on.Power supply not connected or switched onConnect or switch on supply

Check connection or change cable and test
 Bad cable or loose connectionChange power point and get supply checked
Carriage does not move after power onLoose connections between components within the printerCheck connections if you are familiar with them or call engineer
 Internal problemsCall engineer
Does not print during self testLoose connections between components within the printerCheck connections if you are familiar with them or call engineer
 Internal problemsCall engineer
Prints a blank line after each lineSwitch is set to add a line after each line is printedChange switch settings; refer to the printer manual for exact details

Troubleshooting the Printer

Troubleshooting the Visual Display Unit (VDU)

ProblemPossible CausesRemedies
First line of display not on the top line of the screenAlignment problemUse the V-shift control to adjust the display
Display not covering the whole screen but is compressed in the center of the screenAlignment problemUse the H-shift control to adjust the display
Display not stablePower supply fluctuationsChange power supply point
 Interference from other devices, such as an electric heater, vacuum cleaner, etc.Shut off these devices or shift the computer to a different location
Display suddenly vanishes and reappears Loose contact in VDU socketCheck and replace if necessary
 Bad connections within the systemCall engineer
No displayBad cableChange cable
 Brightness maladjustmentAdjust brightness to maximum
 Bad monitor or system problemCall engineer
Bad or no colorMonitor maladjustmentAdjust monitor controls
 Color signals are not properCall engineer

Troubleshooting the Visual Display Unit (VDU)

Communications

You have already seen in the module on Local Area Networks how computers can be linked together to form networks, enabling them to communicate, share information and resources. While information requirements within a limited area (like an office building or university campus) can be handled by Local Area Networks (LANs), communication requirements beyond that need Metropolitan Area Networks (MANs) or Wide Area Networks (WANs).

In this session, you will see how the services available on Wide Area Networks help in expanding the usage of a PC. The rapid increase of such networks has been responsible for transforming the PC from an information-processing machine into a communications center.

Wide Area Networks may be commercial networks which anyone can subscribe or they may be run privately by companies for their internal use only. There are international networks with thousands of users as well as smaller ones run by local computer clubs. Computer equipment manufacturers have networks to give their customers the latest information on their products. Customers can also report problems or place orders through them.

Networks like CompuServe offer their users (subscribers) many useful facilities like:

  • Communication with other users through E-Mail (Electronic Mail) or FAX (Facsimile).
  • Transfer of files from one computer to another. You may want to send a file to a particular user, or you may want to share a game or utility that you have developed with other users. In such a case, you can upload (send) it to the network, from where other users can download it for their use.
  • Access to centralized databases. These are like libraries on computers containing business, technical or academic information. They have complete text of publications or abstracts that you can browse through, as in a library. Some well known centralized databases are:
    • Dow Jones & Co's Dow Jones News/Retrieval Service.
    • Lockheed's Dialog Information Service. It has 518 separate databases covering science, engineering, business and economics.
    • Mead Data Central's NEXIS/LEXIS. It offers full text from 15 newspapers like New York Times and 31 magazines like Byte, Newsweek and Business Week, etc.
    • West Publishing Co's Westlaw. It allows lawyers to browse through court cases and federal regulations.
  • Special Interest Groups (SIGs) or forums where you can ask questions, get responses and exchange information about your specific areas of interest, that could be medicine, cricket or computers.
  • On-line services offered by various banks, airlines and shopping centers allow you to transact with them through the network.
  • Support forums maintained by various hardware and software companies provide technical expertise and solutions to problems to their customers.
  • Computing Time, i.e. allowing you to link to mainframes and utilize their processing capacity.

Wide Area Networks that offer such services are called Bulletin Board Services (BBSs).

Electronic Mail (E-Mail)

Sending Electronic Mail, or E-Mail, using computers is similar to sending letters through ordinary mail. When you write a letter, address it and post it, it is collected, transported and delivered at that address.

In a network, each user is given a unique identification, called E-Mail address. If you type the letter and the E-Mail address of the receiver, the E-Mail facility will take care of sending it over the network to the right person. You can send a message to someone in another office, another city or another continent with equal ease, using your computer.

While most WANs like CompuServe also offer E-Mail as one of their services, there are networks set up specifically for this purpose. Examples of such networks are MCl-Mail and Telecom Gold.

Receiving, storing, forwarding and monitoring of mail are handled by dedicated software called E-Mail software. Some well-known E-Mail software are cc:Mail and Microsoft-Mail.

The advantage of E-Mail is that the receiver's machine need not be working when the mail arrives. It is put in the receiver's mailbox, that is essentially a subdirectory that stores all the mail received. When the machine is accessed, the user is informed of the arrival of mail. Since E-Mail is very fast and reliable, many offices and universities have started using it for sending letters, memos and applications, instead of normal mail.

Electronic Mail (E-Mail)

Facsimile or FAX

Facsimile or FAX is another area where computers are taking over. FAX machines have been used for a long time to transfer documents by scanning and sending over telephone lines.

You can plug in an add-on card, called the FAX card, into your PC. This will enable you to send the file on the disk to a FAX machine at the other end, and vice versa.

On a Local Area Network, if the FAX card is installed on one PC, other workstations of the LAN can utilize its services to send FAXs.

FAX Machine

FAX Machine

Requirements to Connect your PC to a Network

Unlike a Local Area Network, where the workstations are normally connected through cables, connection to a Wide Area Network is done through telephone lines, and so a telephone connection is a pre-requisite.

To connect to a WAN, you need a device called a modem, and a communication software for dialing and establishing a connection with another PC. ProComm, ProComm Plus, pcANYWHERE, Telix and Crosstalk are some well-known communication packages.

Lastly, you must subscribe and get an account to become a user of a WAN or BBS that you want to use.

The general features provided by a communication package are:

  • Operation in host and remote modes: If the communication software is running in the host mode on your computer, other computers can connect themselves to it and utilize its services. Your machine is called the host as it provides its resources to the others. When you connect to another host and utilize its services, you are said to be a remote user. In host mode, the communication software can handle the task of providing services while the host computer can be left unmanned.
  • Sending and receiving of files: This could be used to send a file to one or multiple destinations. Files are normally compressed and then transferred to save time on the network.
  • Automatic logging of incoming data to printer or disk: You may want to use this when you want messages/files that are received to be saved on disk or printed without prompting and disturbing your other activities on the PC.
  • Recording and playback of sessions and calls: This helps you keep track of all the calls made, duration and amount of data transfer for each one of them. You can also re-run a call. This is useful if the transfer of the same data has to be repeated.
  • Providing a Process Control Language: This helps you to program repetitive functions such as unattended file transfer to multiple destinations after business hours.

The System Unit and Its Components

The system unit is a box-like unit filled with a number of useful components, each performing a discrete function. These components work together to accomplish the main function of the computer, viz. accept and process input and deliver output. This section will elaborate on these components one by one.

Internal Power Supply

The system unit draws power from the AC mains through a power protection device. This power is not directly supplied to the internal components. Instead, one of the components, called the internal power supply, converts the AC input into DC output of 5 and 12 volts. Normally, the internal power supply is referred to as Switched Mode Power Supply (SMPS). The SMPS provides cable connectors to supply the required voltage to the other internal components like the floppy drives, the hard disk drive, the motherboard and external device such as the keyboard. The ON/OFF switch of the system unit is actually a part of the SMPS. Thus, when you switch the system unit on or off, you actually switch the SMPS on or off. Figure shows the various components of the system unit.

Components of System Unit

Components of System Unit

Exhaust Fan

The SMPS has a small fan, called the exhaust fan, attached to it. This fan rotates as long as the computer is switched on. Its function is to cool the SMPS unit.

Exhaust Fan

Speaker

The system unit also has a small audio speaker attached to it. This speaker is connected to the motherboard and produces a sound whenever instructed by software programs. For example, when the machine starts a self-test program is executed that uses beep to indicate that everything is working satisfactorily. It is also used by entertainment programs to produce sound effects.

Speaker

Motherboard

When you open the system unit, a large board containing a number of tiny electronic circuits and other components are visible. This is called the motherboard. All peripheral devices are connected to the motherboard. In an IBM PC, the motherboard is called the system board. The components of the motherboard are:

Representation of Characters

Before proceeding with the understanding of a microprocessor chip, it is necessary to understand as to how characters are represented in the computer. The term byte refers to a single character of storage. A byte is essentially a collection of 1s and Os representing a character.

One is familiar with the ten distinct decimal digits 0 to 9 commonly used in the decimal arithmetic system. The computers being electronic machines work better with just two signals (on/off) thus giving them only two distinct digits 1 (for on) and 0 (for off) to work with.

This inherent ease of working with two digits makes the computer amenable to binary arithmetic (as opposed to the decimal arithmetic that one is familiar with).

Hence, in the binary system used by computers, each number or character is represented in terms of the binary digits 1 and 0. Each of these binary digits is called a bit. A collection of 8 bits or a byte is used to represent a character in the computer.

The number of bits used to represent a character will determine the number of unique characters that can be represented.

If only 3 bits were used, there would be 8 (23) possible combinations of 1s and 0s. These are:

000,
001,
010,
011,
100,
101,
110,
111.

Each could represent a unique character in the computer. This would mean that 8 different characters can be represented using 3 bits. In a similar way, by using 8 bits, the PC can represent a larger set of characters (28).

As to which combination of 1s and 0s will represent which number (0-9) or character (A-Z, *, /... etc.) is decided by a representation scheme used by the computer. The most widely-used representation scheme is called ASCII.

A sample of the ASCII representation for some of the characters is shown in Table.

Character

ASCII Representation
60011                  0110
70011                  0111
  
A0100                  0001
B0100                  0010
  

ASCII Representation

Microprocessor

The entire design of the PC is based on the microprocessor chip. The microprocessor can take in data, perform arithmetic operations like addition, subtraction, division or multiplication on the data and send out the result. It also performs comparison operations on data to check if they are equal, or if one is greater than the other. It also has the ability to perform logical operations on data. The microprocessor controls the activities of the various components of the computer and also responds to requests from the peripheral devices; for example, printer signals indicating that it has run out of paper.

Intel Microprocessor 4004

The microprocessor consists of the Arithmetic-logic unit (ALU), the Control Unit and some special purpose storage areas called Registers. The ALU section is where the actual arithmetic and logic instructions are executed. During its ALU operations, the microprocessor holds its intermediate results in special purpose registers. These registers are storage areas which are physically a part of the microprocessor chip. These are not accessible to the programmer.

The control section makes available to the ALU, the requisite data that it needs to work upon. It does this by keeping track of the next instruction to be executed and the address of the data referred to by this instruction. The control also uses some of the special purpose registers of the processor to hold the next instruction and the data addresses.

There are many types of microprocessors available in the market that are manufactured by different companies like Intel, Advanced Micro Devices, Motorola, etc. The most widely-used are the range of Intel microprocessors. The microprocessors in the family of Intel processors are the Intel 8004, 8085, 8086, 8088, 80286, 80386, 80486 and the Pentium. The Pentium is the most powerful microprocessor from Intel.

The capacity of a microprocessor is measured in terms of the number of bits it can send or receive and the number of bits it can process internally. The 8088 is an 8/16 bit processor, indicating that it can send or receive 8 bits of data and internally process 16 bits of data at a time. The 80286 is a 16/16 bit processor. Thus, it is a true 16 bit processor and is faster than the Intel 8088 chip. Also, the 80286 can work in two different modes: the real and the protected. When working in the real mode, the 80286 works just like the 8088. In the protected mode, the 80286 makes available many facilities that are not available on the 8088. For example, it provides features that allow more than one program or task to be executed simultaneously. The protection feature prevents one program from tampering with any part of the memory that does not belong to it.

The 80386 chip has a 32-bit processing capability with a 32-bit data path and, as a result, is much faster than either the 8088 or the 80286 chip. Like the 80286, it can also work in the protected mode.

The 80486 chip was introduced by Intel in late 1989 and for the next four years, enjoyed the distinction of being the best performing microprocessor in the Intel family. The Intel 80486, like the 80386, is a 32-bit processor. It has architectural enhancements, which makes it perform better than the 80386 chip.

The Pentium is a 32-bit processor with a 32-bit data path, and was introduced in 1993. It is three times faster than the 80486, and is considered the best in the Intel family.

Note: DOS is a 16-bit operating system and most applications that run under it are 16-bit applications, including Windows 3.1. Windows NT however, is a 32-bit operating system that runs 32-bit applications. To maintain a degree of compatibility, older 16-bit applications are also allowed to run on the 32-bit platform. But what is required today is not just better hardware that runs applications faster, but also better software that matches the changing hardware.

Interrupts

Although the processor executes the instructions in a specified sequence, it should be able to respond to adhoc requests for its attention, such as pressing keys on the keyboard, or the printer signaling that it has run out of paper, and take the appropriate action required.

This is done through interrupts. An interrupt signal makes the microprocessor respond to such adhoc requests, even though it is busy working on something else. However, the microprocessor stores the status of the current work being processed before it diverts itself to handle the interrupt request. The microprocessor stores this status, i.e. the next instruction that was to be executed and all the intermediate results generated etc. into an area of the memory called the stack and retrieves this status to continue processing after it has completed the handling of the interrupt request.

Clock Chip

The components in a computer are designed to operate in perfect synchronization. To do this, they need a time keeper. The clock chip provides the timing signal in the form of electronic pulses that are used by the computer components to set up a working pace. The chip generates a regular beat (like the ticking of a clock) and the operations of a computer are timed to this beat. It is like the baton held by the conductor in an orchestra, the rhythmic movements of which set the pace for the individual instruments of the orchestra to follow. The faster the rhythmic movements, the faster the speed at which the orchestra plays. Thus, a computer, that operates at higher clock speeds is faster. For its timing, the clock chip uses a quartz crystal like the one used in quartz watches.

Clock Chip

Clock Chip

Speed of Operation

The speed of a clock is measured in terms of frequency of pulses generated. The unit used for measuring this frequency is MHz (Mega Hertz). If the clock speed is 1 MHz, it means that the clock produces 1 million pulses per second. The clock speed of PCs ranges from a low of 16 MHz to a high of 200 MHz (used by the Pentium microprocessor). The clock speed is one way of measuring the speed of a computer.

Another unit for measuring the speed of a computer is MIPS (Million Instructions Per Second). It gives the number of instructions executed per second. The standard PC is rated to have a speed of 0.4 MIPS.

Memory

The internal memory of a PC is present on the Motherboard in the form of chips. The computer uses two types of internal memory:

Random Access Memory (RAM)

Random Access Memory (RAM)

This is the memory that the computer uses for storing the programs and their data while working on them. So, if you are drafting a letter using a wordprocessor, say MS-Word, you are working with a document loaded into the RAM. To store your letter for later use, it has to be saved on the hard disk. Later, you can retrieve it from the disk and continue working on the document. Thus, RAM functions as a scratch pad for the computer and is sometimes called the scratch pad memory.

RAM has the following characteristics:

  • Data within the RAM can be read or modified, i.e. you can either read from the RAM or write onto it. Hence it is called read/write memory.
  • The contents of the RAM are lost when the computer is switched off. Hence, the RAM is said to be volatile.

The capacity of RAM can vary from 640 KB to 64 MB and more, depending on the number of memory chips installed, which in turn depends on the capacity the microprocessor can handle. The RAM size is an important parameter in determining the size and complexity of problems that a computer can handle. When people refer to the amount of memory that a computer has, they are talking about the amount of RAM available.

Read Only Memory (ROM)

Read Only Memory (ROM)

Another portion of the internal memory found on the motherboard is called ROM. The ROM contains permanently recorded instructions that are vital for starting up a computer. One set of instructions found in ROM is called the ROM-BIOS, that stands for Read-Only Memory Basic Input-Output Services. These programs perform the most basic control and supervisory operations for the computer. For example, they check whether the I/O devices have been connected properly to the system unit. They also handle the basic needs of the hardware involved, which include all input and output devices. Any set of programs residing in ROM is called firmware.

Instructions in ROM can be executed but cannot be changed and hence the name Read-Only Memory. Further, these instructions are not erased when the power goes off. Therefore, ROM is said to be nonvolatile.

Note: In recent years, PCs have become increasingly memory-hungry, and the minimum desirable memory seems to go up every year. Now, 8 MB of memory is no longer considered large; it is the minimum required in most situations. Windows 3.1, for example, can function with 4 MB of RAM. However, it will spend a vast amount of time swapping data to disk unless you have a minimum of 8 MB of RAM.

Bus

As stated earlier, the microprocessor works on the data stored in RAM. Further, to execute the instructions stored in ROM, it has to fetch these instructions into RAM. Communication between the microprocessor and the memory chips as well as other chips found on the motherboard is accomplished through a set of wires running between them. These are called the bus. The bus comprising a set of 8 wires for carrying data is called the data bus. When data is sent from one unit to another, the address (location in memory at which the data is stored) is also sent with the data.

The bus has a set of 20 wires (in an 8088-based system) for carrying these addresses. This type of bus is called the address bus.

Ports

All input and output devices like the keyboard, the printer and the mouse are connected to the system unit through ports. These ports are actually the inlets and outlets of the microprocessor. The microprocessor communicates with the outside world through them. These ports can be either serial or parallel. To transfer a byte through a serial port, eight bits are queued and sent bit by bit. However, in a parallel port, all the eight bits are transferred simultaneously.

If all PC components were made by the same manufacturer, there would be no problems in connecting the input and output devices to the system unit. But this is not always the case, and each manufacturer follows a different standard for transferring data. Thus, you may not be able to connect a brand X monitor to a brand W computer. The solution to this problem lies in standardizing the way data is transferred.

Serial Port Standard

The industry standard for serial transfer of data is the RS-232C port. This standard defines the various parameters for data transfer, one of them being the speed of transfer. A mouse, for example, uses RS-232C port for communicating with the CPU.

Parallel Port Standard

An industry acknowledged parallel port standard is the Centronics printer interface developed by the makers of the Centronics printers. Printers normally use this standard.

Expansion Slots

Your PC comes with a limited number of serial and parallel ports for connecting input and output devices. However, you may find it necessary to attach an extra input or output device to the PC. The motherboard has a set of sockets called expansion slots, that help you attach extra input and output devices, in case you run out of ports. These slots can be used to add extra memory and additional devices.

Attaching a device to a PC is an easy task. You need to buy an appropriate add-on card or an option board. This card contains the electronic components, which interface the input and output device with the motherboard. In addition, it provides a port to which you can connect your device. Next, you open the system unit, plug the card into an empty expansion slot and attach the device to the card's port. Now the device is connected to the motherboard.

Expansion Slots

Storage System

The storage system inside a PC, be it a diskette, a tape storage or a hard disk, consists of three logical parts. First part is the medium itself, that is the diskette, the cartridge tape or the hard disk. The second part is the mechanism that operates this medium—spins the disk or spools the tape. This is called the drive. The various kinds of drive are the floppy disk drive, the tape drive and the hard disk drive. The third part is the electronics, that controls the drive through commands given by the computer system. This is called the controller. In this section, you will learn about the floppy disk and hard disk systems.

Floppy Disk System

Floppy disks come in two sizes: 5¼ inch and 3½ inch. The 5¼ inch diskette is circular in shape with a hole in the center, called the clamping hole. It is covered with a square protective jacket. The jacket has an oval slot, called the head slot, which exposes a portion of the diskette surface. There is also a small hole near the center, called the index hole, which is the starting point of the diskette.

5¼ inch Floppy Disk

5¼ inch Floppy Disk

The diskette is inserted into the floppy disk drive, which is a sealed enclosure. It is clamped to the drive through the hub. The drive contains a spindle mechanism for rotating the diskette. It also contains another delicate piece of hardware called the read-write head that accesses the disk surface through the head slot and retrieves or stores data. The drive uses the index hole to sense the beginning of a track. The drive controller card supplies the drive with the necessary signals for its operations. For example, the controller tells the drive when to move the read-write head, when to start rotating the disk, and so on.

A 3½ inch diskette, also called as the microdisk, is also circular in shape and is covered with a square protective jacket. The media cover is pushed to expose the diskette surface. The operations are similar to those of 5¼ inch diskettes. A 3½ inch diskette is shown in Figure.

3½ Inch Diskette

A 3½ Inch Diskette

A diskette is divided into a series of concentric circles called tracks. The tracks are identified by numbers, with the outermost track as track zero. The tracks do not spread across the whole width of the recording surface, but take up a small area. The track is divided into sectors. Each sector is identified by a number that is assigned to it, starting with zero. Each type of floppy has a sector of a fixed size. A disk has two sides. Data can be recorded on either one or both sides of the disk.

The storage capacity of a disk is determined by factors like the number of tracks, sectors and the number of sides on which data is recorded. Depending upon the capacity of storage, the 5¼ inch diskettes are divided into double-density (360 KB) and high-density (1.2 MB).

The microdisk may be double-density (720 KB) or high-density (1.44 MB). Accordingly, disk drives can be double-density or high-density drives. A high-density drive can read and write on to a double-density diskette but the reverse is not possible.