Computer Hardware Book
Computer Hardware Book
Narayanabharathy, Calicut,Kerala
Basic Concepts
Electricity is the most widely used form of energy, ranging from miniature
batteries in your wristwatch to large arc furnaces for melting steel. It's important to
understand electricity's basic principles to see how to use it wisely and safely.
Our first understanding of electricity began about 600 B.C. with the observed
attraction between materials and amber rods rubbed with other materials. This is how
the name electricity was derived.
Electricity
What is electricity? It's a lot easier to describe what it does than what it is. For
example, electricity operates our lights, runs our refrigerators and powers our electric
motors.
The word "electric" comes from the Greek word "amber" and has been used to
describe a wide range of related phenomena. We can't see electricity, but we can see
its effects, such as light.
Electricity can exist in a number of forms, but there are two types of commonly
used electricity:
1. Direct Current, which is provided by batteries, and . . .
2. Alternating Current which is provided by electric utilities or other power
generators in the form of electrons -- called current -- flowing through a wire
-- called a conductor.
Current
Current is a measure of the rate of electron flow through a material. Electrical
current is measured in units of amperes or "amps" for short. This flow of electrical
current develops when electrons are forced from one atom to another.
When current flows in a conductor, heat is produced. This happens because every
conductor offers some resistance to current flowing.
That is why the amperage flow in a circuit is important, since the more amps
flowing, the more heat is produced. Most people notice this heating effect when the
cord of any appliance or electrical device heats up after the device has been running
for an extended period.
Recognizing this heat production is important in specifying wire sizes. When a wire
carries more amps than it can handle without overheating, we say it is "overloaded".
Overloaded wires can melt the insulation and create shocks or even fires.
2
The scientific symbol for amperage is an "I", dating back to the early days of
electricity. It is still used by scientists and engineers. Electricians and wiring guides
use "A" as the amperage symbol. In this title, we'll use the practical symbol "A" for
current flow in amps.
Electrons
To gain an insight into how electricity flows through a material, we need to
understand the structure of atoms -- nature's building
blocks.
All matter is made up of carbon, hydrogen, and other atoms. Each atom is
comprised of protons, which are positively charged; neutrons, which have no charge;
and electrons, which are negatively charged. The protons form the nucleus of the
atom and the electrons travel in orbits around the nucleus much like the earth travels
around the sun.
Protons and electrons follow specific laws of attraction. Since they have
opposite charges, they attract to one another. If an atom has the same number of
protons as electrons, then the atom is balanced, and stable. The orbiting electrons
remain in their orbits as long as nothing upsets the balance.
When something upsets this balance, then some of the electrons become
"knocked" out of their orbits. The are called "free electrons". This unbalanced
condition can be caused by rubbing cat's fur on amber, passing a wire through a
magnetic field, or putting two chemicals together, as in a dry cell battery.
3
The free electrons are attracted to atoms where there is an electron missing
and will fill the space just vacated by the first free electron. When this conditions
occurs continuously, the movement of electrons becomes the basis for the flow of
electrical energy we call "current".
Conductors
Materials that are made up of atoms whose electrons are easily freed are called
conductive materials or "conductors". Platinum, gold, and silver are examples of the
very best conductors of electricity. Gold is used extensively in small quantities for
high-value products like microelectronics, high quality audio components, computer
chips and telecommunications satellites.
Copper and aluminum are also quite excellent conductors of electricity and much
less expensive. Almost all electrical wiring is aluminum or copper.
4
Copper Wires
Copper wire is commonly used on the customer side of the electric meter.
While copper generally costs more than aluminum, it is a better conductor, so
smaller wire can be used. Copper also requires less maintenance.
Copper wire is required by code for most residential buildings. There may be
exceptions for using aluminum wire, but always check the local code authority
before using aluminum.
Aluminum Wires
Aluminum wire is used as electrical conductors on electric utility transmission
and distribution systems. The overhead wires spanning utility poles are made of
aluminum and do not have insulation around them.
Aluminum has two advantages over copper as a conductor for utility lines:
Insulators
Insulators are materials that have structural properties exactly opposite of
conductors. These materials are made up of atoms whose electrons are not easily
"freed". These electrons are said to be tightly bound to the nucleus, and are very
stable.
Insulators are used to prevent the flow of electrical current. The rubberized
power cord and plastic coverings on appliances are typical examples of insulators.
Glass, rubber, porcelain, and most plastics are good insulators.
5
Voltage
Voltage is the electrical force that causes free electrons to move from one atom to
another. Just as water needs some pressure to force it through a pipe, electrical
current needs some force to make it flow. "Volts" is the measure of "electrical
pressure" that causes current flow. Voltage is sometimes referred to as the measure
of a potential difference between two points along a conductor.
The scientific symbol for voltage is an "E", dating to early days of electricity
when it was called the "Electromotive force". Scientists and engineers use the "E"
symbol for voltage, while electricians and wiring books use "V" as the voltage
symbol. This can create some confusion, since either may be encountered. In this
title, we'll use the practical symbol "V" for voltage.
Resistance
Electrical resistance is defined as the resistance to flow of electricity through a
material. Even the best conductors, such as gold, have some resistance. Resistance
elements essentially fall somewhere between a conductor and an insulator.
Resistance can also be considered a measurement of how tightly a material holds
onto its electrons. For example, common resistance elements in a circuit are lights,
motors, and electrical resistance heaters.
6
conductor. The resistance value for most materials is listed in physics or science
books.
We can use a water piping system as an analogy. The resistance in the water
pipe to the flow of water comes mainly from the size of the pipe. Rust and corrosion
inside the pipe, objects stuck inside the pipe, and the number of bends and fittings all
add up to increase the resistance to the flow of water.
When electricity flows through any resistance, energy is dissipated in the form
of heat. If the heat becomes intense enough, the conductor resistor may actually
glow. This is exactly how an incandescent light bulb works. The filament is made of
a material that will resist the current enough to heat up and glow.
Power
Power is a measure of the amount of work an electric
current can accomplish in a specified period of time. The most
common unit of electrical power measurement is the watt, or
kilowatt, which is 1,000 watts. Power is the rate at which
7
electrical energy is converted into some other form of energy such as light, heat or
mechanical work or horsepower.
For any electrical device, the higher its power rating in watts, the greater its
consumption of electrical energy, not necessarily the amount of work it produces.
For example, consider a 100-watt incandescent light bulb. The 100 watts does not
represent how much light it produces, but how much electrical power it uses. A 17-
watt fluorescent lamp may produce much or even more light, while using only 17%
of the power.
U.S. motor manufacturers still rate motors in units of horsepower where one
horsepower equals 746 watts.
The symbol for "power" is a capital "P". The kilowatt is shown as "kW" with a
little k and capital W. The megawatt is shown as "mW" with a little m and capital W.
Energy
Electrical energy is the average amount of power used over a given time
period and is commonly measured in "kilowatt-hours." Electric utility electric meters
accurately measure the kilowatt-hour energy use by the customer, and may also
measure peak power use during a specified time interval.
Let's calculate the energy use for a blow dryer. Say the blow dryer is rated at
1,500 watts by the manufacturer. This is how much electric power it uses when it
operates. If the blow dryer is operated for a total of 2 hours each month, the blow
dryer consumes 1,500 watts x 2 hours = 3000 watt-hours. Since utility rates are
based on kilowatt-hours, divide by 1,000 to get 3 kilowatt-hours. This shows how
power consumption and operating time are important in determining energy use.
8
Magnetism
The generation of electric power depends on magnetism or the principles of
magnets. Most of us have seen a magnets' ability to attract certain metals, such as
iron. Any material that can attract metals is called a "magnet". The attractive ability
of these materials is called "magnetic force". Certain specimens of iron ore possess
this attracting property when they are taken from the earth. One name for this
material is magnetite or lodestones.
Magnets
The basic atomic structure of a magnet seems to align most of the molecules in
the same direction. It's possible to see this force through a simple experiment
Put a bar magnet under a sheet of glass and sprinkle iron filings on the glass.
The lines of force from the magnet show up clearly as the filings form a pattern.
Notice that the attractive forces are greatest at the two ends of the magnet, where the
majority of filings gather. We call these ends "poles".
The density of the pattern represents the strength of the field, which is the
magnitude of the force exerted upon a magnetic material placed at the point in the
field. These lines are called lines of magnetic flux.
9
If we suspend a magnet by a string from its center so that it is free to turn, it
will turn until there axis lines up with its poles, lying along the earth's magnetic north
and south poles. The pole which points north is called the north pole and the other is
called the south pole. These are usually designated by an N and S marked on the
magnets.
Let's add another magnet to our experiment and we will notice another key
property of magnets.
The like poles will repel one another, while the unlike poles will attract one
another. This is a very important principle since the generation of electric power
depends on these laws of attraction.
Permanent magnets are those which will hold their magnetism after the
magnetizing force has been removed and will continue to be magnets for as long as
they are not disturbed by being jarred or heated.
Electromagnetic Fields
The flow of electricity through a conductor produces both an electric and
magnetic field around the conductor. Collectively, these two fields are referred to as
an electromagnetic field or EMF. The strength of the electric field is measured in
10
volts per meter and varies with the amount of the source voltage. The higher the
source voltage, the higher the strength of the field. Electric field strength decreases
rapidly with distance from the source.
Electric fields are produced both naturally and by any conductor carrying
electricity. The strength of the earth's natural electric field varies, but on average is
about one-thousandth of a volt per meter. Electric field strength typically varies from
10 to 150 volts per meter under electric distribution lines and 5 to 100 volts per
meter inside homes and workplaces.
11
milligauss. The magnetic field measured underneath a lower power distribution line
is .5 to 30 milligauss.
Magnetic fields produced by electrical circuits drop off rapidly with distance
from the source. The magnetic field produced by a microwave at 1 foot is 70 to 100
milligauss while at five feet away, the magnetic field strength drops to five
milligauss.
Electric fields are blocked by shielding such as walls, houses, trees, other
vegetation, soil, and other large dense objects. Magnetic fields, on the other hand,
pass easily through most objects and are only blocked by structures containing large
amounts of iron or iron alloy metals.
Direct current is produced when electrons flow constantly in one direction. It's
abbreviated as "DC". Since direct current flows in one direction only, its electrical
pressure or voltage is always oriented in one direction, or "polarity".
12
Interestingly, the first commercial electrical systems set up by Thomas Edison
and others were direct current systems. But, for economic reasons, these were later
changed to alternating current or AC systems, and are described in the Alternating
Current section of this program. Today, batteries, solar panels, fuel cells and special
DC generators such as wind turbines produce direct current.
Static Electricity
Static electricity is the electrical charge associated with
lightning, the shock you experience when you touch the
doorknob, or when your clothes stick together when
they've just come out of the dryer.
When the negative charge becomes high enough, any contact with a less negatively,
or positively, charged body will cause an extremely rapid, high-current electrical
discharge. This is what happens when you cross the room in your socks and touch
the doorknob. Your body is negatively charged and the doorknob is positively
charged. The negative charge discharges rapidly to the positive charge, bringing the
two items back in to electrical balance.
13
Heat
14
Photovoltaic Cells
Photovoltaic -- PV for short -- or solar cells are made of silicon and can turn
sunlight directly into DC electricity. Each cell produces a small amount of current.
By connecting many cells together and placing them on larger panels, the electric
current produced can be significant. This can be used directly in a DC appliance,
stored in batteries, or converted to alternating current to operate AC appliances using
an inverter.
Piezoelectric Principle
Crystalline materials produce small amounts of electricity
when a force is applied that changes their shape in some way.
These are called piezoelectric materials. Quartz is an example of
a piezoelectric substance. When small amounts of pressure are
applied to a quartz crystal, a small voltage is produced from the
changing charge created by the moving electrons. Phonographs
using a crystal cartridge utilize the piezoelectric principle to convert the
movement of the needle to an electrical signal which is later amplified and played
through speakers. Microphones and barbecue lighters also use this principle.
15
Primary Cell Batteries
Combinations of certain metals, such as copper and zinc, will produce
electrical activity when placed in special solutions called electrolytes. The two
metals form the electrodes. The electrolyte creates a chemical action that causes the
zinc to form positive ions and the copper to form negative ions. These ions are freely
flowing in the electrolyte. No current flow can occur until the electrode terminals are
connected to a circuit, like a light bulb. The electrons then flow from the zinc
electrode through the external circuit to the copper electrode. The chemical reaction
between the zinc and the electrolyte continues, and the zinc is eventually used up in
the process.
Common dry cell batteries work on a similar principle with a paste-like electrolyte
and a carbon electrode rather than copper.
16
There are several common types of storage batteries which include:
Fuel Cells
A fuel cell consists of a container in which fuels react in the presence of an
electrolyte.
In this reaction, electrons are made available at the negative electrode terminal.
Energy is provided by the continuous supply of fuels. Two fuels must be used to
provide the necessary reaction. Oxygen and hydrogen are two of the fuels that can be
used. Fuel cells are used as a source of electricity in space vehicles.
DC Generator
17
The magnetic lines of force induce current into the wire loop in the same
direction of flow as the loop moves in a circle, so the electricity produced is DC
since current flow is always the same direction.
Unlike DC voltage and current, which remain steady, AC voltage and current
changes -- or cycles -- 60 times per second in North America. AC power in Europe
cycles 50 times per second. This cycling has many advantages which we'll see in the
next sections.
18
Hydroelectric
19
for storage. This type of system works well as a peaking plant where the water is
pumped up into the reservoir at night when electricity costs are low and the water is
used to generate electricity during the day when the need for electricity is highest.
Wind
20
TEST INSTRUMENTS
An Analogue Multimeter
DIGITAL METER
ANALOGUE METER
21
DIGITAL Multimeter is highly accurate and easier to read than an analogue type. It is
best used for finding the precise value of a voltage, current or resistance.
The probes (seen with the digital metre) are connected to the meter. They can
be disconnected and so it is important to ensure that they are attached to the correct
sockets when in use. Also, some meters have four possible sockets which means you
must follow the manufacturers instructions carefully when attaching the two probes.
Either meter has a variety of settings depending on whether you need to
measure resistance, current or voltage. Normally the function selector has a setting for
each of these and there is also a setting for the range that you are trying to read.
For example you may need to measure the value of a resistor in ohms when a
colour chart is not be available.
2. Ensure that the probes are attached correctly and touch them across the component
you are measuring, in this case a resistor.
3. The results can be read on the scale. If there is no reading, try another range setting.
22
To measure DC voltage follow these steps:
2. Connect the test probes to the circuit and read the voltage on the scale.
LOGIC PROBE
logic probe is a hand-held pen-like probe used for analyzing and troubleshooting the
logical states (Boolean 0 or 1) of a digital circuit. It is usually powered by the circuit
under test (some devices use batteries). It can be used on either TTL (Transistor-
Transistor Logic) or CMOS (Complementary Metallic Oxide Semiconductor)
integrated circuit devices.
There are usually three different colored LEDs on the probe's chassis; two LEDs are
for High/Low states; the third LED is for Pulse (a single occurring event). Also there
is usually a separate audible tone for each of the logical states. An oscillating signal
causes the probe to alternate between "High-state and Low-state tones".
To use the Logic Probe section of the project, connect the "earth" (the alligator clip
on the lead) to the earth (0v rail) of the project you are testing. Switch the Logic Probe
ON and a short beep may be heard. Place the probe tip on the earth rail to prove the
Logic Probe is detecting a LOW and repeat for the power rail. Since the power rail for
the project-under-test and the Logic Probe are separate, you need to make sure the
Logic Probe will see the power rail as a HIGH - that's the purpose of the pre-testing
we just covered. Note: The project-under-test must be operating on a supply voltage
of at least 5v. If it works on a voltage as low as 3v, the Logic Probe will not (may not)
recognise the 3v as a HIGH. This is one of the limitations of some Logic Probes -
except those that connect directly to the project-under-test. You are now ready to take
a test. Place the probe on one of the components in the diagram below (or one of the
tracks) on the project-under-test. The Logic Probe will emit either a HIGH tone,
LOW tone or a beeping sound. This will indicate, a HIGH, a LOW or a SIGNAL is
present on the line.
23
The Project-under-test must be connected to its power source and SWITCHED ON.
i.e: It must be turned ON. The probe will produce a HIGH, LOW or Pulsed tone
from the piezo.
You cannot determine the frequency of the signal on a line, from the sound emitted by
the Logic Probe. It only indicates a signal is present. A "signal line" is also called an
"active line," or "digital line" and may be a clock line to another chip or a "bus line"
in a complex computer project. If you need to know more details about the quality,
frequency or pattern of the signal, a CRO (Cathode Ray Oscilloscope) will be
needed.
The Logic Probe can also be used to test all types of circuits, providing the waveform
has an amplitude of at least 5v. In general, if the signal in a circuit will trigger a
microcontroller, it will also be large enough to be detected by this Logic Probe.
Before using the Logic Probe for the first time, you must be sure it is operating
correctly. The 5x7 Display Project provides an ideal project to test the operation ofthe
"Probe."Some of the lines of the micro in the 5x7 are turning on and off at a fairly fast
rate. Pins 6 to 12 drive the anodes of the LED display and these are active when the
display is illuminating. Probing these lines will activate both the HIGH and LOW
24
LEDs on the "Probe." The clock line to the "shift-chip - a 4017" (pin 17) is activated
for a very short period of time and is low for a very long period of time (in computer
terms) and the HIGH LED on the "Probe" will glow fairly dull while the green LED
will be very bright. A faint beep will be heard from the piezo along with the high
tone. A very brief pulse can be detected on the reset line to the 4017 (pin 18) and this
will prove the Logic Probe is capable of detecting a glitch or pulse. When the Logic
Probe has been tested for performance, it is ready for testing "unknown" circuits
SOLDERING TECHNIQUES
Soldering is the only permanent way to ‗fix‘ components to a circuit. However,
soldering requires a lot of practice as it is easy to ‗destroy‘ many hours preparation
and design work by poor soldering. If you follow the guidelines below you have a
good chance of success.
3. Place the PCB, with its components in position, in the bull clip. This will steady the
PCB when you try to use the soldering iron.
25
4. The heated soldering iron should then be placed in contact with the track and the
component and allowed to heat them up. Once they are heated the solder can be
applied. The solder should flow through and around the component and the track
5. Having completed
soldering the circuit the
extended legs on the components
need to be trimmed using wire clippers. The circuit is now ready for testing.
26
Solder less breadboard
When working with wire, you need a tool to "strip" the plastic insulation off the ends
so that bare copper metal is exposed. This tool is called a wire stripper, and it is a
special form of plier with several knife-edged holes in the jaw area sized just right for
cutting through the plastic insulation and not the copper, for a multitude of wire sizes,
or gauges. Shown here are two different sizes of wire stripping pliers:
Jumper wires
The home-made jumper wires with large, uninsulated (bare metal) alligator clips are
okay to use so long as care is taken to avoid any unintentional contact between the
27
bare clips and any other wires or components. For use in crowded breadboard circuits,
jumper wires with insulated (rubber-covered) clips like the jumper shown from Radio
Shack are much preferred.
Needle-nose pliers
Needle-nose pliers are designed to grasp small objects, and are especially useful for
pushing wires into stubborn breadboard holes.
Screwdrivers
28
the metal lead, opting instead for silver-alloy solder. If you do not already wear
glasses, a pair of safety glasses is highly recommended while soldering, to prevent
bits of molten solder from accidently landing in your eye should a wire release from
the joint during the soldering process and fling bits of solder toward you.
Soldering gun
Knives, like screwdrivers, are essential tools for all kinds of work. For safety's
sake, I recommend a "utility" knife with retracting blade. These knives are also
advantageous to have for their ability to accept replacement blades.
Utility knife
Pliers other than the needle-nose type are useful for the assembly and
disassembly of electronic device chassis. Two types I recommend are slip-joint and
adjustable-joint ("Channel-lock").
29
Hand drill
Drilling may be required for the assembly of large projects. Although power
drills work well, I have found that a simple hand-crank drill does a remarkable job
drilling through plastic, wood, and most metals. It is certainly safer and quieter than a
power drill, and costs quite a bit less.
Large wire (14 gauge and bigger) may be needed for building circuits that
carry significant levels of current. Though electrical wire of practically any gauge
may be purchased on spools, I have found a very inexpensive source of stranded
(flexible), copper wire, available at any hardware store: cheap extension cords.
Typically comprised of three wires colored white, black, and green, extension cords
are often sold at prices less than the retail cost of the constituent wire alone. This is
especially true if the cord is purchased on sale! Also, an extension cord provides you
with a pair of 120 volt connectors: male (plug) and female (receptacle) that may be
used for projects powered by 120 volts.
To extract the wires, carefully cut the outer layer of plastic insulation away
using a utility knife. With practice, you may find you can peel away the outer
insulation by making a short cut in it at one end of the cable, then grasping the wires
with one hand and the insulation with the other and pulling them apart. This is, of
30
course, much preferable to slicing the entire length of the insulation with a knife, both
for safety's sake and for the sake of avoiding cuts in the individual wires' insulation.
During the course of building many circuits, you will accumulate a large
number of small components. One technique for keeping these components organized
is to keep them in a plastic "organizer" box like the type used for fishing tackle.
Component box
In this view of one of my component boxes, you can see plenty of 1/8 watt
resistors, transistors, diodes, and even a few 8-pin integrated circuits ("chips"). Labels
for each compartment were made with a permanent ink marker.
31
32
33
Resistors determine the flow of current in an electrical circuit. Where there is high
resistance then the flow of current is small, where the resistance is low the flow of
current is large. Resistance, voltage and current are connected in an electrical
circuitby Ohm’s Law.
34
Resistors are used for regulating current and they resist the current flow and the extent
to which they do this is measured in ohms (Ω). Resistors are found in almost every
electronic circuit. The most common type of resistor consists of a small ceramic (clay)
tube covered partially by a conducting carbon film. The composition of the carbon
determines how much current can pass through.
Resistors are too small to have numbers printed on them and so they are marked with
a number of coloured bands. Each colour stands for a number. Three colour bands
shows the resistors value in ohms and the fourth shows tolerance. Resistors can never
be made to a precise value and the tolerance band (the fourth band) tells us, using a
percentage, how close the resistor is to its coded value. The resistor on the left is 4700
ohms.
35
The value of a resistor can be written in a variety of ways. Some examples are given
below:
A common value is 'K' which means one thousand ohms. So if a resistor has a value
of 7000 ohms it can also be said to have a value of 7K.
CAPACITORS
Capacitors are components that are used to store an electrical charge and are
used in timer circuits. A capacitor may be used with a resistor to produce a timer.
Sometimes capacitors are used to smooth a current in a circuit as they can prevent
false triggering of other components such as relays.
36
A capacitor is composed of two conductors separated by an insulating material
called a DIELECTRIC. The dielectric can be paper, plastic film, ceramic, air or a
vacuum. The plates can be aluminium discs, aluminium foil or a thin film of metal
applied to opposite sides of a solid dielectric. The CONDUCTOR - DIELECTRIC -
CONDUCTOR sandwich can be rolled into a cylinder or left flat
When the circuit is switched on, the light dependent resistor emits light and
the capacitor charges up. When the switch is turned off the LED stills emits a light for
a few seconds because the electricity stored in the capacitor is slowly discharged.
When it has fully discharged it's electricity the LED no longer emits light. If a resistor
is introduced to the circuit the capacitor charges up more slowly but also discharges
more slowly. What will happen to the light ?
Electrolytic capacitors are ‘polarised’ which means they have a positive and
negative lead and must be positioned in a circuit the right way round (the positive lead
must go to the positive side of the circuit). They also have a much higher capacitance
than non-electrolytic capacitors.
37
Non-electrolytic capacitors usually have a lower capacitance.They are not
polarised (do not have a positive and negative lead) and can be placed anyway round
in a circuit.They are normally used to smooth a current in a circuit.
CAPACITANCE - means the value of a capacitor.
Notice the electrolytic capacitors above. They all have two polarised leads, in other
words they have a positive and negative leg. This type of capacitor is used with ICs
such as the 555 timer chip and it is the capacitors and resistors that determine the
timing sequence.
Look carefully at the photographs of the two types of capacitors. Can you work out
which one is electrolytic and which is non-electrolytic ?
However, there is a problem. When the switch is pressed it only closes the
relay for a split second and this is not enough time for the computer program to detect
that it has been pressed in the first place. A time delay is the obvious answer and this
can be achieved by adding a capacitor in parallel to the switch. If the relay is held
38
closed for 3/4 seconds then the computer program will have time to detect it - A
capacitor provides the time delay.
REMEMBER - there are polarized and non-polarized capacitors. Look for a positive
and negative sign.
THE DIODE
A diode allows electricity to flow in one direction only and blocks the flow in
the opposite direction. They may be regarded as one-way valves and they are used in
various circuits, usually as a form of protection. There are different types of diode but
their basic functions are the same. These are noted below along with examples of
diodes in use.
The most common type of diode is a ‗silicon diode.‘ It is enclosed in a glass cylinder
with the dark band marking the cathode terminal. This line points towards the positive
of a circuit. The opposite terminal is called the anode.
Generally, diodes do not conduct until the voltage reaches approximately .6 volts, this
is called the ‗threshold point‘. If the current becomes too high the diode may crack or
melt.
39
The diode in this circuit protects a radio or a
recorder etc... In the event that the battery or power
source is connected the wrong way round, the diode
does not allow current to flow. Electronic devices
can be damaged or even destroyed if the polarity is
reversed (positive and negative are connected to the
wrong terminals).
TRANSIENT PROTECTOR
When an ‗inductor‘ device such as a relay is turned off a high voltage can be
generated for a short time (Dia 1). This voltage ‗spike‘ can damage the relay and other
components. However, the diode does not allow current to pass through it in the
wrong direction and short circuits this spike.
The diode can also be used to protect a ‗meter‘ from a reverse current (Dia 2).
ZENER DIODES
Normally a current does not flow through a diode in the reverse direction. The
Zener Diode is specifically designed to begin conducting in the opposite direction
when the reverse voltage reaches a voltage threshold. Zener diodes are sometimes
used as a voltage sensitive switch.
40
TRANSISTORS
Transistors are manufactured in different shapes but they have three leads (legs).
The BASE - which is the lead responsible for activating the transistor.
The COLLECTOR - which is the positive lead.
The EMITTER - which is the negative lead.
The diagram below shows the symbol of an NPN transistor. They are not always set
out as shown in the diagrams to the left and right, although the ‗tab‘ on the type
shown to the left is usually next to the ‗emitter‘.
The leads on a transistor may not always be in this arrangement. When buying a
transistor, directions will normally state clearly which lead is the BASE, EMITTER or
COLLECTOR.
41
SIMPLE USE OF A TRANSISTOR
DIAGRAM 'A'
DIAGRAM 'B'
Diagram 'A' shows an NPN transistor which is often used as a type of switch.
A small current or voltage at the base allows a larger voltage to flow through the
other two leads (from the collector to the emitter).
42
unit ii
43
UNIT II
Gates
Introduction
The basic building blocks of a computer are called logical gates or just gates.
Gates are basic circuits that have at least one (and usually more) input and exactly one
output. Input and output values are the logical values true and false. In computer
architecture it is common to use 0 for false and 1 for true. Gates have no memory.
The value of the output depends only on the current value of the inputs. This fact
makes it possible to use a truth table to fully describe the behavior of a gate.
We usually consider three basic kinds of gates, and-gates, or-gates, and not-gates (or
inverters).
Basic gates
The and-gate
An and-gate has an arbitrary number of inputs. The output value is 1 if and only if all
of the inputs are 1. Otherwise the output value is 0. The name has been chosen
because the output is 1 if and only if the first input and the second input, and, ..., and
the nth input are all 1. It is often useful to draw diagrams of gates and their
interconnections. In such diagrams, the and-gate is drawn like this:
The truth table for an and-gate with two inputs looks like this:
xy|z
-------
00|0
01|0
10|0
11|1
44
The or-gate
Like the and-gate, the or-gate can have an arbitrary number of inputs. The output
value is 1 if and only of at least one of the input values are 1. Otherwise the output is
0. In other words, the output value is 0 only if all inputs are 0. The name has been
chosen because the output is 1 if and only if the first input or the second input, or, ...,
or the nth input is 1.
In circuit diagrams, we draw the or-gate like this:
The truth table for an or-gate with two inputs looks like this:
xy|z
-------
00|0
01|1
10|1
11|1
The inverter
An inverter has exactly one input and one output. The value of the output is 1 if and
only if the input is 0. Otherwise, the output is 0. In other words, the value of the
output is the exact opposite of the value of the input.
In circuit diagrams, we draw the inverter like this:
x|y
-----
45
0|1
1|0
Combined gates
Sometimes, it is practical to combine functions of the basic gates into more complex
gates, for instance in order to save space in circuit diagrams. In this section, we show
some such combined gates together with their truth tables.
The nand-gate
The nand-gate is an and-gate with an inverter on the output. So instead of drawing
several gates like this:
We draw a single and-gate with a little ring on the output like this:
The nand-gate, like the and-gate can take an arbitrary number of inputs.
The truth table for the nand-gate is like the one for the and-gate, except that all output
values have been inverted:
xy|z
-------
00|1
01|1
10|1
11|0
The nor-gate
The nor-gate is an or-gate with an inverter on the output. So instead of drawing
several gates like this:
46
We draw a single or-gate with a little ring on the output like this:
The nor-gate, like the or-gate can take an arbitrary number of inputs.
The truth table for the nor-gate is like the one for the or-gate, except that all output
values have been inverted:
xy|z
-------
00|1
01|0
10|0
11|0
The exclusive-or-gate
The exclusive-or-gate is similar to an or-gate. It can have an arbitrary number of
inputs, and its output value is 1 if and only if exactly one input is 1 (and thus the
others 0). Otherwise, the output is 0.
We draw an exclusive-or-gate like this:
The truth table for an exclusive-or-gate with two inputs looks like this:
47
xy|z
-------
00|0
01|1
10|1
11|0
Binary to Decimal Conversions
Here are some examples of converting binary directly into decimal. We simply add up
the place values of each 1 digit in the binary number.
1001012 = 3710:
2
Exponents 25 24 23 22 21 0
Place Values 32 16 8 4 2 1
Bits 1 0 0 1 0 1
Value 32 +4 + 1 = 37
100011102 = 14210:
2
Exponents 27 26 25 24 23 22 21 0
1111010112 = 49110:
2
Exponents 28 27 26 25 24 23 22 21 0
48
Value 256 + 128 + 64 + 32 +8 + 2 + 1 = 491
Hex Digit: 0 1 2 3 4 5 6 7
Bit Group: 0000 0001 0010 0011 0100 0101 0110 0111
Hex Digit: 8 9 a b c d e f
Bit Group: 1000 1001 1010 1011 1100 1101 1110 1111
For conversion from hex to binary, simply string together the bits for each hex digit.
For instance, 0x509d7a is binary 10100001001110101111010. To wit:
Hex Number: 5 0 9 d 7 a
Binary Number: 0101 0000 1001 1101 0111 1010
To convert the other way, break the binary number into groups of four, then replace
each one with its hex digit. Group the digits starting from the right. If you don't have
a complete group of four when you reach the left, pad with zero bits on the left to fill
the last group. For instance, binary 111011011111110001 is 0x3b7f1:
.
Hex to Decimal Conversions
Here are some examples of converting hexadecimal into decimal. For each place, we
multiply the digit value by the place value, and total the products.
0x5a8 = 144810:
49
16
Exponents 162 161 0
0x2c03 = 1126710:
16
Exponents 163 162 161 0
0x95 = 14910:
16
Exponents 161 0
Place Values 16 1
Hex Digits 9 5
Value 144 + 5 = 149
0xb17 = 283910:
16
Exponents 162 161 0
ASCII
50
When computers were first invented, they didn't (and still don't) speak English
or any other human language. Deep down in the operating system heart, they speak a
language comprised of 0s and 1s, or bits. While the first computer programmers wrote
their programs in bits, someone determined that it would be easier to have the
computer convert human language into bits rather than do the conversion manually.
To allow humans to type, a code was developed to convert human letters into 0s and
1s that the computer could understand.
ASCII is a 7-bit character set where each character is defined by 0s and 1s. Every
letter in English, and most Romance languages is represented by an ASCII code. For
example, the letter A is ASCII code 65. When you write in a text editor, the letters
you type are converted to ASCII before they are sent to the computer processor.
A Binary Adder
It's about time that you were given a practical example of all this. The
following shows how we can construct a circuit that is found in the heart of every
processing chip - a circuit to perform binary addition. If you need an introduction to
binary numbers and binary addition, click here.
A half adder
The following diagram shows the basic addition of two binary digits (1 or 0). In fact,
the addition is exactly what you would expect, except that when 1 is added to 1, the
result (which is 2 in normal addition) addition is written as 10:
0 0 1 1
+ 0 + 1 + 0 + 1
0 1 1 0
1
The reason that I write the 1 produced when 1 is added to 1 under the line is that there
may be another column of figures to the left of this column. In this case, the 1 that is
produced will be a carry out that affects the figures in the next column. Here is the
last part of that calculation again, this time as part of a larger calculation:
51
0 1 1
+ 1 0 1
1 0 0 0
1 1
A circuit that performs the addition of two binary digits like this is called a half adder
(I'll explain why we say "half" in the next section). A half adder can only add two
binary digits. If you wanted a long binary number added to another long binary
number, you would use several circuits (termed "full" adders in this case), each of
which handles one digit of each number, all connected end to end - see the next
section.
In fact, the binary addition of two digits always produces two numbers - the sum of
those digits and a carry out digits which is then added to the next column along,
assuming there is one, or which just disappears into the void. Here is that first
diagram again with both the sum digit and the carry out digits explicitly listed:
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
You will notice that the sum digit has exactly the same truthtable as an XOR gate and
the carry digit has exactly the same truthtable as an AND gate. This means that the
binary half adder circuit just consists of two gates:
52
The small loop drawn just in front of the two gates shows two wires which cross
without connecting, i.e. there is no connection between the Digit 1 input and the Digit
2 input.
A full adder
The difference between a binary half adder and a full adder is, a half adder doesn't
take into account a crucial aspect of a column of two binary digits - there may be a
carry in to the column, as well as a carry out!
Here is a column which has been extracted from the middle of the sum somewhere.
You will notice that a there is a carry digit underneath the column itself, as well as
one under the next column. Now, including the carry in, there are 8 possible
combinations of inputs, and I have listed them all:
Again, we just turn this into a truthtable. However, there are now three inputs, called
Digit1, Digit2 and Carry In, and two outputs, called Sum Digit and Carry Out:
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
53
The easiest way to turn this into a circuit is to imagine the table split into a top half
and a bottom half. The top half of the table occurs when the Digit 1 input is 0. In this
case, the Sum digit is equivalent to an XOR gate and the Carry Out digit is equivalent
to an AND gate. The bottom half of the table occurs when the Digit 1 input is 1. In
this case, the Sum digit is the opposite of the XOR (i.e. equivalent to an Exclusive OR
with the output inverted) and the Carry Out digit is equivalent to an OR gate. This
would give a circuit as follows:
Although there are really only three inputs to the circuit, we have
written each of the inputs twice (once for the Sum Digit and once for the Carry Out).
Don't be put off by this - just assume that both the lines marked "Digit 1" are
connected to the same input, that both the lines marked "Digit 2" are connected to the
same input and that both the lines marked "Carry In" are connected to the same input.
In practice, there's not a great deal that you can do with adding a single pair of digits.
We duplicate the circuit that you see above several times (8 times, 16 times or 32
times - usually a power of 2) to form a proper binary adder:
54
In this diagram each of the yellow rectangles represents one instance of the circuit that
we developed above. It has two digit inputs and a Carry In input which is the Carry
Out output from the previous column. Each Carry Out output is then connected to the
Carry In input of the next column. The initial Carry In input is fed from a binary digit
called the Carry Flag, which is usually set to 0 (The Carry Flag is used to perform
multi-byte addition - see the section on Computer Architecture). The final Carry Out
output is fed back into the Carry Flag for use later on.
In the example given in the diagram, the two numbers being added are 11010011 and
11101010. They produce an answer which is 10111101 with a final Carry Out. This is
equivalent to adding the decimal numbers 211 and 234 and getting the answer 189. I
realise that 211 + 234 is not 189, but this has happened because the answer has
"overflowed" off the end of the adding unit, and the fact that a Carry Out was
produced from the final calculation indicates that the real answer should be (256) +
189 = 445. Unfortunately, this adding device is an 8-bit device which cannot produce
answers larger than 255, so it sets the Carry Flag at the end to indicate that there is a
256 missing from the answer.
Incidentally, the same circuit can be used to perform subtraction, except the number
to be subtracted is inverted (all the bits are reversed, so 1 becomes 0 and vice-versa)
and 1 is added to it.
The D-Latch
55
A variation of the clocked R-S flipflop is the Data Latch, or D-Latch. This is a form
which is more convenient to use in some cases as it only has one input. In this case,
the single input (which is called D) is fed to the Set input. D is also inverted and sent
to the Reset input as in the following diagram:
In this case, if D is 1 then it is equivalent to the Set condition of the previous flip-flop
(i.e. S = 1 and R = 0, which sets the output Q to 1 and clears the output to 0).
Similarly, if D is 0, then it is equivalent to the Reset condition of the previous flip-
flop (i.e. S = 0 and R = 1, which clears Q to 0 and sets the output to 1).
Of course, all this only happens when the clock input is 1. Whenever the clock input
is 0, the entire state of the circuit beyond the first pair of NAND gates is frozen in
whatever position it was in when the clock pulse dropped to 0. There is nothing,
however, to stop us making a master-slave version of the D-Latch that has all the
same advantages as the master-slave version of the R-S flip-flop.
This diagram shows the J-K flip-flop which is an adaptation of the R-S flip-flop. It
can also take the form of a master-slave circuit. However, there is additional
feedback.
The two AND gates at the input to the S-R flip-flop prevent both S and R being 1 at
the same time. The truthtable for the JK flip-flop is shown below:
56
J K Qn+1 Name of state
0 0 Qn Hold
0 1 0 Reset
1 0 1 Set
1 1 n Toggle
In this case, I haven't bothered with the n+1 output as that is now always the opposite
of the Qn output.
The J-K flip-flop does exactly what its R-S equivalent does, except for the special
case when J = K = 1 (the "Toggle" state). In this case, the output of the circuit always
switches to the opposite of its current state whenever the clock pulse goes from 0 to 1
(the circuit is leading-edge triggered). This behaviour is often shown in the form of
the following diagram, which shows the clock pulse in the upper part and the Qn
output in the lower part:
The Arithmetic-Logic Unit (ALU) described Here .It performs the computer
processor computations. These are the arithmetic operations (addition and subtraction)
and the logical operations (AND, OR, XOR and NOT) that are done during execution
of the corresponding machine instructions. The ALU also performs the program
counter incrementation during the instruction fetch.
57
ALU from simple logic circuits. AND, OR, XOR and NOT gates, and four-bit
adders. Subtraction is performed by two's-complement addition, that is, by inverting
and adding one to the subtraend.
The lower three bits of the instruction opcodes are used as ALU opcodes. A small
AND-OR array provides the logic needed to interpret these opcodes. You may realize
that the ALU will perform computations during the non-arithmetic instructions, like
the jumps and memory loads. However, with these instructions, the control logic of
the processor makes sure that the result is ignored (not written to the accumulator).
Here is a diagram of the ALU design, for one bit. The carrys are rippled to the
subsequent adders.
58
The ALU performs the four logical operations and addition continually on every pair
of operands. However, only the result selected by the output multiplexor (as
determined by the ALU logic) will appear on the ALU output. The processor control
logic determines if the carry result will be stored in the carry flip-flop .The ALU logic
One-of-eight decoder for the AND plane.
59
unit iii
60
PROM
EPROM
61
A 32KB (256Kbit) EPROM.
As the quartz window is expensive to make, OTP (one-time programmable) chips
were introduced; the only difference is that the EPROM chip is packed in an opaque
package, so it can not be erased after programming. OTP versions are manufactured
for both EPROMs themselves and EPROM-based microcontrollers. However, OTP
EPROM (whether separate or part of a larger chip) is being increasingly replaced by
EEPROM for small amounts where the cell cost isn't too important and flash for
larger amounts.
62
Some microcontrollers, often those from before the era of EEPROMs and flash
memory, use EPROM to store their program. This is not very useful for development,
as using one-time programmable devices would be horribly wasteful for debugging
and windowed versions are expensive. Leaving the die of such a chip exposed to light
can also change behavior in ways that may be disastrous when moving from a
windowed part used for development to a non-windowed part for production. For
example a device may power up with data memory random with the die covered but
with it in a predictable state with the die exposed to light.
EEPROM
63
An EEPROM (also called an E2PROM) or Electrically Erasable Programmable
Read-Only Memory, is a non-volatile storage chip used in computers and other
devices to store small amounts of volatile (configuration) data. When larger amounts
of more static data are to be stored (such as in USB flash drives) other memory types
like flash memory are more economical.
MRAM
RAM stands for Random Access Memory. Physically, RAM consists of small
electronic chips which are mounted in modules (small printed circuit boards). The
modules are installed in the PC‘s motherboard using sockets — there are typically 2,
3 or 4 of these. On this motherboard there are only two, and that‘s a bit on the low
side of what is reasonable.
In RAM, transistors make up the individual storage cells which can each
―remember‖ an amount of data, for example, 1 or 4 bits – as long as the PC is
switched on.
RAM is a very central component in a PC, for without RAM there can be no
data processing. RAM is simply the storage area where all software is loaded and
works from.
64
Normal RAM is dynamic (called DRAM), and requires constant electronic
recharging to preserve its data contents. Without power, all RAM cells are cleared.
RAM is very closely linked to the CPU, and it is very important to both have enough
RAM, and to have fast RAM. If both conditions are not met, the RAM will be a
bottleneck which will slow down the PC. What follows is an introduction to RAM, as
it is used in modern PC‘s.
RAM modules are installed in sockets on the motherboard. In the background you see
the huge fan on a Pentium 4 processor.
Each RAM module is a rectangular printed circuit board which fits into the
sockets on the motherboard:
65
On a module there are typically 8 RAM chips which are soldered in place.
There can also be 16 if it is a double-sided module.
On the bottom edge of the module you can see the copper coated tracks which
make electrical contact (the edge connector). Note also the profile of the module; this
makes it only possible to install it one way round and in the right socket.
The notches in the sides of the module fit the brackets or ―handles‖ which hold
the module in place in the motherboard socket:
66
common RAM types, SD and DDR RAM, are 64 bits wide.
The modules are built using chips which each contain a number of megabits.
And since each byte needs 8 bits, more than one chip is needed to make a module.
Look at the RAM chip in Fig. 130. You can see the text ‖64MX4‖:
The text in Fig. 132 indicates that the chip contains 64 x 4 mega bits of data,
which is the same as 256 megabits. If we want to do some calculations, each chip
contains 1024 x 1024 x 64 = 67,108,864 cells, which can each hold 4 bits of data.
That gives 268,435,456 bits in total, which (when divided by 8) equals 33,554,432
bytes = 32,768 KB = 32 MB.
67
RAM speeds
For each type of RAM, there are modules of various sizes. But there are also
modules with various speeds. The faster the RAM chips are, the more expensive the
modules.
Name Type
PC700 2x 356 MHz Rambus RAM
PC800 2x 400 MHz Rambus RAM
PC1066 2 x 533 MHz Rambus RAM
DDR266 el. PC2100 2x 133 MHz DDR RAM
DDR333 el. PC2700 2x 166 MHz DDR RAM
DDR400 el. PC3200 2x 200 MHz DDR RAM
DDR2-400 400 MHz DDR2 RAM
DDR2-533 533 MHz DDR2 RAM
DDR2-667 667 MHz DDR2 RAM
68
RAM technologies
Back in the 1980‘s, DRAM was used. This was dynamic RAM, which was
relatively slow. It was replaced by FPM (Fast Page Mode) RAM which was also
dynamic, only a bit faster.
Originally, loose RAM chips were installed directly in large banks on the
motherboard. Later people started combining the chips in modules. These came in
widths of 8 bits (with 30 pins) and 32 bits (with 72 pins). The 32-bit modules were
suited to the system bus for the 80486 processor, which was also 32 bits wide.
Older RAM modules.
FPM RAM could not run any faster than 66 MHz, but that was fine for the
system bus clock frequency in the original Pentium processors.
After FPM came EDO RAM (Extended Data Out). EDO is a bit faster than
FPM because the data paths to and from the RAM cells have been optimised. The
gain was a 3-5 % improvement in bandwidth. The clock frequency could be increased
to 75 MHz, but basically, EDO is not very different to FPM RAM.
69
When Intel launched the Pentium processor, there was a change to using the
64 bit wide RAM modules (with 168 pins, as in which are still used for SDRAM
today.
An old motherboard with sockets for both 64-bit and 32-bit RAM modules.
From the transition period between EDO and SDRAM.
SDRAM
The big qualitative shift came in around
1997, when SDRAM (Synchronous DRAM)
began to break in. This is a completely new
technology, which of course required new
chipsets. SDRAM, in contrast to the earlier types of RAM, operates synchronously
with the system bus.
Data can (in burst mode) be fetched on every clock pulse. Thus the module
can operate fully synchronised with (at the same beat as) the bus – without so-called
wait states (inactive clock pulses). Because they are linked synchronously to the
system bus, SDRAM modules can run at much higher clock frequencies.
The 100 MHz SDRAM (PC100) quickly became popular, and with new
processors and chipsets, the speed was brought up to 133 MHz (PC133).
Another innovation in SDRAM is the small EEPROM chip called the Serial
Presence Detect chip, which is mounted on the modules. It is a very small chip
containing data on the modules speed, etc.
The motherboard BIOS can now read SDRAM module specifications directly.
70
DDR RAM
DDR RAM sends off two data packets for each clock pulse.
Timings
DDR RAM exist in many versions, with different the clock frequencies and
timings. The timing indicates how many clock cycles there are wasted, when the
motherboard waits for the memory to deliver the requested data.
With smaller numbers, we have better timings and the CPU having fewer idle
clock cycles. You may find memory modules of the same clock frequency but with
different timings. The better timing, the more expensive the RAM module is.
Ordinary pc users need not to speculate in special RAM with fast timing; this
is primary sold to gamers and over-clockers, who tries to achieve the maximum
performance from their motherboards.
71
Module Clock frequency Timing
PC2100 2 x 133 MHz 2-2-2
PC 2700 2 x 166 MHz 2-2-2
2-3-3
PC 3200 2 x 200 MHz 2-3-2
2-3-3
PC 3700 2 x 233 MHz 3-4-4
PC 4000 2 x 250 MHz 3-4-4
PC 4400 2 x 275 MHz 3-4-4
Note that different timing means that the gain in terms of increased bandwidth
doesn‘t quite match the clock speed. It is a bit less.
In the beginning the problem with DDR RAM, was that the RAM modules
were poorly standardized. A module might work with a particular motherboard, but
not with another. But this – which was typical for a new technological standard – is
not a big problem anymore. Intel was initially against DDR RAM. They claimed that
Rambus was a much better design, and that they wouldn‘t use DDR RAM. But
consumers wanted DDR RAM, which Intel‘s competitors were able to deliver, and in
the end even Intel had to give in. At the end of 2001, the i845 chipset was released,
which uses DDR RAM for the Pentium 4, and later we had the i865 and i875 chip
sets, which use dual channel DDR RAM.
The next generation of RAM is the DDR2, which is a new and better
standardized version of DDR using less power. The DDR2 modules operates at higher
clock speeds due to better design with higher signal integrity and a more advanced
internal data bus. The first chip sets to use DDR2 was Intel‘s i915 and i925. Later
DDR4 is expected with clock frequencies of up to 1,6 GHz!
72
Rambus RAM
possible. In this way, both the build up of heat, and electromagnetic radiation can be
kept down. They are encapsulated in a heat conducting, aluminium casing.
Rambus RAM thus has a completely new and different design. The modules
are only 16 bits wide. Less data is transferred per clock pulse, but the clock
frequencies are much higher. The actual Rambus modules (also called RIMM
modules) look a bit like the normal SDRAM modules as we know them. They have
184 pins, but as mentioned, the ships are protected by a heat-conducting casing:
Rambus module.
As the advanced Rambus modules are quite costly to produce, the technology
is on its way out of the market.
73
Advice on RAM
RAM can be a tricky thing to work out. In this chapter I will give a couple of
tips to anyone having to choose between the various RAM products.
Bandwidth
Of course you want to choose the best and fastest RAM. It‘s just not that easy
to work out what type of RAM is the fastest in any given situation.
We can start by looking at the theoretical maximum bandwidth for the various
systems. This is easy to calculate by multiplying the clock frequency by the bus
width. This gives:
74
How much RAM Required ?
RAM has a very big impact on a PC‘s capacity. So if you have to choose
between the fastest CPU, or more RAM, I would definitely recommend that you go
for the RAM. Some will choose the fastest CPU, with the expectation of buying extra
RAM later, ―when the price falls again‖. You can also go that way, but ideally, you
should get enough RAM from the beginning. But how much is that?
If you still use Windows 98, then 256 MB is enough. The system can‘t
normally make use of any more, so more would be a waste. For the much better
Windows 2000 operating system, you should ideally have at least 512 MB RAM; it
runs fine with this, but of course 1024 MB or more is better. The same goes for
Windows XP:
1 2 5 1
28 56 12 024
MB MB MB MB
Wi * * W W
ndows 98 * ** aste aste
Wi * * * *
ndows * ** ***
2000
Wi * * *
ndows XP ** ***
. Recommended amount of PC RAM, which has to be matched to the
operating system.
The advantage of having enough RAM is that you avoid swapping. When
Windows doesn‘t have any more free RAM, it begins to artificially increase the
amount of RAM using a swap file. The swap file is stored on the hard disk, and leads
to a much slower performance than if there was sufficient RAM in the PC.
RAM addressing
Over the years there have been many myths, such as ‖Windows 98 can‘t use
more than 128 MB of RAM‖, etc. The issue is RAM addressing.
Below are the three components which each have an upper limit to how much
RAM they can address (access):
he operating system (Windows).
75
Windows 95/98 has always been able to access lots of RAM, at least in theory.
The fact that the memory management is so poor that it is often meaningless to use
more than 256 MB, is something else. Windows NT/2000 and XP can manage several
gigabytes of RAM, so there are no limits at the moment.
In Windows XP, you have to press Control+Alt+Delete in order to select the
Job list. A dialog box will then be displayed with two tabs, Processes and
Performance, which provide information on RAM usage
Modern motherboards
for desktop use can normally
address in the region of 1½-3
GB RAM, and that is more than
adequate for most people.
Server motherboards with
special chipsets can address
much more.
76
This window shows how much RAM each program is using (Windows XP).
Standard motherboards normally have a limited number of RAM sockets. If,
for example, there are only three, you cannot use any more than three RAM modules
(e.g. 3 x 256 MB or 3 x 512 MB).
CPU‘s have also always had an upper limit to how much RAM they can
address:
Processor Address bus Maximum
width (bits) System RAM
8088, 8086 20 1 MB
80286, 80386SX 24 16 MB
80386DX, 80486, Pentium, 32 4 GB
Pentium MMX, K5, K6 etc.
77
Various CPU’s
In this chapter I will briefly describe the important CPU‘s which have been on
the market, starting from the PC‘s early childhood and up until today.
One could argue that the obsolete and discontinued models no longer have any
practical significance. This is true to some extent; but the old processors form part of
the ―family tree‖, and there are still legacies from their architectures in our modern
CPU‘s, because the development has been evolutionary. Each new processor extended
and built ―on top of‖ an existing architecture.
The first PC‘s were 16-bit machines. This meant that they could basically only
work with text. They were tied to DOS, and could normally only manage one program
at a time.
But the original 8086 processor was still ―too good‖ to be used in standard
office PC‘s. The Intel 8088 discount model was therefore introduced, in which the bus
between the CPU and RAM was halved in width (to 8 bits), making production of the
motherboard much cheaper. 8088 machines typically had 256 KB, 512 KB or 1 MB
of RAM. But that was adequate for the programs at the time.
78
The Intel 80286 (from 1984) was the first step towards faster and more
powerful CPU‘s. The 286 was much more efficient; it simply performed much more
work per clock tick than the 8086/8088 did. A new feature was also the 32 bit
protected mode – a new way of working which made the processor much more
efficient than under real mode, which the 8086/8088 processor forced programs to
work in:
– even beyond the 1MB limit which applied
to real mode.
Protected mode paved the way for the change from DOS to Windows, which
only came in the 1990‘s.
Bottom: an Intel 8086, the first 16-bit processor. Top: the incredibly popular
8-bit processor, the Zilog Z80, which the 8086 and its successors out competed.
The Intel 80386 was the first 32-bit CPU. The 386 has 32-bit long registers
and a 32-bit data bus, both internally and externally. But for a traditional DOS based
PC, it didn‘t bring about any great revolution. A good 286 ran nearly as fast as the
first 386‘s – under DOS anyway, since it doesn‘t exploit the 32-bit architecture.
The 80386SX became the most popular chip – a discount edition of the
386DX. The SX had a 16-bit external data bus (as opposed to the DX‘s 32-bit bus),
and that made it possible to build cheap PC‘s.
79
The fourth generation
The fourth generation of Intel‘s CPU‘s was called the 80486. It featured a
better implementation of the x86 instructions – which executed faster, in a more
RISC-like manner. The 486 was also the first CPU with built-in L1 cache. The result
was that the 486 worked roughly twice as fast as its predecessor – for the same clock
frequency.
80486 we gained a built-in FPU. Then Intel did a marketing trick of the type
we would be better off without. In order to be able to market a cheap edition of the
486, they hit on the idea of disabling the FPU function in some of the chips. These
were then sold under the name, 80486SX. It was ridiculous – the processors had a
built-in FPU; it had just been switched off in order to be able to segment the market.
80
Pentium
In 1993 came the big change to a new architecture. Intel‘s Pentium was the
first fifth-generation CPU. As with the earlier
jumps to the next generation, the first versions weren‘t especially fast. This
was particularly true of the very first Pentium 60 MHz, which ran on 5 volts. They got
burning hot – people said you could fry an egg on them. But the Pentium quickly
benefited from new process technology, and by using clock doubling, the clock
frequencies soon skyrocketed.
Basically, the major innovation was a superscalar architecture. This meant that
81
the Pentium could process several instructions at the same time (using several
pipelines). At the same time, the RAM bus width was increased from 32 to 64 bits.
The Pentium processor could be viewed as two 80486‘s built into one chip.
Throughout the 1990‘s, AMD gained attention with its K5 and K6 processors,
which were basically cheap (and fairly poor) copies of the Pentium. It wasn‘t until the
K6-2 (which included the very successful 3DNow! extensions), that AMD showed the
signs of independence which have since led to excellent processors like the
AthlonXP.
One of the earlier AMD processors. Today you‘d hesitate to trust it to run a
coffee machine…
In 1997, the Pentium MMX followed (with the model name P55), introducing
the MMX instructions already mentioned. At the same time, the L1 cache was
doubled and the clock frequency was raised.
The Pentium MMX. On the left, the die can be seen in the middle.
82
After the Pentium came the Pentium II. But Intel had already launched the
Pentium Pro in 1995, which was the first CPU in the 6th generation. The Pentium Pro
was primarily used in servers, but its architecture was re-used in the popular Pentium
II, Celeron and Pentium III models, during 1997-2001.
The Pentium II initially represented a technological step backwards. The
Pentium Pro used an integrated L2 cache. That was very advanced at the time, but
Intel chose to place the cache outside the actual Pentium II chip, to make production
cheaper.
83
Pentium II processor module mounted on its edge in the motherboard‘s Slot 1
socket (1997-1998).
The disadvantage of this system was that the L2 cache became markedly
slower than it would have been if it was integrated into the CPU. The L2 cache
typically ran at half the CPU‘s clock frequency. AMD used the same system in their
first Athlons. For these the socket was called, Slot A
One of the problems of over clocking a Pentium II was that the cache chips
couldn‘t keep up with the high speeds. Since these Celerons didn‘t have any L2 cache,
they could be seriously over clocked (with the right cooling).
Extreme CPU cooling using a complete refrigerator built into the PC cabinet.
With equipment like this, CPU‘s can be pushed up to very high clock frequencies.
Intel later decided to integrate the L2 cache into the processor. That happened
in a new versions of the Celeron in 1998 and a new versions of the Pentium III in
1999. The socket design was also changed so that the processors could be mounted
directly on the motherboard, in a socket called socket 370. Similarly, AMD
introduced their socket A.
84
The Pentium III was really just (yet) another edition of the Pentium II, which
again was a new version of the Pentium Pro. All three processors built upon the same
core architecture (Intel P6).
It wasn‘t until the Pentium 4 came along that we got a completely new
processor from Intel. The core (P7) had a completely different design:
31 stages).
-clocked so that they
can perform two micro operations per clock tick.
bridge, had been quad-pumped, so that it transfers four data packets per clock tick.
That is equivalent to 4 x 100 MHz and 4 x 133 in the earliest versions of the Pentium
4. In later version the bus was pumped up to 4 x 200 MHz, and an update with 4 x 266
MHz is scheduled for 2005.
-enabled, meaning that it under certain
circumstances may operate as two individual CPUs.
All of these factors are described elsewhere in the guide. The important thing
to understand, is that the Pentium 4 represents a completely new processor
architecture.
85
Evolution of the Pentium 4
86
Hyper-Threading Technology is a very exciting structure, which can be briefly
outlined as follows: In order to exploit the powerful pipeline in the Pentium 4, it has
been permitted to process two threads at the same time. Threads are series of software
instructions. Normal processors can only process one thread at a time.
87
will find use in servers and high performance pc‘s. A dual core Pentium 4 with
Hyper-Threading enabled will in fact operate as a virtual quad-core processor.
88
It was a big effort on the part of the relatively small manufacturer, AMD,
when they challenged the giant Intel with a complete new processor design.
The first models were released in 1999, at a time when Intel was the
completely dominant supplier of PC processors. AMD set their sights high – they
wanted to make a better processor than the Pentium II, and yet cheaper at the same
time. There was a fierce battle between AMD and Intel between 1999 and 2001, and
one would have to say that AMD was the victor. They certainly took a large part of
the market from Intel.
The original 1999 Athlon was very powerfully equipped with pipelines and
computing units:
89
instructions into the more efficient RISC instructions (ROP‘s) – 9 of which could be
executed at the same time.
the same time (the
Pentium III could manage 40, the K6-2 only 24).
All in all, the Athlon was in a class above the Pentium II and III in those years.
Since Athlon processors were sold at competitive prices, they were incredibly
successful. They also launched the Duron line of processors, as the counterpart to
Intel‘s Celeron, and were just as successful with it.
Athlon was a huge success for AMD. During 2001-2002, the Athlon XP
was in strong competition with the Pentium 4.
Athlon XP Vs Pentium 4
The Athlon processor came in various versions. It started as a Slot A module It
was then moved to Socket A, when the L2 cache was integrated.
In 2001, a new Athlon XP version was released, which included
improvements like a new Hardware Auto Data Prefetch Unit and a bigger Translation
Look-aside Buffer. The Athlon XP was much less advanced than the Pentium 4 but
quite superior at clock frequencies less than 2000 MHz. A 1667 MHz version of
AthlonXP was sold as 2000+. This indicates, that the processor as a minimum
performs like a 2000 MHz Pentium 4.
Later we saw Athlons in other versions. The latest was based on a new kernel
called ‖Barton‖. It was introduced in 2003 with a L2-cachen of 512 KB. AMD tried to
sell the 2166 MHz version under the brand 3000+. It did not work. A Pentium 4
running at 3000 MHz had no problems outperforming the Athlon.
90
opteron/ Athlon64
AMD‘s 8th generation CPU was released in 2003. It is based on a completely
new core called Hammer.
A new series of 64-bits processors is called Athlon 64, Athlon 64 FX and
Opteron. These CPU‘s has a new design in two areas:
has been housed in the north bridge, but now it is placed inside the processor.
AMD introduces a completely new 64-bit set of instructions.
Moving the memory controller into the CPU is a great innovation. It gives a
much more efficient communication between CPU and RAM (which has to be ECC
DDR SDRAM – 72 bit modules with error correction).)
Every time the CPU has to fetch data from normal RAM, it has to first send a
request to the chipset‘s controller. It has to then wait for the controller to fetch the
desired data – and that can take a long time, resulting in wasted clock ticks and
reduced CPU efficiency. By building the memory controller directly into the CPU,
this waste is reduced. The CPU is given much more direct access to RAM. And that
should reduce latency time and increase the effective bandwidth.
The Athlon 64 processors are designed for 64 bits applications. This should be
more powerful than the existing 32 bit software. We will probably see plenty of new
64 bit software in the future, since Intel is releasing 64 bit processors compatible with
the Athlon 64 series.
In the Athlon 64
the memory controller is
located inside the
processor. Hence, the
RAM modules are
interfacing directly with the CPU.
91
Overall the Athlon 64 is an updated Athlon-processor with integrated north
bridge and 64 bits instructions. Other news are:
Historical overview
92
Thus graphical summary of a number of different CPU‘s from the last 25
years. The division into generations is not always crystal clear, but we have tried to
present things in a straightforward and reasonably accurate way:
93
UNIT iv
94
Personal Computer
There are a lot of I/O ports in the PC‘s architecture, with their associated I/O devices
and standards. I/O stands for Input/Output, and these ports can both send and receive
data from the processor and RAM.
The use of I/O devices has contributed to making the PC an incredibly flexible
machine. Computers can be used for anything from normal office tasks, processing
text and numbers, to image processing using scanners and cameras, to producing
video, light and music.
In the following chapters we will look at the various I/O buses which link the PC‘s
other devices with the CPU and RAM.
95
Intro to the I/O system
During the last 10-15 years we have seen numerous technological innovations, the
goal of which has been to increase the amount of traffic in the PC. This increase in
traffic has taken place in the motherboard – with the system bus at the centre.
But the high clock frequencies and the large capacity for data transfer also affect the
I/O system. Demands are being made for faster hard disks and greater bandwidth to
and from external devices such as scanners and cameras. This has led to ongoing
development of the I/O controllers in the south bridge.
The south bridge connects a large number of different devices with the CPU and
RAM.
96
You can work out the capacity of a data bus based on data width and clock frequency.
Here is a brief comparison between the system bus and the I/O buses:
The south bridge was introduced back in 1987 The reason for this was that the
I/O devices couldn‘t keep up with the high clock frequencies which the CPU and
RAM could work at. There was electrical noise and other problems on the
motherboard when the signals had to be carried to the plug-in cards, etc. Very few
plug-in cards work at anything higher than 40 MHz – the electronics can‘t cope, the
chips and conductors simply can‘t react that quickly. The I/O speed had to therefore
be scaled down in relation to the system bus.
Since then, a number of different standards for I/O buses have been developed, which
all emanate from the south bridge controllers. These include the older ISA, MCA,
EISA and VL buses, and the current PCI, PCI Express and USB buses. The
differences lie in their construction and architecture – in their connection to the
motherboard.
97
I/O devices
The I/O buses run all over the motherboard, and connect a large number of different
I/O devices. The south bridge controllers connect all the I/O devices to the CPU and
RAM. Shows a brief overview of the various types of I/O devices. Note that AGP is
not included, as it is tied to the north bridge.
Name Devices
KBD, PS2, FDC, Keyboard, mouse, floppy disk drive, joystick, etc.
Game
ROM, CMOS BIOS, setup, POST.
ATA Hard disk, CD-ROM/RW, DVD etc.
PCI and Network card, SCSI controller, video grapper card,
PCI Express sound cards and lots of other adapters.
USB Mouse, scanner, printers, modem, external hard
disks and much more.
Firewire Scanner, DV camera, external hard disk etc.
SCSI Hard disks, CD-ROM drives, scanners, tape devices
etc. (older)
LPT, COM Parallel and serial devices such as printers, modems,
etc.
Various types of I/O devices. The two last ones are not used much anymore.
Originally, the various I/O devices could have their own controller mounted on the
motherboard. If you look at a motherboard from the 1980‘s, there are dozens of
individual chips – each with a particular function. As the years have passed, the
controller functions have been gathered together into fewer and larger chips. The
modern south bridge is now a large multi-controller, combining a number of functions
previously managed by independent chips.
98
The south bridge is normally supplemented by a small Super I/O controller which
takes care of a number of less critical functions that also used to be allotted to separate
controller chips in the past. The Super I/O controller will be described in more detail
later. It used to be connected to the south bridge via the ISA bus; in modern
architectures the LPC (Low Pin Count) interface is used:
The south bridge is part of the chipset, but is supplemented by the small Super I/O
controller.
Throughout the years, several different I/O buses have been developed. These are the
proper I/O buses:
99
These ‖real‖ I/O buses are designed for mounting plug-in cards (adapters) inside the
actual PC box. They therefore connect to a series of sockets (slots) on the
motherboard:
The various I/O buses have gradually replaced each other throughout the PC‘s history.
Motherboards often used to have several buses, but today basically only the PCI bus
is used for installing adapters such as network cards, etc.
The PC always needs a low-speed bus, used for the less intensive I/O devices. For
many years that was the job of the ISA bus, but it has been replaced today by USB
(Universal Serial Bus). USB is not a traditional motherboard bus, as it doesn‘t have
slots for mounting plug-in cards. With USB, external devices are connected in a
series. More on this later.
SCSI and FireWire are other types of high-speed bus which give the PC more
expansion options. They are not part of the standard PC architecture, but they can be
integrated into any PC. This is normally done using a plug-in card for the PCI bus, on
which the SCSI or FireWire controller is mounted. Thus the two interfaces draw on
the capacity of the PCI bus:
100
SCSI and FireWire controllers are both normally connected to the PCI bus.
Finally, I should also mention the ATA hard disk interface, which is not normally
called a bus, but which really could be called one. The ATA interface is only used for
drives, and the standard configuration allows four devices to be connected directly to
the motherboard, where the hard disk‘s wide cable, for example, fits inside an ATA
connector.
The ATA interface works like a bus in relation to the south bridge.
In the second part of this guide, we dug down into the inner workings of the CPU. We
well let it rest in peace now, and concentrate on the processor‘s immediate
surroundings. That is, the RAM and the chipset – or more precisely, the north bridge.
101
In the first section of the guide I introduced the chipset, including the north bridge
(see, for example, Figure which connects the CPU to the PC‘s memory — the RAM.
The most important data path on the motherboard runs between the CPU and the
RAM. Data is constantly pumped back and forth between the two, and this bus
therefore often comes under focus when new generations of CPU‘s, chipset‘s and
motherboards are released.
The RAM sends and receives data on a bus, and this work involves a clock frequency.
This means that all RAM has a speed, just like a CPU does. Unfortunately RAM is
much slower than the CPU, and the buses on the motherboard have to make
allowance for this fact.
The XT architecture
In the original PC design (the IBM XT), the CPU, RAM and I/O devices (which we
will come to later) were connected on one and the same bus, and everything ran
synchronously (at a common speed). The CPU decided which clock frequency the
other devices had to work at:
In the original PC architecture, there was only one bus with one speed.
The problem with this system was that the three devices were ―locked to each other‖;
they were forced to work at the lowest common clock frequency. It was a natural
architecture in the first PC‘s, where the speed was very slow.
102
The first division of the bus
In 1987, Compaq hit on the idea of separating the system bus from the I/O bus, so that
the two buses could work at different clock frequencies. By letting the CPU and RAM
work on their own bus, independent of the I/O devices, their speeds could be
increased.
The CPU and RAM are connected to a common bus, called the system bus, where in
reality the CPU‘s clock frequency determines the working speed. Thus the RAM has
the same speed as the CPU; for example, 12, 16 or 25 MHz.
With this architecture, the I/O bus is separate from the system bus (80386).
The I/O devices (graphics card, hard disk, etc.) were separated from the system bus
and placed on a separate low speed bus. This was because they couldn‘t keep up with
the clock frequencies of the new CPU versions.
The connection between the two buses is managed by a controller, which functions as
a ―bridge‖ between the two paths. This was the forerunner of the multibus architecture
which all motherboards use today.
Clock doubling
With the introduction of the 80486, the CPU clock frequency could be increased so
much that the RAM could no longer keep up. Intel therefore began to use clock
doubling in the 80486 processor.
The RAM available at the time couldn‘t keep up with the 66 MHz speed at which an
80486 could work. The solution was to give the CPU two working speeds.
103
Inside the processor, the clock frequency of the system bus is multiplied by a factor of
2, doubling the working speed.
But this system places heavy demands on the RAM, because when the CPU internally
processes twice as much data, it of course has to be ―fed‖ more often. The problem is,
that the RAM only works half as fast as the CPU.
For precisely this reason, the 486 was given a built-in L1 cache, to reduce the
imbalance between the slow RAM and the fast processor. The cache doesn‘t improve
the bandwidth (the RAM doesn‘t work any faster), but it ensures greater efficiency in
the transfer of data to the CPU, so that it gets the right data supplied at the right time.
Clock doubling made it possible for Intel to develop processors with higher and
higher clock frequencies. At the time the Pentium was introduced, new RAM modules
became available, and the system bus was increased to 66 MHz. In the case of the
Pentium II and III, the system bus was increased to 100 and 133 MHz, with the
internal clock frequency set to a multiple of these.
104
The bus system for a Pentium III processor.
Overclocking
The Pentium II was subjected to a lot of overclocking. It was found that many of
Intel‘s CPU‘s could be clocked at a higher factor than they were designed for. In 233
MHz Pentium II, you could set up the motherboard to, for example, run at 4.5 x 66
MHz, so that the processor ran at 300 MHz. I tried it myself for a while, it worked
well. At a factor of 5 it didn‘t work, but at factor of 4.5 it functioned superbly.
The CPU‘s internal clock frequency is locked to the system bus frequency.
105
Overclocking the system bus
Another method of overclocking was to turn up the system bus clock frequency. In
the early versions of the Pentium II, the system bus was at 66 MHz, which suited the
type of RAM used at that time.
You could increase the bus speed, for example to 68 or 75 MHz, depending on how
fast your RAM was. This type of tuning makes both the CPU and RAM faster, since it
is the actual system clock speed which is increased.
The disadvantage is that the system clock in these motherboard architectures also
controls the I/O bus, which runs synchronously with the system bus. PCI bus devices
(which we will come to in a later chapter) cannot handle being overclocked very
much; otherwise faults can occur, for example in reading from the hard disk.
Over clocking typically requires a higher voltage for the CPU, and most motherboards
can be set up to supply this:
Many still use the same kind of overclocking on the Athlon XP and Pentium 4. The
system clock has to be able to be adjusted in increments, which it can on many
motherboards.
106
A nice big cooler with two fans and pure silver contact surfaces. Silverado, a German
product which is used for overclocking CPU‘s.
A Pentium 4 processor is designed for a system clock of 200 MHz. If you can have a
3200 MHz model with a 200 MHz system bus, it can theoretically be clocked up to
4000 MHz by turning up the system clock. However, the processor needs a very
powerful cooling system to operate at the increased frequencies:
The manufacturers, Intel and AMD, don‘t like people overclocking their CPU‘s. They
have sometimes attempted to prevent this by building a lock into the processors, so
that the processor can only work at a specific clock frequency. In other cases the
CPU‘s can be overclocked. In any case, you shouldn‘t expect your warranty to apply
if you play around with overclocking.
107
The cache
In the previous chapter, I described two aspects of the ongoing development of new
CPU‘s – increased clock frequencies and the increasing number of transistors being
used. Now it is time to look at a very different yet related technology – the
processor‘s connection to the RAM, and the use of the L1 and L2 caches.
Speed conflict
The CPU works internally at very high clock frequencies (like 3200 MHz), and no
RAM can keep up with these.
The most common RAM speeds are between 266 and 533 MHz. And these are just a
fraction of the CPU‘s working speed. So there is a great chasm between the machine
(the CPU) which slaves away at perhaps 3200 MHz, and the ―conveyor belt‖, which
might only work at 333 MHz, and which has to ship the data to and from the RAM.
These two subsystems are simply poorly matched to each other.
If nothing could be done about this problem, there would be no reason to develop
faster CPU‘s. If the CPU had to wait for a bus, which worked at one sixth of its speed,
the CPU would be idle five sixths of the time. And that would be pure waste.
The solution is to insert small, intermediate stores of high-speed RAM. These buffers
(cache RAM) provide a much more efficient transition between the fast CPU and the
slow RAM. Cache RAM operates at higher clock frequencies than normal RAM. Data
can therefore be read more quickly from the cache.
The cache delivers its data to the CPU registers. These are tiny storage units which are
placed right inside the processor core, and they are the absolute fastest RAM there is.
The size and number of the registers is designed very specifically for each type of
CPU.
108
Cache RAM is much faster than normal RAM.
The CPU can move data in different sized packets, such as bytes (8 bits), words (16
bits), dwords (32 bits) or blocks (larger groups of bits), and this often involves the
registers. The different data packets are constantly moving back and forth:
so on…
The cache stores are a central bridge between the RAM and the registers which
exchange data with the processor‘s execution units.
The optimal situation is if the CPU is able to constantly work and fully utilize all
clock ticks. This would mean that the registers would have to always be able to fetch
the data which the execution units require. But this it not the reality, as the CPU
typically only utilizes 35% of its clock ticks. However, without a cache, this
utilization would be even lower.
Bottlenecks
CPU caches are a remedy against a very specific set of ―bottleneck‖ problems. There
are lots of ―bottlenecks‖ in the PC – transitions between fast and slower systems,
where the fast device has to wait before it can deliver or receive its data. These bottle
109
necks can have a very detrimental effect on the PC‘s total performance, so they must
be minimised.
A cache increases the CPU‘s capacity to fetch the right data from RAM.
The absolute worst bottleneck exists between the CPU and RAM. It is here that we
have the heaviest data traffic, and it is in this area that PC manufacturers are
expending a lot of energy on new development. Every new generation of CPU brings
improvements relating to the front side bus.
The CPU‘s cache is ―intelligent‖, so that it can reduce the data traffic on the front side
bus. The cache controller constantly monitors the CPU‘s work, and always tries to
read in precisely the data the CPU needs. When it is successful, this is called a cache
hit. When the cache does not contain the desired data, this is called a cache miss.
The idea behind cache is that it should function as a ―near store‖ of fast RAM. A store
which the CPU can always be supplied from.
In practise there are always at least two close stores. They are called Level 1, Level 2,
and (if applicable) Level 3 cache. Some processors (like the Intel Itanium) have three
levels of cache, but these are only used for very special server applications. In
standard PC‘s we find processors with L1 and L2 cache.
110
The cache system tries to ensure that relevant data is constantly being fetched
from RAM, so that the CPU (ideally) never has to wait for data.
L1 cache
Level 1 cache is built into the actual processor core. It is a piece of RAM, typically 8,
16, 20, 32, 64 or 128 Kbytes, which operates at the same clock frequency as the rest
of the CPU. Thus you could say the L1 cache is part of the processor.
L1 cache is normally divided into two sections, one for data and one for instructions.
For example, an Athlon processor may have a 32 KB data cache and a 32 KB
instruction cache. If the cache is common for both data and instructions, it is called a
unified cache.
L2 cache
The level 2 cache is normally much bigger (and unified), such as 256, 512 or 1024
KB. The purpose of the L2 cache is to constantly read in slightly larger quantities of
data from RAM, so that these are available to the L1 cache.
In the earlier processor generations, the L2 cache was placed outside the chip: either
on the motherboard (as in the original Pentium processors), or on a special module
together with the CPU (as in the first Pentium II‘s).
111
An old Pentium II module. The CPU is mounted on a rectangular printed
circuit board, together with the L2 cache, which is two chips here. The whole module
is installed in a socket on the motherboard. But this design is no longer used.
As process technology has developed, it has become possible to make room for the L2
cache inside the actual processor chip. Thus the L2 cache has been integrated and that
makes it function much better in relation to the L1 cache and the processor core.
The L2 cache is not as fast as the L1 cache, but it is still much faster than normal
RAM.
CPU L2 cache
It has only been during the last few CPU generations that the level 2 cache has found
its place, integrated into the actual CPU.
Traditionally the L2 cache is connected to the front side bus. Through it, it connects to
the chipset‘s north bridge and RAM:
112
The way the processor uses the L1 and L2 cache has crucial significance for its
utilisation of the high clock frequencies.
The level 2 cache takes up a lot of the chip‘s die, as millions of transistors are needed
to make a large cache. The integrated cache is made using SRAM (static RAM), as
opposed to normal RAM which is dynamic (DRAM).
While DRAM can be made using one transistor per bit (plus a capacitor), it costs 6
transistors (or more) to make one bit of SRAM. Thus 256 KB of L2 cache would
require more than 12 million transistors. Thus it has only been since fine process
technology (such as 0.13 and 0.09 microns) was developed that it became feasible to
integrate a large L2 cache into the actual CPU. In Figure on page 27, the number of
transistors includes the CPU‘s integrated cache.
Powerful bus
The bus between the L1 and L2 cache is presumably THE place in the processor
architecture which has the greatest need for high bandwidth. We can calculate the
theoretical maximum bandwidth by multiplying the bus width by the clock frequency.
Here are some examples:
113
CPU Bus Clock Theoretical
width frequency bandwidth
Different systems
There are a number of different ways of using caches. Both Intel and AMD have
saved on L2 cache in some series, in order to make cheaper products. But there is no
doubt, that the better the cache – both L1 and L2 – the more efficient the CPU will be
and the higher its performance.
AMD have settled on a fairly large L1 cache of 128 KB, while Intel continue to use
relatively small (but efficient) L1 caches.
On the other hand, Intel uses a 256 bit wide bus on the ―inside edge‖ of the L2 cache
in the Pentium 4, while AMD only has a 64-bit bus in Figure
114
Competing CPU‘s with very different designs.
AMD uses exclusive caches in all their CPU‘s. That means that the same data can‘t be
present in both caches at the same time, and that is a clear advantage. It‘s not like that
at Intel.
However, the Pentium 4 has a more advanced cache design with Execution Trace
Cache making up 12 KB of the 20 KB Level 1 cache. This instruction cache works
with coded instructions, as described on page 35
CPU L1 cache L2
cache
115
Latency
A very important aspect of all RAM – cache included – is latency. All RAM storage
has a certain latency, which means that a certain number of clock ticks (cycles) must
pass between, for example, two reads. L1 cache has less latency than L2; which is
why it is so efficient.
When the cache is bypassed to read directly from RAM, the latency is many times
greater. In Figure the number of wasted clock ticks are shown for various CPU‘s.
Note that when the processor core has to fetch data from the actual RAM (when both
L1 and L2 have failed), it costs around 150 clock ticks. This situation is called stalling
and needs to be avoided.
Note that the Pentium 4 has a much smaller L1 cache than the Athlon XP, but it is
significantly faster. It simply takes fewer clock ticks (cycles) to fetch data:
L1 3 cycles 3 2 cycles
cache: cycles
L2 18 cycles 6 5 cycles
cache: cycles
Latency leads to wasted clock ticks; the fewer there are of these, the faster the
processor will appear to be.
In CPU‘s like the Pentium 4 and Athlon XP, a handful of support mechanisms are
also used which work in parallel with the cache. These include:
A hardware auto data prefetch unit, which attempts to guess which data should be
read into the cache. This device monitors the instructions being processed and
predicts what data the next job will need.
116
Related to this is the Translation Look-aside Buffer, which is also a kind of cache. It
contains information which constantly supports the supply of data to the L1 cache,
and this buffer is also being optimised in new processor designs. Both systems
contribute to improved exploitation of the limited bandwidth in the memory system.
Conclusion
L1 and L2 cache are important components in modern processor design. The cache is
crucial for the utilisation of the high clock frequencies which modern process
technology allows. Modern L1 caches are extremely effective. In about 96-98% of
cases, the processor can find the data and instructions it needs in the cache. In the
future, we can expect to keep seeing CPU‘s with larger L2 caches and more advanced
memory management. As this is the way forward if we want to achieve more effective
utilisation of the CPU‘s clock ticks. Here is a concrete example:
In January 2002 Intel released a new version of their top processor, the Pentium 4
(with the codename, ―Northwood‖). The clock frequency had been increased by 10%,
so one might expect a 10% improvement in performance. But because the integrated
L2 cache was also doubled from 256 to 512 KB, the gain was found to be all of 30%.
117
CPU L2 cache Clock freq. Improvement
In 2002 AMD updated the Athlon processor with the new ‖Barton‖ core. Here the L2
cache was also doubled from 256 to 512 KB in some models. In 2004 Intel came with
the ―Prescott‖ core with 1024 KB L2 cache, which is the same size as in AMD‘s
Athlon 64 processors. Some Extreme Editions of Pentium 4 even uses 2 MB of L2
cache.
Xeon processors are incredibly expensive (about Euro 4,000 for the top models), so
they have never achieved widespread distribution.
They are used in high-end servers, in which the CPU only accounts for a small part of
the total price.
Otherwise, Intel‘s 64 bit server CPU, the Itanium. The processor is supplied in
modules which include 4 MB L3 cache of 300 million transistors.
118
Multiprocessors
Several Xeon processors can be installed on the same motherboard, using special
chipsets. By connecting 2, 4 or even 8 processors together, you can build a very
powerful computer.
These MP (Multiprocessor) machines are typically used as servers, but can also be
used as powerful workstations, for example, to perform demanding 3D graphics and
animation tasks. AMD has the Opteron processors, which are server-versions of the
Athlon 64. Not all software can make use of the PC‘s extra processors; the programs
have to be designed to do so. For example, there are professional versions of
Windows NT, 2000 and XP, which support the use of several processors in one PC.
See also the discussion of Hyper Threading which allows a Pentium 4 processor to
appear as an MP system. Both Intel and AMD also works on dual-core processors.
Since 1997, there has been more and more focus on refinement of the chipset, and not
least the north bridge, which looks after data transfer to and from RAM. The south
bridge has also been constantly developed, but the focus has been on adding new
facilities.
For the north bridge, the development has focused on getting more bandwidth
between the RAM and CPU. Let‘s look at a few examples of this.
Bridge or Hub
In a Pentium II motherboard, the I/O bus is directly linked to the system clock. The
I/O bus (that is, in practise, the PCI bus) runs at 33 MHz, and that is typically a third
or a quarter of the system clock speed Figure
119
In this architecture (from the Pentium II chipset), the PCI bus connects to the
chipset‘s two bridges.
In 1998-99, new developments took place at both AMD and Intel. A new architecture
was introduced based on a Memory Controller Hub (MCH) instead of the traditional
north bridge and an I/O Controller Hub (ICH) instead of the south bridge. I am using
Intel‘s names here; the two chips have other names at AMD and VIA, but the
principle is the same. The first Intel chipset with this architecture was called i810.
The MCH is a controller located between the CPU, RAM and AGP. It regulates the
flow of data to and from RAM. This new architecture has two important
consequences:
devices.
The new architecture is used for both Pentium 4 and Athlon processors, and in
chipsets from Intel, VIA, and others. In reality, it doesn‘t make a great deal of
difference whether the chipset consists of hubs or bridges, so in the rest of the guide I
will use both names indiscriminately.
120
The MCH is the central part of the i875P chip set.
In 2003, Intel launched a chipset which work with the Pentium 4 and dual channel
DDR RAM, each running at 200 MHz. This chip set became very popular, since it
had a very good performance.
121
Another new feature in this chip set is that a Gigabit Ethernet controller can have
direct access to the MCH (the north bridge). Traditionally the LAN controller is
connected to the PCI bus. But since a gigabit network controller may consume a great
band width, it is better to plug it directly into north bridge. This new design is called
Communication Streaming Architecture (CSA).
In late 2004 Intel introduced a new 900-series of chipsets. They were intended for the
new generation of Pentium 4 and Celeron processors based on the LGA 775-socket as
in Figur The chip sets comes with support for the PCI Express bus, which is
replacing the AGP bus and with support of DDR2 RAM:
The new chipset architecture, where the north bridge has become a hub. Here Intel
chip set i925.
One might be tempted to think that the bandwidth to the RAM ought to be identical
with that of the system bus. But that is not the case. It would actually be good if it was
122
higher. That‘s because the RAM doesn‘t only deliver data to the CPU. Data also goes
directly to the graphics port and to and from the I/O devices – bypassing the CPU.
RAM therefore needs even greater bandwidth. In future architectures we will see
north bridges for both Pentium 4 and Athlon XP processors which employ more
powerful types of RAM, such as 533 MHz DDR2.
The whole number calculations are probably the most important, certainly for normal
PC use – using office programs and the like. But operations involving floating point
numbers have taken on greater significance in recent years, as 3D games and sound,
image and video editing have become more and more a part of everyday computing.
Let‘s have a brief look at this subject.
The CPU has to perform a lot of calculations on decimal (or real) numbers when the
PC runs 3D games and other multimedia programs.
These decimal numbers are processed in the CPU by a special unit called an FPU
(Floating Point Unit). In case you are wondering (as I did) about the name, floating
point – here is an explanation: Real numbers (like the number π , pi) can have an
infinite number of decimal places. In order to work with these, often very large,
numbers, they are converted into a special format.
123
First the required level of precision is set. Since the numbers can have an infinite
number of decimals, they have to be rounded. For example, one might choose to have
five significant digits, as I have done in the examples below (inside the PC, one would
probably choose to have many more significant digits).
Once the precision has been set, the numbers are converted as shown below (the
decimal point floats):
4
.
-2
.
Now the FPU can manage the numbers and process them using the arithmetic
operators.
Floating point numbers are excessively difficult for the CPU‘s standard processing
unit (the ALU) to process. A huge number of bits are required in order to perform a
precise calculation. Calculations involving whole numbers (integers) are much
simpler and the result is correct, every time.
That is why an FPU is used – a special calculating unit which operates with floating
point numbers of various bit lengths, depending on how much precision is needed. FP
numbers can be up to 80 bits long, whereas normal whole numbers can ―only‖ be up
to 32 bits (permitting 4,294 billion different numbers). So the FPU is a number
cruncher, which relieves the load on the ALU‘s. You can experiment with large
numbers yourself, for example, in a spreadsheet.
124
In Excel 2000, 21023 (the number 2, multiplied by itself 1023 times), is the biggest
calculation I can perform. The result is slightly less than 9 followed by 307 zeroes.
Modern CPU‘s have a built-in FPU (Floating Point Unit) which serves as a number
cruncher. But it hasn‘t always been like this.
For example, Intel‘s 80386 processor didn‘t have a built-in FPU calculating unit. All
calculations were done using the processor‘s ALU. But you could buy a separate FPU
(an 80387), which was a chip which you mounted in a socket on the motherboard,
beside the CPU. However, in the 80486 processor, the FPU was built-in, and it has
been that way ever since.
3D graphics
Much of the development in CPU‘s has been driven by 3D games. These formidable
games (like Quake and others) place incredible demands on CPU‘s in terms of
computing power. When these programs draw people and landscapes which can
change in 3-dimensional space, the shapes are constructed from tiny polygons
(normally triangles or rectangles).
125
A character in a PC game might be built using 1500 such polygons. Each time the
picture changes, these polygons have to be drawn again in a new position. That means
that every corner (vortex) of every polygon has to be re-calculated.
In order to calculate the positions of the polygons, floating point numbers have to be
used (integer calculations are not nearly accurate enough). These numbers are called
single-precision floating points and are 32 bits long. There are also 64-bit numbers,
called double-precision floating points, which can be used for even more demanding
calculations.
The CPU can be left gasping for breath when it has to work with 3D movements
across the screen. What can we do to help it? There are several options:
We have seen that clock frequencies are constantly increasing in the new generations
of CPU. But the FPU‘s themselves have also been greatly enhanced in the latest
generations of CPU‘s. The Athlon, especially, is far more powerfully equipped in this
area compared to its predecessors.
126
The last method has also been shown to be very effective. CPU‘s have simply been
given new registers and new instructions which programmers can use.
MMX instructions
The first initiative was called MMX (multimedia extension), and came out with the
Pentium MMX processor in 1997. The processor had built-in ―MMX instructions‖
and ―MMX registers‖.
The previous editions of the Pentium (like the other 32 bit processors) had two types
of register: One for 32-bit integers, and one for 80-bit decimal numbers. With MMX
we saw the introduction of a special 64-bit integer register which works in league with
the new MMX instructions. The idea was (and is) that multimedia programs should
exploit the MMX instructions. Programs have to be ―written for‖ MMX, in order to
utilise the new system.
MMX is an extension to the existing instruction set (IA32). There are 57 new
instructions which MMX compatible processors understand, and which require new
programs in order to be exploited.
Many programs were rewritten to work both with and without MMX seen in Figure
Thus these programs could continue to run on older processors, without MMX, where
they just ran slower.
MMX was a limited success. There is a weakness in the design in that programs either
work with MMX, or with the FPU, and not both at the same time – as the two
instruction sets share the same registers. But MMX laid the foundation for other
multimedia extensions which have been much more effective.
127
This drawing program (Painter) supports MMX, as do all modern programs.
3DNow!
3DNow! was a big success. The instructions were quickly integrated into Windows,
into various games (and other programs) and into hardware manufacturers‘ driver
programs.
SSE
After AMD‘s success with 3DNow!, Intel had to come back with something else.
Their answer, in January 1999, was SSE (Streaming SIMD Extensions), which are
another way to improve 3D performance. SSE was introduced with the Pentium III.
128
In principle, SSE is significantly more powerful than 3DNow! The following changes
were made in the CPU:
SSE also quickly became a success. Programs like Photoshop were released in new
SSE optimised versions, and the results were convincing. Very processor-intensive
programs involving sound, images and video, and in the whole area of multimedia,
run much more smoothly when using SSE.
Since SSE was such a clear success, AMD took on board the technology. A large part
of SSE was built into the AthlonXP and Duron processors. This was very good for
software developers (and hence for us users), since all software can continue to be
developed for one instruction set, common to both AMD and Intel.
With the Pentium 4, SSE was extended to use even more powerful techniques. SSE2
contains 144 new instructions, including 128-bit SIMD integer operations and 128-bit
SIMD double-precision floating-point operations.
SSE2 can reduce the number of instructions which have to be executed by the CPU in
order to perform a certain task, and can thus increase the efficiency of the processor.
Intel mentions video, speech recognition, image/photo processing, encryption and
financial/scientific programs as the areas which will benefit greatly from SSE2. But as
with MMX, 3DNow! and SSE, the programs have to be rewritten before the new
instructions can be exploited.
SSE2 adopted by the competition, AMD, in the Athlon 64-processors. Here AMD
even doubled up the number of SSE2 registers compared to the Pentium 4. Latest
129
Intel has introduced 13 new instructions in SSE3, which Intel uses in the Prescott-
version of Pentium 4.
We are now going to leave the discussion of instructions. I hope this examination has
given you some insight into the CPU‘s work of executing programs.
From about 1984 on, every PC had a standard bus which was used for I/O tasks. That
was the ISA (Industry Standard Architecture) bus.
Right up until about 1999 there were still ISA slots in most PC‘s. In the later years,
however, they were only kept for compatibility, so that plug-in cards of the old ISA
type could be re-used. This was particularly the case for sound cards from
SoundBlaster; they worked quite well on the ISA bus, and many games were
programmed to directly exploit this type of hardware. It therefore took many years to
get away from the ISA bus, but we have managed to now.
Motherboard from 1998 with three (black) ISA slots and four (white) PCI slots.
130
History of the ISA bus
The ISA bus is thus the I/O bus which survived the longest. Here is some information
about it:
ISA was an improvement to IBM‘s original XT bus (which was only 8 bits wide)
IBM used the protected name ‖AT Bus‖, but in everyday conversation it was called
the ISA bus.
The ISA bus was 16 bits wide, and ran at a maximum clock frequency of 8 MHz.
The bus has a theoretical bandwidth of about 8 MB per second. However in practise it
never exceeds about 1-2 MB/sec. – partly because it takes 2-3 of the processor‘s clock
pulses to move a packet (16 bits) of data.
The ISA bus is not used much today, but it had enormous significance in the years up
until the middle of the 1990‘s.
Sluggish performance
One of the reasons the ISA bus was slow was that it only had 16 data channels. The
486 processor, once it was introduced, worked with 32 bits each clock pulse. When it
sent data to the ISA bus, these 32-bit packets (dwords or doublewords) had to be split
into two 16-bit packets (two words), which were sent one at a time, and this slowed
down the flow of data.
131
The PCI bus was a huge step forward
The ISA bus was not ‖intelligent‖ either, since it was in principle the CPU which
controlled all the work the bus was doing. This meant the CPU could only begin a
new task when the transfer was complete. You may perhaps have experienced
yourself, that when your PC works with the floppy disk drive – the rest of the PC
virtually grinds to a halt. That‘s the ISA bus‘s fault, and it therefore only happens on
older PC‘s.
These small delays are called wait states. If an ISA adapter cannot keep up with the
data it is receiving, it sends wait states to the CPU. These are signals to the CPU
telling it to do nothing. A wait state is a wasted clock pulse – the CPU skips over a
clock pulse, without doing anything. Thus a slow ISA adapter could choke any PC.
Another problem was that the ISA bus often played up when you were installing an
expansion card (e.g. a sound card). Many of the problems were associated with the
handling of IRQ‘s and DMA channels (I will explain these terms later), which often
had to be done ‖by hand‖ with the old ISA bus.
Every device takes up one particular IRQ, and possibly a DMA channel, and conflicts
often arose with other devices. It was a big relief when Intel, in the late 1990‘s, finally
dropped the ISA bus and replaced it with the smart USB bus.
132
The MCA, EISA and VL buses
The ISA bus was too slow, and the solution was to develop new standards for I/O
devices. In 1987-88, two new I/O buses were put forward. First, IBM brought out
their technologically advanced MCA bus. But since it was patented, a number of other
companies pooled together to create the equivalent EISA bus.
But neither MCA or EISA had a big impact on the clone market. We were stuck with
the ISA bus up until 1993, when the VL bus finally became reasonably widespread. It
was a genuine local bus, which means it worked synchronously with the system bus.
The VL bus was very primitive; it was really just an extension of the system bus.
The VL bus never managed to have a big impact, because almost at the same time, the
robust and efficient PCI bus broke through. The various I/O buses are summarised
below:
Bus Description
PC-XT Synchronous 8-bit bus which followed the CPU clock frequency of
from 1981 4.77 or 6 MHz.
Band width: 4-6 MB/sec.
ISA (PC-AT) Simple, cheap I/O bus.
from 1984 Synchronous with the CPU.
Band width: 8 MB/sec.
MCA Advanced I/O bus from IBM (patented). Asynchronous, 32-bit, at 10
from 1987 MHz.
Band width: 40 MB/sec.
EISA Advanced I/O bus (non-IBM), used especially in network servers.
From 1988 Asynchronous, 32-bit, at 8.33 MHz.
Band width: 32 MB/sec.
VESA Local Bus Simple, high-speed I/O bus.
from 1993 32-bit, synchronised with the CPU‘s clock frequency: 33, 40, 50
MHz.
Band width: up to 160 MB/sec.
PCI Advanced, general, high-speed I/O bus. 32-bit, asynchronous, at 33
from 1993 MHz.
Band width: 133 MB/sec.
USB and Firewire, Serial buses for external equipment.
from 1998
133
Bus Description
PCI Express A serial bus for I/O cards with very high speed. Replaces PCI and
from 2004 AGP.
500 MB/sec. per. Channel.
PCI stands for Peripheral Component Interconnect. The bus is an Intel product which
is used in all PC‘s today, and also in other computers, as the PCI bus is processor
independent. It can be used with all 32-bit and 64-bit processors, and is therefore
found in many different computer architectures.
At the same time, the bus is compatible with the ISA bus to a certain extent, since PCI
devices can react to ISA bus signals, create the same IRQ‘s etc. One consequence of
this was that Sound Blaster compatible sound cards could be developed, which was
very important in the middle of the 1990‘s. In optimal conditions, the PCI bus sends
one packet of data (32 bits) each clock pulse. The PCI bus therefore has a maximum
bandwidth of 132 MB per second, as shown below:
134
Clock 33 MHz
frequency:
Bus width: 32 bits
Bandwidth: 32 bits x 33,333,333 clock pulses/second =
4 bytes x 33,333,333 clock pulses/second =
132 MB per second
There is also a more powerful versions of the PCI standard, which provides greater
bandwidth, but most motherboards still use the original version. The PCI bus has a
buffer which operates between the CPU and the peripheral devices (a kind of cache
RAM). This allows the CPU to deliver its data to the buffer, and then perform other
tasks. The bus looks after the rest of the delivery itself at its own pace. Alternatively,
PCI adapters can also deliver data to the buffer, whether or not the CPU has time to
process it. The data just stands in a queue and waits until there is room on the system
bus, which then relays it to the CPU.
As a result of all this, the peripheral PCI devices operate asynchronously – at their
own pace – in relation to the CPU. Thus the PCI bus (in contrast to the VL bus) is not
a local bus from a technical perspective.
The PCI bus is being refined by a Special Interest Group. You can follow their
progress yourself on the Net (www.pcisig.com).
The Plug and Play standard is part of the PCI specification. It means that all PCI
adapter cards are self-configuring. The specification for Plug and Play was developed
by Microsoft and Intel, among others, and the ideas was (as the name suggests) to
provide a system where one can simply install an adapter and it will work. It‘s not
quite this simple in practise; a software driver has to normally be installed before an
adapter will work. But the actual cooperation between adapter, motherboard and
operating system – happens automatically. During startup, communication takes place
between the PC‘s startup programs, the PCI controller and each PCI device (adapter).
135
The adapter has to be able to inform the I/O bus which I/O addresses and IRQ‘s it can
operate with. And it has to be able to configure itself to use the resources allocated to
it by the I/O bus. When the exercise is successful, the adapter is configured
automatically, and is ready to be used by the operating system.
All the components involved (adapter, motherboard and Windows) have to be Plug
and Play compatible for the system to work.
ESCD
In connection with Plug and Play, it is necessary also to discuss the Extended System
Configuration Data (ESCD) system. This is a small data area which is stored in the
motherboard‘s CMOS storage.
The ESCD store is used to save adapter configuration information. This means the
motherboard doesn‘t have to go through the whole plug and play operation at each
startup – information about the PC‘s configuration can be read from the CMOS
storage.
136
The ESCD also allows the user to manually allocate an IRQ etc., for a particular
adapter. This can be done using the motherboard‘s setup program. Read more about
the CMOS on page Error! Bookmark not defined.
I have several times mentioned the AGP port, which is directly connected to the CPU
and RAM. It is a high-speed port used for the video card, which has it‘s own RAM
access.
As users, we communicate with PC programs via the screen. The screen shows us a
graphical representation of the software which is loaded and active in the PC. But the
screen has to be fed data in order to show a picture. This data comes from the video
card, which is a controller.
Screens can be analogue (the traditional, big and heavy CRT monitors) or digital
devices, like the modern, flat TFT screens. Whatever the case, the screen has to be
controlled by the PC (and ultimately by the CPU). This screen control takes place
using a video card.
Finally, the video card can be connected either to the PCI bus, the AGP bus or the PCI
Express x16 bus.
Big bandwidth
Traditionally, the video card (also called the graphics card) was connected as an I/O
device. This meant that data for the video card was transferred using the same I/O bus
which looks after data transfer to and from the hard disks, network card, etc.
137
In the late 1990‘s, the demands placed on the graphics system increased dramatically.
This was especially due to the spread of the many 3D games (like Quake, etc.). These
games require enormous amounts of data, and that places demands on the bus
connection. At that time, the video card was connected to the PCI bus, which has a
limited bandwidth of 133 MB/sec. The same bus, as just mentioned, also looks after
the hard disk and other I/O devices, which all need bandwidth. The PCI bus therefore
became a bottleneck, and the solution to the problem was to release the video card
from the I/O bus.
The data path to the video card before the AGP standard.
AGP
AGP (Accelerated Graphics Port) is a special I/O port which is designed exclusively
for video cards. AGP was developed by Intel. The AGP port is located close to the
chipset‘s north bridge.
138
The AGP slot can be seen on this motherboard, left of the three PCI slots.
The video card port was moved from the south to the north bridge. The new
architecture gives optimal access to RAM and hence to the bandwidth which the 3D
games require.
At the same time, the PCI system is spared from the large amount of graphic data
traffic to and from the video card. It can now focus on the other intensive transfer
tasks, such as transfer to and from the network adapter and disk drive.
Technical details
139
The texture cache is used by games, and by giving access to the motherboard RAM,
less RAM is needed on the cards.
The AGP bus is actually a 64-bit variant of the PCI bus. You can also see that on the
surface, the motherboard AGP slot looks a fair bit like a PCI slot. But it is placed in a
different position on the motherboard, to avoid confusion . The slot also has a
different colour.
The first version of AGP was 1X, with a bandwidth of 254 MB/sec. But AGP was
quickly released in a new mode, called 2X, with 508 MB/sec.
Later came 4X and 8X, which are the standards today. This involves a clock doubling,
just as we have seen, for example, with DDR RAM. Two or four data packets are sent
for each clock pulse. In this way, a bandwidth of 2,032 MB/sec has been reached.
Textures are things like backgrounds in games. They can be uploaded directly from
RAM to the video card. The system is called DIME (Direct Memory Execute). This
allows the video card memory to be extended using standard RAM on the
motherboard. In Error! Reference source not found.Hard disks, ATA and SATA
I am now finally going to describe the ATA interface, which has been mentioned
several times earlier in the guide. The ATA interface is used for hard disks and the
motherboard‘s ATA controller is built into the chipset‘s south bridge, as shown in
Picture .We have also seen, that ATA devices use bus mastering to exchange data
directly with RAM. But what does this interface actually consist of? And why do new
standards for hard disks keep coming out? We are going to look at that now.
140
Right back in 1957, IBM introduced the first ―fixed disk storage‖. It was a big thing
with 50 disks that were 24 inches in diameter. This very early hard disk had a capacity
of 5 MB – a huge storage space at the time, which cost $35,000 a year to lease. One of
IBM‘s models was called the 3030, and in the weapons-conscious USA, this led to the
hard disk being given the nickname, Winchester disk (a Winchester 3030 was a
popular rifle) – a nickname that was also used in Europe for many years.
The first computer with a hard disk was IBM‘s RAMAC, which was used during the
1960 Olympics to calculate sports results. A bit later, in 1962, removable disk packs
were developed – a forerunner of the floppy disk. In 1964, the CRC algorithm was
introduced. It provided greater security by checking and comparing data before and
after it was written to the disk. In 1971, the first 8-inch diskettes came onto the
market.
But it wasn‘t until the middle of the 1980‘s that people began to use hard disks in
more standard PC‘s, and since then development has surged ahead. The capacity of a
standard hard disk has actually become a thousand times greater in the period 1990-
2000.
The standard user‘s need for disk space (e.g. for digital photos, video and music) has
grown in step with this, so that 120-250 GB of disk space or more is normal in many
PC‘s – a figure which will double over the next few years.
Hard disks are constantly being developed which have greater capacity and speed (the
two go together, as we shall see), and there is therefore a constant need for new types
of hard disk controllers. The companies leading the development are Maxtor, Western
Digital, IBM/Hitachi and Seagate.
141
box. The standard size is about 10 x 14.5 x 2.5 cm, and such a device can contain
hundreds of gigabytes of data. Inside the box, a number of glass or metal plates whir
around at, for example, 5400 or 7200 revolutions per minute – these being the two
most common speeds.
The read/write heads hover over the magnetic plates, and can transfer data at a
tremendous speed:
One of the read/write heads, which can swing across the plates.
The actual read/write head is a tiny electromagnet. The magnet ends in a C-shaped
head, the shape of which ensures that it virtually hovers above the magnetic plate.
Under the read/write head are the disk tracks. These are thin rings packed with
magnetic particles. These magnetic particles can be arranged in patterns of bits, which
are translated into 0‘s and 1‘s by the electronics of the hard disk:
will reorganise the tiny magnetic bits in the track, so they represent new values. Thus
data is written.
the magnetic pattern from the disk. This magnetism will induce current in the coil,
and this ―current‖ contains the track‘s data, which is thus read.
142
A peek inside the hard disk reveals
the magnetic plates, which have a
diameter of 3½ inches.
The read/write heads are the most
expensive part of the hard disk.
When the disk is switched off, the
heads are parked in a special area,
so that they will not be damaged
during transport. In figure, the cover
has been removed from a hard disk, and you can see the uppermost arm with its
read/write head.
The individual files are written across a number of disk sectors (at least one), and this
task is handled by the file system.
The file system is part of the operating system, which the disk has to formatted with.
In Windows 98, the FAT32 file system is used. In Windows 2000/XP, you can also
use NTFS. They are different systems for organising files and folder structures on the
hard disk. You can read more about the file system in my guide, ‖Do it yourself
DOS‖.
143
Hard disks are made of a number of disks, each side of which is divided into a large
number of tracks. Each track contains numerous sectors, the smallest unit on a disk. In
order to be able to use the sectors, the disk has to be formatted with a file system.
Another consequence of higher density is that the disks become faster, since they can
transfer more data per rotation. There are simply more bits hidden in each track.
All hard disks have a certain amount of cache installed as 2 or 8 MB of fast RAM,
which functions as a buffer. The cache helps ensure that the data gathered by the
mechanics of the disk is optimally exploited.
The new and faster hard disks are always followed by new types of interface, since
the controller principles have to be upgraded as well in order to handle the large
amounts of data. At the time of writing, the fastest ATA interface is called ATA/133,
but it is about to be replaced with Serial ATA
The interface‘s job is to move data between the hard disk sectors and the I/O bus as
fast as possible. It consists of:
144
In the ‖old days‖, interfaces such as ST-506 and ESDI were used. The ATA (AT
Attachment) interfaces are based on the IDE standard (Integrated Drive Electronics).
The names, IDE and ATA are ―owned‖ by Western Digital, but are used anyway in
everyday language.
When you look at all the extras and options that are available for new computer
keyboards, it can be hard to believe that their original design came from mechanical
typewriters that didn't even use electricity. Now, you can buy ergonomic keyboards
that bear little resemblance to flat, rectangular models with ordinary square keys.
Some flashier models light up, roll up or fold up, and others offer options for
programming your own commands and shortcuts.
But no matter how many bells and whistles they offer, most keyboards operate using
similar technology. They use switches and circuits to translate a person's keystrokes
into a signal a computer can understand. In this article we will explore keyboard
technology along with different key layouts, options and designs.
Keyboard Basics
145
also called keycaps, are the same size and shape from keyboard to keyboard. They're
also placed at a similar distance from one another in a similar pattern, no matter what
language or alphabet the keys represent.
A keyboard is a lot like a miniature computer. It has its own processor and circuitry
that carries information to and from that processor. A large part of this circuitry
makes up the key matrix.
The key matrix is a grid of circuits underneath the keys. In all keyboards (except for
capacitive models, which we'll discuss in the next section), each circuit is broken at a
point below each key. When you press a key, it presses a switch, completing the
circuit and allowing a tiny amount of current to flow through. The mechanical action
of the switch causes some vibration, called bounce, which the processor filters out. If
you press and hold a key, the processor recognizes it as the equivalent of pressing a
key repeatedly.
When the processor finds a circuit that is closed, it compares the location of that
circuit on the key matrix to the character map in its read-only memory (ROM). A
character map is basically a comparison chart or lookup table. It tells the processor the
position of each key in the matrix and what each keystroke or combination of
keystrokes represents. For example, the character map lets the processor know that
pressing the a key by itself corresponds to a small letter "a," but the Shift and a keys
pressed together correspond to a capital "A."
146
The key matrix
A computer can also use separate character maps, overriding the one found in the
keyboard. This can be useful if a person is typing in a language that uses letters that
don't have English equivalents on a keyboard with English letters. People can also set
their computers to interpret their keystrokes as though they were typing on a Dvorak
keyboard even though their actual keys are arranged in a QWERTY layout. In
addition, operating systems and applications have keyboard accessibility settings that
let people change their keyboard's behavior to adapt to disabilities.
Keyboard Switches
All of the other types of switches used in keyboards are mechanical in nature. Each
provides a different level of audible and tactile response -- the sounds and sensations
that typing creates. Mechanical key switches include:
Rubber dome
Membrane
Metal contact
Foam element
147
This keyboard uses rubber dome switches.
Rubber dome switches are very common. They use small, flexible rubber domes,
each with a hard carbon center. When you press a key, a plunger on the bottom of the
key pushes down against the dome, and the carbon center presses against a hard, flat
surface beneath the key matrix. As long as the key is held, the carbon center
completes the circuit. When the key is released, the rubber dome springs back to its
original shape, forcing the key back up to its at-rest position. Rubber dome switch
keyboards are inexpensive, have pretty good tactile response and are fairly resistant to
spills and corrosion because of the rubber layer covering the key matrix.
Rather than having a switch for each key, membrane keyboards use a continuous
membrane that stretches from one end to another. A pattern printed in the membrane
completes the circuit when you press a key. Some membrane keyboards use a flat
surface printed with representations of each key rather than keycaps. Membrane
keyboards don't have good tactile response, and without additional mechanical
components they don't make the clicking sound that some people like to hear when
they're typing. However, they're generally inexpensive to make.
148
Metal contact and foam element keyboards are increasingly less common. Metal
contact switches simply have a spring-loaded key with a strip of metal on the bottom
of the plunger. When the key is pressed, the metal strip connects the two parts of the
circuit. The foam element switch is basically the same design but with a small piece
of spongy foam between the bottom of the plunger and the metal strip, providing a
better tactile response. Both technologies have good tactile response, make
satisfyingly audible "clicks," and are inexpensive to produce. The problem is that the
contacts tend to wear out or corrode faster than on keyboards that use other
technologies. Also, there is no barrier that prevents dust or liquids from coming in
direct contact with the circuitry of the key matrix.
Different manufacturers have used these standard technologies, and a few others, to
create a wide range of non-traditional keyboards. We'll take a look at some of these
non-traditional keyboards in the next section
As you type, the processor in the keyboard analyzes the key matrix and determines
what characters to send to the computer. It maintains these characters in its memory
buffer and then sends the data.
Many keyboards connect to the computer through a cable with a PS/2 or USB
(Universal Serial Bus) connector. Laptops use internal connectors. Regardless of
which type of connector is used, the cable must carry power to the keyboard, and it
must carry signals from the keyboard back to the computer.
149
Computer Mouse
we'll take the cover off of this important part of the human-machine interface and see
exactly what makes it tick.
Evolution
It is amazing how simple and effective a mouse is, and it is also amazing how long it
took mice to become a part of everyday life. Given that people naturally point at
things -- usually before they speak -- it is surprising that it took so long for a good
pointing device to develop. Although originally conceived in the 1960s, a couple of
decades passed before mice became mainstream.
In the beginning, there was no need to point because computers used crude interfaces
like teletype machines or punch cards for data entry. The early text terminals did
nothing more than emulate a teletype (using the screen to replace paper), so it was
many years (well into the 1960s and early 1970s) before arrow keys were found on
most terminals. Full screen editors were the first things to take real advantage of the
cursor keys, and they offered humans the first way to point.
Light pens were used on a variety of machines as a pointing device for many years,
and graphics tablets, joy sticks and various other devices were also popular in the
1970s. None of these really took off as the pointing device of choice, however.
When the mouse hit the scene -- attached to the Mac, it was an immediate success.
There is something about it that is completely natural. Compared to a graphics tablet,
150
mice are extremely inexpensive and they take up very little desk space. In the PC
world, mice took longer to gain ground, mainly because of a lack of support in the
operating system. Once Windows 3.1 made Graphical User Interfaces (GUIs) a
standard, the mouse became the PC-human interface of choice very quickly.
Inside a Mouse
The main goal of any mouse is to translate the motion of your hand into signals that
the computer can use. Let's take a look inside a track-ball mouse to see how it works:
1. A ball inside the mouse touches the desktop and rolls when the mouse moves.
151
The underside of the mouse's logic board: The exposed portion of the ball
touches the desktop.
2. Two rollers inside the mouse touch the ball. One of the rollers is oriented so
that it detects motion in the X direction, and the other is oriented 90 degrees to
the first roller so it detects motion in the Y direction. When the ball rotates,
one or both of these rollers rotate as well. The following image shows the two
white rollers on this mouse:
The rollers that touch the ball and detect X and Y motion
3. The rollers each connect to a shaft, and the shaft spins a disk with holes in it.
When a roller rolls, its shaft and disk spin. The following image shows the
disk:
152
A typical optical encoding disk: This disk has 36 holes around its outer edge.
4. On either side of the disk there is an infrared LED and an infrared sensor.
The holes in the disk break the beam of light coming from the LED so that the
infrared sensor sees pulses of light. The rate of the pulsing is directly related to
the speed of the mouse and the distance it travels.
A close-up of one of the optical encoders that track mouse motion: There is an
infrared LED (clear) on one side of the disk and an infrared sensor (red) on the
other.
5. An on-board processor chip reads the pulses from the infrared sensors and
turns them into binary data that the computer can understand. The chip sends
the binary data to the computer through the mouse's cord.
153
The logic section of a mouse is dominated by an encoder chip, a small processor
that reads the pulses coming from the infrared sensors and turns them into bytes
sent to the computer. You can also see the two buttons that detect clicks (on
either side of the wire connector).
You might have noticed that each encoder disk has two infrared LEDs and two
infrared sensors, one on each side of the disk (so there are four LED/sensor pairs
inside a mouse). This arrangement allows the processor to detect the disk's direction
of rotation. There is a piece of plastic with a small, precisely located hole that sits
between the encoder disk and each infrared sensor. It is visible in this photo:
154
A close-up of one of the optical encoders that track mouse motion: Note the piece
of plastic between the infrared sensor (red) and the encoding disk.
This piece of plastic provides a window through which the infrared sensor can "see."
The window on one side of the disk is located slightly higher than it is on the other --
one-half the height of one of the holes in the encoder disk, to be exact. That difference
causes the two infrared sensors to see pulses of light at slightly different times. There
are times when one of the sensors will see a pulse of light when the other does not,
and vice versa.
Data Interface
Most mice on the market today use a USB connector to attach to your computer. USB
is a standard way to connect all kinds of peripherals to your computer, including
printers, digital cameras, keyboards and mice..
Some older mice, many of which are still in use today, have a PS/2 type connector, as
shown here:
Instead of a PS/2 connector, a few other older mice use a serial type of connector to
attach to a computer.
155
Optical Mouse
Developed by Agilent Technologies and introduced to the world in late 1999, the
optical mouse actually uses a tiny camera to take thousands of pictures every second.
Able to work on almost any surface without a mouse pad, most optical mice use a
small, red light-emitting diode (LED) that bounces light off that surface onto a
complimentary metal-oxide semiconductor (CMOS) sensor. In addition to LEDs, a
recent innovation are laser-based optical mice that detect more surface details
compared to LED technology. This results in the ability to use a laser-based optical
mouse on even more surfaces than an LED mouse.
Here's how the sensor and other parts of an optical mouse work together:
The CMOS sensor sends each image to a digital signal processor (DSP) for
analysis.
The DSP detects patterns in the images and examines how the patterns
have moved since the previous image.
Based on the change in patterns over a sequence of images, the DSP
determines how far the mouse has moved and sends the corresponding
coordinates to the computer.
The computer moves the cursor on the screen based on the coordinates
received from the mouse. This happens hundreds of times each second, making
the cursor appear to move very smoothly.
Optical mice have several benefits over track-ball mice:
No moving parts means less wear and a lower chance of failure.
There's no way for dirt to get inside the mouse and interfere with the
tracking sensors.
Increased tracking resolution means a smoother response.
They don't require a special surface, such as a mouse pad.
Accuracy
A number of factors affect the accuracy of an optical mouse. One of the most
important aspects is resolution. The resolution is the number of pixels per inch that
the optical sensor and focusing lens "see" when you move the mouse. Resolution is
expressed as dots per inch (dpi). The higher the resolution, the more sensitive the
mouse is and the less you need to move it to obtain a response.
156
Most mice have a resolution of 400 or 800 dpi. However, mice designed for playing
electronic games can offer as much as 1600 dpi resolution. Some gaming mice also
allow you to decrease the dpi on the fly to make the mouse less sensitive in situations
when you need to make smaller, slower movements.
Historically, corded mice have been more responsive than wireless mice. This fact is
changing, however, with the advent of improvements in wireless technologies and
optical sensors. Other factors that affect quality include:
Size of the optical sensor -- larger is generally better, assuming the other
mouse components can handle the larger size. Sizes range from 16 x 16 pixels
to 30 x 30 pixels.
Refresh rate -- it is how often the sensor samples images as you move the
mouse. Faster is generally better, assuming the other mouse components can
process them. Rates range from 1500 to 6000 samples per second.
Image processing rate -- is a combination of the size of the optical sensor
and the refresh rate. Again, faster is better and rates range from 0.486 to 5.8
megapixels per second.
Maximum speed -- is the maximum speed that you can move the mouse
and obtain accurate tracking. Faster is better and rates range from 16 to 40
inches per second.
Monitor
Display Technology
Often referred to as a monitor when packaged in a separate case, the display is the
most-used output device on a computer. The display provides instant feedback by
showing you text and graphic images as you work or play.
Most desktop displays use liquid crystal display (LCD) or cathode ray tube (CRT)
technology, while nearly all portable computing devices such as laptops incorporate
LCD technology. Because of their slimmer design and lower energy consumption,
monitors using LCD technology (also called flat panel or flat screen displays) are
replacing the venerable CRT on most desktops.
157
Standardsand Resolution
As monitor sizes have increased over the years, display standards and resolutions
have changed. In addition, some manufacturers offer widescreen displays designed for
viewing DVD movies.
Standard
158
In addition to the screen size, display standards and resolutions are related to
something called the aspect ratio.
Two measures describe the size of your display: the aspect ratio and the screen size.
Historically, computer displays, like most televisions, have had an aspect ratio of 4:3.
This means that the ratio of the width of the display screen to the height is 4 to 3.
For widescreen LCD monitors, the aspect ratio is 16:9 (or sometimes 16:10 or 15:9).
Widescreen LCD displays are useful for viewing DVD movies in widescreen format,
playing games and displaying multiple windows side by side. High definition
television (HDTV) also uses a widescreen aspect ratio.
All types of displays include a projection surface, commonly referred to as the screen.
Screen sizes are normally measured in inches from one corner to the corner
diagonally across from it. This diagonal measuring system actually came about
because the early television manufacturers wanted to make the screen size of their
TVs sound more impressive.
Interestingly, the way in which the screen size is measured for CRT and LCD
monitors is different. For CRT monitors, screen size is measured diagonally from
outside edges of the display casing. In other words, the exterior casing is included in
the measurement as seen below.
For LCD monitors, screen size is measured diagonally from the inside of the beveled
edge. The measurement does not include the casing as indicated in the image below.
159
LCD screen size
Because of the differences in how CRT and LCD monitors are measured, a 17-inch
LCD display is comparable to a 19-inch CRT display. For a more accurate
representation of a CRT's size, find out its viewable screen size. This is the
measurement of a CRT display without its outside casing.
Popular screen sizes are 15, 17, 19 and 21 inches. Notebook screen sizes are smaller,
typically ranging from 12 to 17 inches. As technologies improve in both desktop and
notebook displays, even larger screen sizes are becoming available. For professional
applications, such as medical imaging or public information displays, some LCD
monitors are 40 inches or larger!
Obviously, the size of the display directly affects resolution. The same pixel
resolution is sharper on a smaller monitor and fuzzier on a larger monitor because the
same number of pixels is spread out over a larger number of inches. An image on a
21-inch monitor with an 800x600 resolution will not appear nearly as sharp as it
would on a 15-inch display at 800x600.
Multi-scanning Monitors
If you have been around computers for more than a decade, then you probably
remember when NEC announced the MultiSync monitor. Up to that point, most
monitors only understood one frequency, which meant that the monitor operated at a
single fixed resolution and refresh rate. You had to match your monitor with a
graphics adapter that provided that exact signal or it wouldn't work.
160
The introduction of NEC MultiSync technology started a trend towards multi-
scanning monitors. This technology allows a monitor to understand any frequency
sent to it within a certain bandwidth. The benefit of a multi-scanning monitor is that
you can change resolutions and refresh rates without having to purchase and install a
new graphics adapter or monitor each time.
Connections
To display information on a monitor, your computer sends the monitor a signal. The
signal can be in analog or digital format.
However, computers work in a digital world. The computer and video adapter convert
digital data into analog format. A video adapter is an expansion card or component
that provides the ability to convert display information into a signal that is sent to the
monitor. It can also be called a graphics adapter, video card or graphics card.
Once the display information is in analog form, it is sent to the monitor through a
VGA cable. The cable connects at the back of the computer to an analog connector
(also known as a D-Sub connector) that has 15 pins in three rows. See the diagram
below:
161
6: Red return
1: Red out 11: Monitor ID 0 in
(ground)
8: Blue return
3: Blue out 13: Horizontal Sync out
(ground)
You can see that a VGA connector like this has three separate lines for the red, green
and blue color signals, and two lines for horizontal and vertical sync signals. In a
normal television, all of these signals are combined into a single composite video
signal. The separation of the signals is one reason why a computer monitor can have
so many more pixels than a TV set.
Because a VGA (analog) connector does not support the use of digital monitors, the
Digital Video Interface (DVI) standard was developed.
DVI Connection
DVI keeps data in digital form from the computer to the monitor. There's no need to
convert data from digital information to analog information. LCD monitors work in a
digital mode and support the DVI format. (Although, some also accept analog
information, which is then converted to digital format.) At one time, a digital signal
offered better image quality compared to analog technology. However, analog signal
processing technology has improved over the years and the difference in quality is
now minimal.
162
transmitter on the video adapter sends the digital information to a receiver in the
monitor. TMDS takes the signal from the video adapter, determines the resolution
and refresh rate that the monitor is using, and spreads the signal out over the
available bandwidth to optimize the data transfer from computer to monitor.
DVI cables can be a single link cable that uses one TMDS transmitter or a dual link
cable with two transmitters. A single link DVI cable and connection supports a
1920x1080 image, and a dual link cable/connection supports up to a 2048x1536
image.
163
DVI-D connectors carry a digital-only signal and DVI-I adds four pins for analog
capability. Both connectors can be used with a single-link or a dual-link cable,
depending upon the requirements of the display.
If you buy a monitor with only a DVI (digital) connection, make sure that you have a
video adapter with a DVI-D or DVI-I connection. If your video adapter has only an
analog (VGA) connection, look for a monitor that supports the analog format.
Color Depth
The combination of the display modes supported by your graphics adapter and the
color capability of your monitor determine how many colors it displays. For example,
a display that operates in SuperVGA (SVGA) mode can display up to 16,777,216
(usually rounded to 16.8 million) colors because it can process a 24-bit-long
description of a pixel. The number of bits used to describe a pixel is known as its bit
depth.
With a 24-bit bit depth, eight bits are dedicated to each of the three additive primary
colors -- red, green and blue. This bit depth is also called true color because it can
produce the 10,000,000 colors discernible to the human eye, while a 16-bit display is
only capable of producing 65,536 colors. Displays jumped from 16-bit color to 24-bit
color because working in eight-bit increments makes things a whole lot easier for
developers and programmers.
Simply put, color bit depth refers to the number of bits used to describe the color of a
single pixel. The bit depth determines the number of colors that can be displayed at
one time. Take a look at the following chart to see the number of colors different bit
depths can produce:
164
Bit-Depth Number of Colors
2
1
(monochrome)
4
2
(CGA)
16
4
(EGA)
256
8
(VGA)
65,536
16
(High Color, XGA)
16,777,216
24
(True Color, SVGA)
16,777,216
32
(True Color + Alpha Channel)
Notice that the last entry in the chart is for 32 bits. This is a special graphics mode
used by digital video, animation and video games to achieve certain effects.
Essentially, 24 bits are used for color and the other eight bits are used as a separate
layer for representing levels of translucency in an object or image. Nearly every
monitor sold today can handle 24-bit color using a standard VGA connector.
To create a single colored pixel, an LCD display uses three subpixels with red, green
and blue filters. Through the careful control and variation of the voltage applied, the
intensity of each subpixel can range over 256 shades. Combining the subpixels
produces a possible palette of 16.8 million colors (256 shades of red x 256 shades of
green x 256 shades of blue).
Now that you have a general idea of the technology behind computer monitors, let's
take a closer look at LCD monitors, CRT monitors, and the general buying
considerations for both
165
LCD Monitors
The Basics
Liquid crystal display technology works by blocking light. Specifically, an LCD is
made of two pieces of polarized glass (also called substrate) that contain a liquid
crystal material between them. A backlight creates light that passes through the first
substrate. At the same time, electrical currents cause the liquid crystal molecules to
align to allow varying levels of light to pass through to the second substrate and create
the colors and images .
Most LCD displays use active matrix technology. A thin film transistor (TFT)
arranges tiny transistors and capacitors in a matrix on the glass of the display. To
address a particular pixel, the proper row is switched on, and then a charge is sent
down the correct column. Since all of the other rows that the column intersects are
turned off, only the capacitor at the designated pixel receives a charge. The capacitor
is able to hold the charge until the next refresh cycle.
Now that you have an understanding of how LCD technology works, let's look at
some specific features unique to LCD monitors.
166
LCD Features and Attributes
To evaluate the specifications of LCD monitors, here are a few more things you need
to know.
Native Resolution
Unlike CRT monitors, LCD monitors display information well at only the resolution
they are designed for, which is known as the native resolution. Digital displays
address each individual pixel using a fixed matrix of horizontal and vertical dots. If
you change the resolution settings, the LCD scales the image and the quality suffers.
Native resolutions are typically:
17 inch = 1024x768
19 inch = 1280x1024
20 inch = 1600x1200
Viewing Angle
When you look at an LCD monitor from an angle, the image can look dimmer or even
disappear. Colors can also be misrepresented. To compensate for this problem, LCD
monitor makers have designed wider viewing angles. (Do not confuse this with a
widescreen display, which means the display is physically wider.) Manufacturers give
a measure of viewing angle in degrees (a greater number of degrees is better). In
general, look for between 120 and 170 degrees. Because manufacturers measure
viewing angles differently, the best way to evaluate it is to test the display yourself.
Check the angle from the top and bottom as well as the sides, bearing in mind how
you will typically use the display.
Brightness or Luminance
This is a measurement of the amount of light the LCD monitor produces. It is given in
nits or one candelas per square meter (cd/m2). One nit is equal to on cd/m2. Typical
brightness ratings range from 250 to 350 cd/m2 for monitors that perform general-
purpose tasks. For displaying movies, a brighter luminance rating such as 500 cd/m2
is desirable.
167
Contrast Ratio
The contrast ratio rates the degree of difference of an LCD monitor's ability to
produce bright whites and the dark blacks. The figure is usually expressed as a ratio,
for example, 500:1. Typically, contrast ratios range from 450:1 to 600:1, and they can
be rated as high as 1000:1. Ratios more than 600:1, however, provide little
improvement over lower ratios.
Response Rate
The response rate indicates how fast the monitor's pixels can change colors. Faster is
better because it reduces the ghosting effect when an image moves, leaving a faint
trial in such applications as videos or games.
Adjustability
Unlike CRT monitors, LCD monitors have much more flexibility for positioning the
screen the way you want it. LCD monitors can swivel, tilt up and down, and even
rotate from landscape (with the horizontal plane longer than the vertical plane) to
portrait mode (with the vertical plane longer than the horizontal plane). In addition,
because they are lightweight and thin, most LCD monitors have built-in brackets for
wall or arm mounting.
Besides the basic features, some LCD monitors have other conveniences such as
integrated speakers, built-in Universal Serial Bus (USB) ports and anti-theft locks.
LCD Terms
Bezel - This is the metal or plastic frame surrounding the display screen. On LCD
displays, the bezel is typically very narrow.
Contrast ratio - The difference in light intensity between white and black on an
LCD display is called contrast ratio. The higher the contrast ratio, the easier it is to see
details.
Ghosting - An effect of slower response times that cause blurring of images on an
LCD monitor, it's also known as latency. The effect is caused by voltage temporarily
leaking from energized elements to neighboring, non-energized elements on the
display.
168
Luminance - Also known as brightness, it is the level of light emitted by an LCD
display. Luminance is measured in nits or candelas per square meter (cd/m2). One nit
is equal to one cd/m2.
Native resolution - This actual measurement of an LCD display, in pixels, is
given in horizontal by vertical order.
Response time - The speed at which the monitor's pixels can change colors is
called response time. It is measured in milliseconds (ms).
Stuck pixels - A pixel that is stuck either 'on' or 'off', meaning that it is always
illuminated, unlit, or stuck on one color regardless of the image the LCD monitor
displays can also be called a dead pixel.
VESA mount - With this, you can mount a monitor on a desk or wall. It meets
recommendations of the Video Electronics Standards Association (VESA).
Viewing angle - It's the degree of angle at which you can view the screen from the
sides (horizontal angle) and top/bottom (vertical angle) and continue to see clearly
defined images and accurate colors.
CRT Monitors
A CRT monitor contains millions of tiny red, green, and blue phosphor dots that glow
when struck by an electron beam that travels across the screen to create a visible
image. The illustration below shows how this works inside a CRT.
The terms anode and cathode are used in electronics as synonyms for positive and
negative terminals. For example, you could refer to the positive terminal of a battery
as the anode and the negative terminal as the cathode.
169
CRT Features and Attributes
To evaluate the specifications of CRT monitors, here are a few more things you need
to know:
Shadow-mask
A shadow mask is a thin metal screen filled with very small holes. Three electron
beams pass through the holes to focus on a single point on a CRT displays' phosphor
surface. The shadow mask helps to control the electron beams so that the beams strike
the correct phosphor at just the right intensity to create the desired colors and image
on the display. The unwanted beams are blocked or "shadowed."
Aperture-grill
Monitors based on the Trinitron technology, which was pioneered by Sony, use an
aperture-grill instead of a shadow-mask type of tube. The aperture grill consists of
tiny vertical wires. Electron beams pass through the aperture grill to illuminate the
phosphor on the faceplate. Most aperture-grill monitors have a flat faceplate and tend
to represent a less distorted image over the entire surface of the display than the
curved faceplate of a shadow-mask CRT. However, aperture-grill displays are
normally more expensive.
Slot-mask
A less-common type of CRT display, a slot-mask tube uses a combination of the
shadow-mask and aperture-grill technologies. Rather than the round perforations
found in shadow-mask CRT displays, a slot-mask display uses vertically aligned slots.
The design creates more brightness through increased electron transmissions
combined with the arrangement of the phosphor dots.
Dot pitch
170
The dot pitch of an aperture-grill monitor is measured by the horizontal
distance between two like-colored phosphors. It is also sometimes are called
stripe pitch.
The smaller and closer the dots are to one another, the more realistic and detailed the
picture appears. When the dots are farther apart, they become noticeable and make the
image look grainier. Unfortunately, manufacturers are not always upfront about dot
pitch measurements, and you cannot necessarily compare shadow-mask and aperture-
grill CRT types, due to the difference in horizontal and vertical measurements.
The dot pitch translates directly to the resolution on the screen. If you were to put a
ruler up to the glass and measure an inch, you would see a certain number of dots,
depending on the dot pitch. Here is a table that shows the number of dots per square
centimeter and per square inch in each of these common dot pitches:
1 mm 100 625
171
Refresh Rate
In monitors based on CRT technology, the refresh rate is the number of times that the
image on the display is drawn each second. If your CRT monitor has a refresh rate of
72 Hertz (Hz), then it cycles through all the pixels from top to bottom 72 times a
second. Refresh rates are very important because they control flicker, and you want
the refresh rate as high as possible. Too few cycles per second and you will notice a
flickering, which can lead to headaches and eye strain.
Because your monitor's refresh rate depends on the number of rows it has to scan, it
limits the maximum possible resolution. Most monitors support multiple refresh rates.
Keep in mind that there is a tradeoff between flicker and resolution, and then pick
what works best for you. This is especially important with larger monitors where
flicker is more noticeable. Recommendations for refresh rate and resolution include
1280x1024 at 85 Hertz or 1600x1200 at 75 Hertz.
Multiple Resolutions
172
LCDs vs. CRTs
If you are looking for a new display, you should consider the differences between
CRT and LCD monitors. Choose the type of monitor that best serves your specific
needs, the typical applications you use, and your budget.
173
Multiple resolutions - If you need to change your display's resolution for
different applications, you are better off with a CRT monitor because LCD
monitors don't handle multiple resolutions as well.
More rugged - Although they are bigger and heavier than LCD displays,
CRT displays are also less fragile and harder to damage.
So now that you know about LCD and CRT monitors, let's talk about how you can
use two monitors at once. They say, "Two heads are better than one." Maybe the same
is true of monitors!
Dual Monitors
One way to expand your computer's display is to add a second monitor. Using dual
monitors can make you more productive and add a lot to your computing experience.
If you don't have a video adapter with two connections, you can purchase one and
replace your current adapter. This generally works better than simply installing
another video card with a single connection. Combination cards also come with more
features, such as a TV-out port.
In addition to verifying your hardware, you should also double-check your computer's
operating system to be sure it supports the use of dual monitors. For example,
Windows 98 SE, Me, 2000, and XP support multiple monitors.
If you really want to increase your screen real estate, especially for applications such
as financial trading or 3-D design, you can even implement three or more monitors.
174
Other Technologies Touch-screen Monitors
Wireless Monitors
Similar in looks to a tablet PC, wireless monitors use technology such as 802.11b/g to
connect to your computer without a cable. Most include buttons and controls for
mousing and web surfing, and some also include keyboards. The displays are battery-
powered and relatively lightweight. Most also include touch-screen capabilities.
Some displays have built-in television tuners that you can use for viewing cable TV
on your computer. You can also find displays that accept S-video input directly from
a video device. Additional features include picture-in-picture or picture-on-picture
capability, a remote control and support for high-definition television (HDTV).
In August of 1992, VESA passed the VESA Local Bus (VL-Bus) Standard 1.0. This
standard had a significant impact on the industry, because it was the first local bus
standard to be developed, which provided a uniform hardware interface for local bus
peripherals. The creation of this standard ensured compatibility among a wide variety
of graphics boards, monitors, and systems software.
Today, VESA is a worldwide organization that promotes and develops open display
and display interface standards for interoperability. VESA is a formative influence in
the PC industry and a contributor to the enhancement of flat panel display, monitor,
175
graphics, software and systems technologies including home networking and PC
theater.
According to VESA, the Display Port standard will provide a high-quality digital
interface for video and audio content with optional secure content protection. The
goal is to enable support for a wide range of source and display devices, while
combining technologies. For example, the audio and video signals will be available
over the same cable -- a smaller video connector will allow for smaller devices such
as notebook computers, and the standard will enable streaming high definition (HD)
video and audio content.
176
CD burners
The advent of CD burners marked a huge cultural shift. The technology made it
feasible for the average person to gather songs and make their own CDs. Suddenly,
music-mix makers everywhere had their hands on the means of production.
Today, writable CD drives (CD burners) are standard equipment in new PCs, and
more and more audio enthusiasts are adding separate CD burners to their stereo
systems. In less than five years, CDs have eclipsed cassette tapes as the mix medium
of choice.
In this article, you'll find out how CD burners encode songs and other information
onto blank discs. We'll also look at CD re-writable technology, see how the data files
are put together and find out how you can make your own music mixes with a CD
burner.
177
A CD has a long, spiraled data track. If you were to unwind this track, it would
extend out 3.5 miles (5 km).
If you've read How CDs Work, you understand the basic idea of CD technology. CDs
store music and other files in digital form -- that is, the information on the disc is
represented by a series of 1s and 0s (see How Analog and Digital Recording Works
for more information). In conventional CDs, these 1s and 0s are represented by
millions of tiny bumps and flat areas on the disc's reflective surface. The bumps and
flats are arranged in a continuous track that measures about 0.5 microns (millionths of
a meter) across and 3.5 miles (5 km) long.
To read this information, the CD player passes a laser beam over the track. When the
laser passes over a flat area in the track, the beam is reflected directly to an optical
sensor on the laser assembly. The CD player interprets this as a 1. When the beam
passes over a bump, the light is bounced away from the optical sensor. The CD
player recognizes this as a 0.
The bumps are arranged in a spiral path, starting at the center of the disc. The CD
player spins the disc while the laser assembly moves outward from the center of the
CD. At a steady speed, the bumps move past any point at the outer edge of the CD
178
more rapidly than they move past any point nearer the CD's center. In order to keep
the bumps moving past the laser at a constant rate, the player must slow the spinning
speed of the disc as the laser assembly moves outward
The CD player spins the disc while moving the laser assembly outward from the
middle. To keep the laser scanning the data track at a constant speed, the player must
slow the disc as the assembly moves outward.
At its heart, this is all there is to a CD player. The execution of this idea is fairly
complicated, because the pattern of the spiral must be encoded and read with
incredible precision, but the basic process is pretty simple.
Reading CDs
In the last section, we saw that conventional CDs store digital data as a pattern of
bumps and flat areas, arranged in a long spiral track. The CD fabrication machine uses
a high-powered laser to etch the bump pattern into photoresist material coated onto a
glass plate. Through an elaborate imprinting process, this pattern is pressed onto
acrylic discs. The discs are then coated with aluminum (or another metal) to create
the readable reflective surface. Finally, the disc is coated with a transparent plastic
layer that protects the reflective metal from nicks, scratches and debris.
As you can see, this is a fairly complex, delicate operation, involving many steps and
several different materials. Like most complex manufacturing processes (from
newspaper printing to television assembly), conventional CD manufacturing isn't
179
practical for home use. It's only feasible for manufacturers who produce hundreds,
thousands or millions of CD copies.
Consequently, conventional CDs have remained a "read only" storage medium for
the average consumer, like LPs or conventional DVDs. To audiophiles accustomed to
recordable cassettes, as well as computer users who were fed up with the limited
memory capacity of floppy disks, this limitation seemed like a major drawback of CD
technology. In the early '90s, more and more consumers and professionals were
looking for a way to make their own CD-quality digital recordings.
Writing CDs
When the disc is blank, the dye is translucent: Light can shine through and reflect off
the metal surface. But when you heat the dye layer with concentrated light of a
particular frequency and intensity, the dye turns opaque: It darkens to the point that
light can't pass through
A CD-R doesn't have the same bumps and lands as a conventional CD. Instead, the
disc has a dye layer underneath a smooth, reflective surface. On a blank CD-R disc,
the dye layer is completely translucent, so all light reflects. The write laser darkens
the spots where the bumps would be in a conventional CD, forming non-reflecting
areas.
By selectively darkening particular points along the CD track, and leaving other areas
of dye translucent, you can create a digital pattern that a standard CD player can read.
The light from the player's laser beam will only bounce back to the sensor when the
dye is left translucent, in the same way that it will only bounce back from the flat
areas of a conventional CD. So, even though the CD-R disc doesn't have any bumps
pressed into it at all, it behaves just like a standard disc.
180
Burning CDs: Laser Assembly
In the last section, we saw that CD burners darken microscopic areas of CD-R discs to
record a digital pattern of reflective and non-reflective areas that can be read by a
standard CD player. Since the data must be accurately encoded on such a small scale,
the burning system must be extremely precise. Still, the basic process at work is quite
simple.
The CD burner has a moving laser assembly, just like an ordinary CD player. But in
addition to the standard "read laser," it has a "write laser." The write laser is more
powerful than the read laser, so it interacts with the disc differently: It alters the
surface instead of just bouncing light off it. Read lasers are not intense enough to
darken the dye material, so simply playing a CD-R in a CD drive will not destroy any
encoded information.
The write laser moves in exactly the same way as the read laser: It moves outward
while the disc spins. The bottom plastic layer has grooves pre-pressed into it, to guide
the laser along the correct path. By calibrating the rate of spin with the movement of
the laser assembly, the burner keeps the laser running along the track at a constant rate
of speed. To record the data, the burner simply turns the laser writer on and off in
181
synch with the pattern of 1s and 0s. The laser darkens the material to encode a 0
and leaves it translucent to encode a 1.
The machinery in a CD burner looks pretty much the same as the machinery in
any CD player. There is a mechanism that spins the disc and another mechanism
that slides the laser assembly.
Most CD burners can create CDs at multiple speeds. At 1x speed, the CD spins at
about the same rate as it does when the player is reading it. This means it would take
you about 60 minutes to record 60 minutes of music. At 2x speed, it would take you
about half an hour to record 60 minutes, and so on. For faster burning speeds, you
need more advanced laser-control systems and a faster connection between the
computer and the burner. You also need a blank disc that is designed to record
information at this speed.
The main advantage of CD-R discs is that they work in almost all CD players and
CD-ROMS, which are among the most prevalent media players today. In addition to
this wide compatibility, CD-Rs are relatively inexpensive.
The main drawback of the format is that you can't reuse the discs. Once you've burned
in the digital pattern, it can't be erased and re-written. In the mid '90s, electronics
manufacturers introduced a new CD format that addressed this problem. In the next
section, we'll look at these CD-rewritable discs, commonly called CD-RWs,
182
Erasing CDs
In the last section, we looked at the most prevalent writable CD technology, CD-R.
CD-R discs hold a lot of data, work with most CD players and are fairly inexpensive.
But unlike tapes, floppy disks and many other data-storage mediums, you cannot re-
record on CD-R disc once you've filled it up.
CD-RW discs have taken the idea of writable CDs a step further, building in an erase
function so you can record over old data you don't need anymore. These discs are
based on phase-change technology. In CD-RW discs, the phase-change element is a
chemical compound of silver, antimony, tellurium and indium. As with any physical
material, you can change this compound's form by heating it to certain temperatures.
When the compound is heated above its melting temperature (around 600 degrees
Celsius), it becomes a liquid; at its crystallization temperature (around 200 degrees
Celsius), it turns into a solid.
Phase-change Compounds
In phase-change compounds, these shifts in form can be "locked into place": They
persist even after the material cools down again. If you heat the compound in CD-RW
discs to the melting temperature and let it cool rapidly, it will remain in a fluid,
amorphous state, even though it is below the crystallization temperature. In order to
crystallize the compound, you have to keep it at the crystallization temperature for a
certain length of time so that it turns into a solid before it cools down again.
In the compound used in CD-RW discs, the crystalline form is translucent while the
amorphous fluid form will absorb most light. On a new, blank CD, all of the material
183
in the writable area is in the crystalline form, so light will shine through this layer to
the reflective metal above and bounce back to the light sensor. To encode information
on the disc, the CD burner uses its write laser, which is powerful enough to heat the
compound to its melting temperature. These "melted" spots serve the same purpose as
the bumps on a conventional CD and the opaque spots on a CD-R: They block the
"read" laser so it won't reflect off the metal layer. Each non-reflective area indicates
a 0 in the digital code. Every spot that remains crystalline is still reflective, indicating
a 1.
As with CD-Rs, the read laser does not have enough power to change the state of the
material in the recording layer -- it's a lot weaker than the write laser. The erase laser
falls somewhere in between: While it isn't strong enough to melt the material, it does
have the necessary intensity to heat the material to the crystallization point. By
holding the material at this temperature, the erase laser restores the compound to its
crystalline state, effectively erasing the encoded 0. This clears the disc so new data
can be encoded.
CD-RW discs do not reflect as much light as older CD formats, so they cannot be read
by most older CD players and CD-ROM drives. Some newer drives and players,
including all CD-RW writers, can adjust the read laser to work with different CD
formats. But since CD-RWs will not work on many CD players, these are not a good
choice for music CDs. For the most part, they are used as back-up storage devices
for computer files.
As we've seen, the reflective and non-reflective patterns on a CD are incredibly small,
and they are burned and read very quickly with a speeding laser beam. In this system,
the chances of a data error are fairly high. In the next section, we'll look at some of
the ways that CD burners compensate for various encoding problems.
184
Powering Up and Troubleshooting
Now, the moment of truth -- it's time to turn your machine on and see if it works. If
there's a switch on the back of the power supply, make sure it is on. Also make sure
that the power supply is set correctly to 110 or 220 volts (some power supplies do this
automatically, others have a switch or a slider).
Then push the power switch on the front of the case. In the ideal case, four things will
happen:
If you see/hear all of that happening, you are successful. You have created a working
machine. Using the manual that came with the motherboard you can enter the BIOS
screens and make sure everything looks OK. Chances are you will need to set the
machine's date/time, but that is probably all you have to do. Everything else is
probably automatic. All the drives will be recognized and auto-configured. The
default settings on the motherboard will be fine.
The next step is to install the operating system. And presto, you have a working
machine of your own creation. Congratulations!
Troubleshooting
What if you put it all together and it doesn't work? This is the one possible downside
of building your own machine. It is hard to describe the feeling you get when you try
turning on the machine and nothing happens. You have put in several hours of work
and a significant amount of cash, so it's discouraging to get no response.
Is the power supply firmly plugged in and turned on (many power supplies
have a small switch on the back)? Try a different outlet.
Did you plug the power supply into the motherboard? Look at the manual for
details.
185
Make sure that your motherboard is connected to the
power supply.
Is the case's power switch properly connected to the motherboard? If you have
plugged the switch into the wrong pins on the motherboard, it will not work.
Check the motherboard manual.
Are the drives connected to the motherboard properly? Do they have power?
Unseat and reseat the video card. If the motherboard has onboard video, try to
remove the video card completely and boot using the onboard version.
If you have checked all of that and nothing continues to happen, it could mean:
The easiest way to determine where the problem lies is to swap parts. Try a different
power supply. Swap a different motherboard into the case. Play around with different
combinations.
If it is still not working, then you have a few options at this point. You can go back to
the shop that sold you the parts. If you bought them from a small local shop, they can
help you debug the problem (although it may cost you). If they sold you a bad
motherboard (rare, but possible) they will usually help you out. You can also try to
find a more experienced builder who would be willing to help you. There is a rational
cause for the problem you are experiencing -- either a bad part or a bad connection
somewhere -- and you will find it.
Now that you've seen how simple it is to build your own computer, we hope that
you'll give it a shot. You'll have a computer that you understand completely and will
be easy to upgrade. You can save money, and it's a lot of fun too. So the next time you
need a new computer, consider building it yourself!
186
Types of Printers
No matter where you are reading this article, you most likely have a printer nearby.
And there's a very good chance that it is an inkjet printer. Since their introduction in
the latter half of the 1980s, inkjet printers have grown in popularity and performance
while dropping significantly in price.
An inkjet printer is any printer that places extremely small droplets of ink onto paper
to create an image. If you ever look at a piece of paper that has come out of an inkjet
printer, you know that:
187
Dye diffusion thermal transfer
Also known as thermal dye sublimation, dye sub, or thermal dye transfer, this
is a process used by color printers. A colored wax film or crayon is moved
across the page. The pigment is heated and deposited on the page. The paper
frequently goes through the printer four times, one time for each color.
Laser
These work in a manner similar to a photocopier. A roller is charged with
electricity, then a laser is used to remove the charge from portions of the
roller. Powdered ink (toner) sticks to the parts of the roller that were hit by the
laser, and this toner is transferred from the roller to the paper. Then the ink is
baked into the paper using a heater. Laser printers produce very high quality
output and are very fast.
Dot-matrix (impact)
In a dot-matrix printer, a print head moves across the page. Characters or
graphics are created by using a cluster of pins. These pins press an inked
ribbon to the paper to create a dot. Each character or image is made out of a
188
series of dots. These printers are usually cheap and durable, so they are still
used by many businesses as invoice printers. They tend to be slow and noisy,
and the output quality is the lowest of all types of printers.
Daisy wheel
These printers work like a typewriter. Inside the printer is a wheel with a
raised impression of each character in the alphabet and most common
punctuation. To print a character, the wheel rotates, and an electronic hammer
presses the character against an inked ribbon and the page. These printers tend
to be slow and noisy, and changing fonts requires changing the wheel;
however, their output can be letter quality.
The floppy disk drive was invented in 1967 at IBM by Alan Shugart. The very
first disks were 8" in size. This evolved into the old ones which are 5-1/4's. These
5.25" drives are big and ugly. The disks that are used on these drives are compsed of a
recordable medium surrounded by a flexible plastic envelope. These disks are
bendable. The capacity of these disks is only 360K. Today, we laugh at a computer
that still has one of these things. Today, almost all computers have 3.5" drives, an
evolved version of the disk that comes in this smaller format and uses a less flexible
casing. These drives accept diskettes, little 3.5" disks. By the mid 1990's, the 5.25"
drives basically fell out of use totally. Only the very old PCs still have these things.
Internal Structure
The inside of a standard floppy drive has many similarities to the inside of a hard
drive. It has the same basic parts. Most floppy drives have two read/write heads,
meaning that it is double-sided. One head is used to read and write data to the diskette
while the other is used to erase a track before it is written to by the other head. Like a
hard drive, the head mechanism is moved by the head actuator. It is a stepper motor
design, much like the old hard drives. This little motor moves the heads in and out,
189
giving them the ability to position themselves over any track on the disk. The heads
use a recording method known as tunnel erasure. Basically, this recording method is a
way to keep each track of data separate from the others. As the head writes the data to
a track, the tunnel erase heads come along and erase the outer edges of the track,
thereby creating a sharp-edged track, very distinct from the others. This keeps the data
on one track from being confused with data from another track, thereby eliminating
problems.
The heads are spring loaded, therefore, they are physically contacting the disk while
they are reading and writing. There is a system of levers on the inside that control
whether or not the heads are allowed to touch the recording medium. The mechanical
frame is one system of levers that is changed when the protective window at the top of
the diskette is open/closed. When the window is closed, the heads are not permitted to
touch the medium. When the diskette is inserted into the floppy frive, the window
opens, thereby allowing the heads to make contact and data to be changed. Even when
inserted into the drive, though, a set of electronic optics checks for an opening in the
lower corner of the diskette. This opening us is controlled from the outside, and
controls whether or not the user wants to allow writing to the diskette.
The drive spins the disk at 300RPM or 360RPM, therefore this contact between the
heads and the recording medium is not a problem to the data because friction is
minimum. Some diskette makers coat the disk with Teflon, further reducing friction
between the heads and the disk. Although a good idea, eventually a build-up of Teflon
will form on the heads, requiring you to clean them. And, while mentioning this close
contact between the heads and the disk, I should mention that this is the reason why
you should be careful when handling diskettes. Dust, smoke, hair, and even
fingerprints are enough to disrupt the contact between the two.
The spindle motor spins the disk. As said before, it spins the disk at 300 RPM. On old
5.25" drives, the disk is spun at 360 RPM. Older drives had the spindle motor
attached to a belt system that spun the disks. These were not very reliable, and the
RPM was not constant depending on the disk. Today's drives use a direct-drive system
with no belts. This system has automatic torque compensation so that sticky disks are
spun with greater force than a slippery one, thereby maintaining a constant 300 RPM
with all disks. The newer drives have this automatic ability. The older ones require
periodic adjusting. This is done using little strobe marks that are on the motor. You
190
run the drive in fluorescent light and adjust the RPM until the marks look still, just
like a car rim or wagon wheel when turned fast enough.
Underneath the drive, you have the logic board. Like the hard drive, it serves to
control the internal parts of the drive and serves as an interface between these parts
and the floppy drive controller. All floppy drives use the SA-400 interface, the same
interface used for floppy drives for years. For this reason, any floppy drive will work
with any computer, right out of the box.
The front of the drive is called the faceplate. This is the part of the drive which
is visible from the front of the case. These faceplates come in several sizes and colors.
Some faceplates are larger than the rest of the drive, requiring you to install the drive
from the front, a habit you'll probably form anyway.
The connectors are on the back of the drive. There are two: the power connector and
the ribbon cable connector. All floppy drives use pretty much the same type of
connector. The only difference is that the large 5.25" drives use a larger power plug,
similar to the type used in the hard drive. If you are installing a 3.5" into an older
case, you might not have the small-type connector available. In this case, you will
have to buy an adapter to convert the large plug into the small type. The 3.5" drives
use a smaller plug. All floppy drives use the same type of 34-pin data cable.
Occasionally, you might find a floppy drive that has weird connections. Some drives
191
have one 40-pin connector that carries both the power and the data. Others use one
34-pin cable that carries both. However, these drive are rather rare, I've found. I
wouldn't mess with them anyway.
The Disk
A floppy disk is a lot like a cassette tape:
Both use a thin plastic base material coated with iron oxide. This
oxide is a ferromagnetic material, meaning that if you expose it
to a magnetic field it is permanently magnetized by the field.
Both can record information instantly.
Both can be erased and reused many times.
Both are very inexpensive and easy to use.
If you have ever used an audio cassette, you know that it has one big disadvantage --
it is a sequential device. The tape has a beginning and an end, and to move the tape to
another song later in the sequence of songs on the tape you have to use the fast
forward and rewind buttons to find the start of the song, since the tape heads are
stationary. For a long audio cassette tape it can take a minute or two to rewind the
whole tape, making it hard to find a song in the middle of the tape.
A floppy disk, like a cassette tape, is made from a thin piece of plastic coated with a
magnetic material on both sides. However, it is shaped like a disk rather than a long
thin ribbon. The tracks are arranged in concentric rings so that the software can jump
from "file 1" to "file 19" without having to fast forward through files 2-18. The
diskette spins like a record and the heads move to the correct track, providing what is
known as direct access storage.
192
In the illustration above, you can see how the disk is
divided into tracks (brown) and sectors (yellow).
The Drive
The major parts of a FDD include:
193
Circuit Board: Contains all of the electronics to handle the data
read from or written to the diskette. It also controls the stepper-
motor control circuits used to move the read/write heads to each
track, as well as the movement of the read/write heads toward the
diskette surface.
The read/write heads do not touch the diskette media when the heads are traveling
between tracks. Electronic optics check for the presence of an opening in the lower
corner of a 3.5-inch diskette (or a notch in the side of a 5.25-inch diskette) to see if the
user wants to prevent data from being written on it.
Look for the silver, sliding door opening up and the read/write heads being
lowered to the diskette surface.
194
SMPS (Switch Mode Power Supply)
195
The Mains voltage 230 Volt AC is rectified by bridge rectifier ,before that AC
noise is suppressed by Noise filter .
Often one of the biggest noise maker in a PC, the Power Supply Unit delivers
regulated DC voltages to various components. Computer PSUs are switching mode
types, which provide relatively high efficiency at low cost. They utilize forced air
cooling, usually an 80mm fan, and sometimes incorporate a second fan. The fan is the
primary source of noise in a PSU. Coils in a PSU can buzz and hum, especially when
pushed under high loads, but usually fan noise masks coil noise. Typically, the fan is
rated for higher than the maximum airflow needed to keep the PSU cool. It's cheap
engineering insurance for the manufacturer and also fulfills the case cooling role of
the PSU fan.
In the ATX case specification, cool air is drawn into a typical case from vents in the
front panel. The incoming air helps cool components as it moves through the case,
becoming warm in the process. It is evacuated through the PSU and out the rear by
the PSU fan. So the loud, fast fans do help to keep a case cooler. Manually varying a
high airflow PSU fan can cause CPU temperature to be affected as much as 5-6
degrees C.
196
The ATX specification was created some years ago at a time when desktop CPUs
generated no more than ~30W. Now, they are up over 130W. The airflow
arrangement of exhausting hot case air out through the PSU no longer makes as much
sense as it did in the past. The PSU has to handle both its own self-generated heat,
which is naturally higher than before, as well as the heat generated by the other
components.
Fast-spinning fans make a lot of noise, especially when confined in a small space
with nearby airflow obstructions. It is not unusual for the noise of a PSU to be 12-15
dB higher than the rated noise of its fan in free air. The noise is further exacerbated by
the way a PSU is mounted in a typical tower case: the typical 4~5 pound weight
"hangs" off the top of the back panel on 4 screws. In this mounting configuration,
excitation of case panel resonances by direct transfer of PSU fan vibrations is almost
unavoidable. The end result is more noise, especially as a droning type of hum in the
lower frequencies.
The quietest PSUs on our list (on page six if you want to jump straight there) feature
either no fan at all or a fan that spins at low speed under most conditions. Keep in
mind that components will tend to run a bit hotter than usual as a result of reduced
airflow. This can be a concern if the normal ambient room temperature is high or if
very hot components are used. The best fan-cooled models have low normal fan
speed, and allow the fan to ramp up to full speed only when really necessary.
197
There are many different motherboard/case form factors, such as Mini-ATX, LTX,
Flex-ATX, AT, Mini-ITX, etc. There are also many proprietary cases that don't
conform to any general form factor. ATX power supplies can often be used, but some
cases require different PSU form factors, such as STX for Flex-ATX cases. In time,
we will expand our list to include different form factor PSUs.
Intel's power department has been very busy in the last few years as rapid deloyment
of higher power and different form factor devices keep adding to the PC mix. They
have made frequent updates and additions their design guidelines for PSUs in the
ATX12V, SFX12V, TFX12V, LFX12V and CFX12V PSU Design Guides on their
site Desktop Form Factors. These guides are not standards that must be adhered to by
regulation, but specifications that almost every PSU maker in the industry follows
very closely in order to ensure compatibility between their products and new
motherboards, graphics cards and other peripherals.
Assembling a PC
Have you ever thought about building your own computer? Actually buying a
motherboard and a case along with all the supporting components and assembling the
whole thing yourself?
Here are three reasons why you might want to consider taking the plunge:
198
1. You will be able to create a custom machine that exactly matches your needs.
2. It will be much easier to upgrade your machine in the future because you will
understand it completely.
3. You may be able to save some money.
And, if you have never done it before, you will definitely learn a lot about computers.
n this article, we'll take you through the entire process of building a computer. You'll
learn how to choose the parts you will use, how to buy them and how to put them all
together. When you're done, you will have exactly the machine that you need. Let's
get started.
Decisions, Decisions
Let's imagine that you want to build a powerful video editing computer. You want it
to have a dual-core CPU, lots of RAM and a terabyte of disk space. You also want to
have FireWire connectors on the motherboard. These requirements are going to cause
you to look for a motherboard that supports:
199
FireWire connections (possibly in both the front and back of the case)
Then it all needs to go in a case with enough space to hold multiple hard disks and
enough air flow to keep everything cool.
The Motherboard
Choosing a motherboard is the most interesting part of any building project. The
reason it is so interesting is because there are hundreds of motherboards to choose
from and each has its own advantages and disadvantages.
One easy way to think about motherboards is to break them up into a few categories.
For example:
200
A middle-of-the-road motherboard
You need to decide whether you are building a "cheap machine," a "high-end
machine" or a "tricked-out super machine" and then choose your motherboard
accordingly. Here are some other decisions that help narrow down your motherboard
choices:
Do you want to use an Intel
or an AMD processor?
Making this choice will cut
the number of motherboards
in half. AMD chips are often
cheaper, but lots of people
are die-hard Intel fans.
What size motherboard do
you want to use? If you are Image courtesy Intel Corporation
201
Do you want an AGP or PCI Express graphics card? Or do you want to use a
graphics card on the motherboard to keep the price and size down? If you want
to go the cheapest route, make sure the motherboard includes a video card on-
board (easiest way to tell is to see if there is a DVI or VGA connector on the
motherboard). PCI Express is the latest/greatest thing, but if you want to re-
use an AGP card you already own, that might be a reason to go with AGP.
Do you want to use PATA (aka IDE) or SATA hard disks? SATA is the latest
thing, and the cables are much smaller.
What pin configuration are you using for the CPU? If you want to use the
latest CPUs, make sure that your motherboard will accept them.
Do you want to try things like dual video cards or special high-speed RAM
configurations? If so, make sure the motherboard supports it.
If you don't care about any of this stuff (or if it all sounds like gibberish to you), then
you're probably interested in building a cheap machine. In that case, find an
inexpensive motherboard/CPU combo kit and don't worry about all of these details
Building
But before we start building, we need to say one thing about static electricity. Most
of the parts you will be handling when you assemble your computer are highly
sensitive to static shocks. What that means is that if you build up static electricity on
your body and a shock passes from your body to something like a CPU chip, that
CPU chip is dead. You will have to buy another one.
The way you eliminate static electricity is by grounding yourself. There are lots of
ways to ground yourself, but probably the easiest is to wear a grounding bracelet on
your wrist. Then you connect the bracelet to something grounded (like a copper pipe
or the center screw on a wall outlet's face plate). By connecting yourself to ground,
you eliminate the possibility of static shock.
Each combination of parts is unique. But in general, here are the basic steps you will
need to follow when you assemble your machine.
Installing the Microprocessor and RAM
First, you'll need to unwrap the motherboard and the microprocessor chip. The chip
will have one marked corner that aligns with another marked corner of its socket on
the motherboard. Align the corners and drop the microprocessor into the socket. You
202
don't need to apply any pressure - if it's aligned correctly, it should fall into place.
Once you have it in, cinch it down with the lever arm.
Now, you need to install the heat sink. The CPU box will contain a manual that tells
you how to do it. The heat sink will contain either a heat sink sticker or heat sink
grease to use when mounting the heat sink on the CPU. Follow the instructions
closely to install it. To install our heat sink, all we had to do was put it in place, cinch
it down with flanges on either side and lock it with a cam. Connect the power lead for
the heat sink to the motherboard.
Next, you'll install the RAM. Look on the motherboard for the slot marked "one" and
firmly press the RAM module into it. It will probably take more pressure than you'd
think to get the RAM into place. Each side of the module should also have a rotating
arm that will lock the RAM down.
203
snugly. Be very careful when putting in the screws. If you drop them into the case,
they could damage the fine wires on the motherboard.
Now you can install the power supply in the case if it's not already installed. The
power supply has two sides. The fan side faces outside the case and the wire side
faces inside. Slide the power supply onto its brackets and secure it with screws (the
case or the power supply should have come with them).
Connect the power leads to the motherboard. There should be a large one and a small
one, and it will be obvious as to where each one goes.
You'll be left with about 15 more wires. Don't worry -- the manual has a page to tell
you exactly where each one goes. Each of them has a label that corresponds to a label
on the correct port.
204
"1." Insert the other end of the cable on the back of the drive. Now the drive is ready
to go.
Install the CD-ROM drive next. Again, set the jumpers correctly. The drive fits in the
front of the case, and you may have to pop out a faceplate to make room for it. Slide it
in and screw it into place, making sure that it's aligned with the front of the case. Just
as with the hard drive, you can use any available connector from the power supply.
You'll also use the cable that came with the CD-ROM drive to connect it to the
motherboard (align the red stripe for "pin 1") and plug the other end into the drive.
Connect the audio for the CD drive. Again, there's an obvious place for it to plug in
on the motherboard and on the drive itself.
205
that the power supply is set correctly to 110 or 220 volts (some power supplies do this
automatically, others have a switch or a slider).
Then push the power switch on the front of the case. In the ideal case, four things will
happen:
You will see/hear the fans spin up
You will hear the hard disk spin up.
Lights will light on the case.
You will see something happening on the monitor to indicate that the motherboard is
alive.
If you see/hear all of that happening, you are successful. You have created a working
machine. Using the manual that came with the motherboard you can enter the BIOS
screens and make sure everything looks OK. Chances are you will need to set the
machine's date/time, but that is probably all you have to do. Everything else is
probably automatic. All the drives will be recognized and auto-configured. The
default settings on the motherboard will be fine.
The next step is to install the operating system. And presto, you have a working
machine of your own creation. Congratulations!
Troubleshooting
What if you put it all together and it doesn't work? This is the one possible downside
of building your own machine. It is hard to describe the feeling you get when you try
turning on the machine and nothing happens. You have put in several hours of work
and a significant amount of cash, so it's discouraging to get no response.
All is not lost, however. Here are several items to check:
Is the power supply firmly plugged in and turned on (many power supplies have a
small switch on the back)? Try a different outlet.
Did you plug the power supply into the motherboard? Look at the manual for details.
206
Make sure that your motherboard is connected to the
power supply.
Is the case's power switch properly connected to the motherboard? If you have
plugged the switch into the wrong pins on the motherboard, it will not work. Check
the motherboard manual.
Are the drives connected to the motherboard properly? Do they have power?
Unseat and reseat the video card. If the motherboard has onboard video, try to remove
the video card completely and boot using the onboard version. If you have checked all
of that and nothing continues to happen, it could mean: The power supply is bad The
switch on the case doesn't work. We actually had this happen once on a machine we
built .Something is wrong with the motherboard or the CPU. The easiest way to
determine where the problem lies is to swap parts. Try a different power supply. Swap
a different motherboard into the case. Play around with different combinations. If it is
still not working, then you have a few options at this point. You can go back to the
shop that sold you the parts. If you bought them from a small local shop, they can
help you debug the problem (although it may cost you). If they sold you a bad
motherboard (rare, but possible) they will usually help you out. You can also try to
find a more experienced builder who would be willing to help you. There is a rational
cause for the problem you are experiencing -- either a bad part or a bad connection
somewhere -- and you will find it. Now that you've seen how simple it is to build your
own computer, we hope that you'll give it a shot. You'll have a computer that you
understand completely and will be easy to upgrade. You can save money, and it's a lot
of fun too. So the next time you need a new computer, consider building it yourself!
207
MS-DOS Basics
When you first turn on your computer, you will see some cryptic
information flash by. MS-DOS displays this information to let you
know how it is configuring your computer. You can ignore it for now.
When the information stops scrolling past, you'll see the following:
C:\>
208
If your command prompt does not look like the example, type the
following at the command prompt, and then press ENTER:
cd \
Note that the slash leans backward, not forward. You will learn more
about the cd command later in the tutorial. If your command prompt
still doesn't look like the example, type the following at the command
prompt, and then press ENTER:
prompt $p$g
Typing a Command
1. Type the following at the command prompt (you can type the
command in either uppercase or lowercase letters):
nul
2. Press ENTER.
The "Bad command or file name" message appears when you type
something that MS-DOS does not recognize. Because nul is not a valid
MS-DOS command, MS-DOS displays the "Bad command or file
name" message.
209
3. Now, type the following command at the command prompt:
ver
Continue to the next section, where you will use the dir command to
view the contents of a directory.
In this section, you will view the contents of a directory by using the
dir command. The dir command stands for "directory."
dir
210
of your drive. All the files and directories on your drive are
stored in the root directory.
Changing Directories
Look at the list on your screen. All the names that have <DIR>
beside them are directories. You can see a list of the files in
another directory by changing to that directory, and then using
the dir command again. In this case, you will change to the
DOS directory.
Before you begin this section, make sure you have a directory
named DOS by carrying out the following procedure.
1. Look through the directory list on your screen for a line that
looks similar to the following:
2. If you see a line like this, you have a directory named DOS.
Skip to the next procedure, "To change from the root directory
to the DOS directory."
If you do not see a line in the directory list indicating that you
have a directory named DOS, type the following at the
command prompt:
dir /s memmaker.exe
Directory of C:\DIRNAME
211
If the name that appears in place of DIRNAME is DOS, you
have a DOS directory. Skip to the next procedure.
cd dos
C:\DOS>
The command prompt shows which directory you are in. In this case,
you know you successfully changed to the DOS directory because the
command prompt displays the directory's name. Now the current
directory is DOS.
Next, you will use the dir command to view a list of the files in the
DOS directory.
dir
212
A list of the files in the DOS directory appears, but scrolls by too
quickly to read. You can modify the dir command so that it displays
only one screen of information at a time.
dir /p
When you typed the dir command this time, you included the /p
switch after the command. A switch modifies the way MS-DOS carries
out a command. Generally, a switch consists of a forward slash (/) that
is followed by one or more letters or numbers. When you used the /p
switch with the dir command, you specified that MS-DOS should
pause after it displays each screen of directory list information. The p
actually stands for "page"
Another helpful switch you can use with the dir command is the /w
switch. The /w switch indicates that MS-DOS should show a wide
version of the directory list.
dir /w
213
The directory list appears, with the filenames listed in wide format.
Note that only filenames are listed. No information about the files' size
or date and time of creation appears.
2. If the directory contains more files than will fit on one screen, you can
combine the /p and /w switches as follows:
dir /w /p
Next, you will change from the DOS directory to the root
directory. The root directory is the directory you were in before
you changed to the DOS directory. Before you begin this
section, make sure your command prompt looks like the
following:
C:\DOS>
cd \
Note that the slash you type in this command is a backslash (\),
not a forward slash (/).
C:\>
214
Creating a Directory
C:\>
md fruit
dir
or
dir /p
215
cd fruit
C:\FRUIT>
You will now create a directory within the FRUIT directory, named
GRAPES.
md grapes
You will not see the new GRAPES directory until you carry out the dir
command in the next step.
dir
216
The GRAPES directory is a subdirectory of the FRUIT directory. A
subdirectory is a directory within another directory. Subdirectories are
useful if you want to further subdivide information.
cd grapes
C:\FRUIT\GRAPES>
cd ..
C:\FRUIT>
Deleting a Directory
C:\FRUIT>
217
To delete a directory, use the rd command. The rd command
stands for "remove directory."
rd grapes
dir
Note You cannot delete a directory if you are in it. Before you
can delete a directory, you must make the directory that is one
level higher the current directory. To do this, type cd.. at the
command prompt.
Changing Drives
So far, you have been working with drive C. You have other
drives you can use to store information. For example, drive A is
your first floppy disk drive. The files and directories on drive A
are located on the floppy disk in the drive. (You might also
have a drive B, which contains the files and directories stored
on the floppy disk in that drive.)
218
C:\FRUIT>
1. Insert a 3.5" floppy disk in drive A label- side up. Make sure
the disk clicks into the drive.
a:
A:\>
If you see this message, the disk may not be inserted properly. Place
the disk label-side up in the disk drive, and make sure the disk clicks
into the disk drive. Then, type r for Retry. If this message appears
again, press F for Fail, and then type b: at the command prompt. If you
no longer see this message, type b: instead of a: throughout the rest of
the tutorial.
There must be a floppy disk in the drive that you want to change to.
2. To view a list of the files on the floppy disk in drive A, type the
following at the command prompt:
dir
219
c:
C:\FRUIT>
When you type a drive letter followed by a colon, you change to that
drive. The drive letter that appears in the command prompt shows
which drive is the current drive. Unless you specify otherwise, any
commands you type are carried out on the current drive and in the
current directory.
So far, all the commands you typed were carried out on the current
drive and in the current directory. You can also carry out a command
on a drive that isn't current. For example, you can view the files on a
disk in drive A without switching to drive A by following this
procedure.
dir a:
220
o To view the contents of the DOS directory on drive C
dir c:\dos
A list of the files in the DOS directory on drive C should scroll past on
your screen.
The c:\dos parameter specifies that you want MS-DOS to display the
contents of the DOS directory on drive C, even though your command
prompt indicates that the FRUIT directory is current.
Copying Files
This section describes how to copy a single file and a group of files.
Copying files creates a duplicate of the original file and does not
remove the original file. This is useful for many reasons. For example,
if you want to work on a document at home, you can copy it from your
computer at work to a floppy disk and then take the floppy disk home.
To copy a file, you will use the copy command. When you use the
copy command, you must include two parameters. The first is the
location and name of the file you want to copy, or the source. The
second is the location to which you want to copy the file, or the
destination. You separate the source and destination with a space. The
copy command follows this pattern:
In this section, you will copy the EDIT.HLP and EDIT.COM files from the
DOS directory to the FRUIT directory. You will specify the source and
destination of these files in two different ways. The difference between the
two methods is explained at the end of this section.
221
Before you begin this section, make sure the command prompt looks like the
following:
C:\FRUIT>
To copy the EDIT.HLP and EDIT.COM files from the DOS directory to the
FRUIT directory
1. Return to the root directory by typing the following at the command prompt:
cd\
C:\>
Change to the DOS directory by typing the following at the command prompt:
cd dos
C:\DOS>
2. Make sure the file you are going to copy, EDIT.COM, is located in the DOS
directory by using the dir command followed by a filename. To see if the
EDIT.COM file is in the DOS directory, type the following at the command
prompt:
dir edit.com
Directory of C:\DOS
222
1 file(s) 413 bytes 11999232 bytes free
This shows that the EDIT.COM file is located in the DOS directory. You just
specified another parameter with the dir command, one that directs MS-DOS
to list only the files that match the filename you specified in the command.
Since only one file in the DOS directory can be named EDIT.COM, the
directory list includes only that file.
3. To copy the EDIT.COM file from the DOS directory to the FRUIT directory,
type the following at the command prompt:
1 file(s) copied
The command you just typed copied the file from its source to its destination.
By specifying C:\DOS\EDIT.COM as the source, you indicated that MS-DOS
would find the source file EDIT.COM on drive C in the DOS directory. By
specifying C:\FRUIT as the destination, you indicated that MS-DOS should
place the copy of EDIT.COM on drive C in the FRUIT directory.
4. Next, you will copy the EDIT.HLP file to the FRUIT directory. To confirm
that the EDIT.HLP file is in the DOS directory, type the following at the
command prompt:
dir edit.hlp
5. To copy the EDIT.HLP file from the DOS directory to the FRUIT directory,
type the following at the command prompt:
1 file(s) copied
223
If you forgot to leave a space before typing fruit, the following message will
appear:
Access denied
If this message appears, type the command again and leave a space before
fruit.
6. To confirm that you copied the files successfully, view the contents of the
FRUIT directory by typing the following at the command prompt:
dir \fruit
You should see the two files listed in the FRUIT directory.
Note that you specified the source and destination in the two copy commands
differently. In the command you typed in step 4, you specified the source file as
C:\DOS\EDIT.COM and the destination directory as C:\FRUIT. Both
C:\DOS\EDIT.COM and C:\FRUIT are called full paths because you specified the
drive and directory where these files are located. Specifying the full path is the safest
way to copy files, because you provide all the information about which file you want
to copy and which directory you want to copy it to.
In the copy command you typed in step 6, you specified EDIT.HLP for the source file
and FRUIT for the destination directory. These are relative paths. A relative path
specifies only the difference between the current drive and directory and the
destination of the files you are copying. The following illustration shows how the
DOS directory and the FRUIT directory are related:
224
When you typed the second copy command, you specified the source filename as
EDIT.HLP instead of C:\DOS\EDIT.HLP. This is because drive C is the current drive,
so you did not have to repeat C: in the path. The DOS directory is the current
directory, so you did not have to repeat DOS in the path. You had to specify only the
filename.
For the destination directory, you specified the relative path as FRUIT instead of
C:\FRUIT. Again, you did not need to specify drive C, because drive C is current.
However, the FRUIT directory is not current. To access the FRUIT directory from the
current directory, DOS, MS-DOS must first return to the root directory (), and then
switch to the FRUIT directory, before copying the file to its new location. Therefore,
you typed the path MS-DOS must take to switch between the current directory and the
FRUIT directory, or \FRUIT.
In this section, you will use wildcards to copy a group of files from the DOS directory
to the FRUIT directory. In a card game, a wildcard matches any card in the deck. In
MS-DOS, the asterisk (*) wildcard matches any character in that position and all the
other positions that follow it. If you want to copy a group of files with similar names,
using wildcards is easier than copying each file individually.
In this section, you will first view a group of files by using wildcards, and then copy
the files using wildcards. Before you begin this section, make sure your command
prompt looks like the following:
C:\DOS>
To list all files ending with the extension TXT and copy them from the DOS directory
to the FRUIT directory by using wildcards
1. View all the files in the DOS directory that end with the extension TXT by
typing the following at the command prompt:
dir *.txt
225
Note that there is a space before the asterisk (*), but not after it.
This command directs MS-DOS to list all files and subdirectories in the
current directory that end with the extension JXT. The asterisk matches the
first character of the filename and all other characters that follow it, up to the
period () that separates the name from the TXT extension. A list similar to the
following appears:
MS-DOS lists all the files that end with a TXT extension. The wildcard in
your command specified that MS-DOS should ignore the very different
beginnings of the files and focus only on the extensions.
Next, you will copy all the files with a TXT extension to the FRUIT directory
by using wildcards.
2. To copy the files with a TXT extension to the FRUIT directory, type the
following at the command prompt:
This command copies all the files that have the TXT extension from the
current directory (DOS) to the FRUIT directory.
3. To confirm that you copied the files successfully, change to the FRUIT
directory by typing the following at the command prompt:
cd \fruit
226
4. To view a list of all the files in the FRUIT directory, type the following at the
command prompt:
dir
40652800
bytes free
The EDIT.COM and EDIT.HLP files are the files you copied by following the
procedure in the previous section. The files with TXT extensions are the ones you just
copied by using wildcards.
Renaming Files
This section explains how to rename files. You may want to rename a file if the
information in it changes or if you decide you prefer another name.
To rename a file, you will use the ren command. The ren command stands for
"rename." When you use the ren command, you must include two parameters.
227
The first is the file you want to rename, and the second is the new name for the file.
You separate the two names with a space. The ren command follows this pattern:
Renaming a File
Before you begin this section, make sure your command prompt looks like the
following:
C:\FRUIT>
2. To confirm that you renamed the file successfully, type the following at the
command prompt:
dir
The name PEACH.TXT should appear instead of the name README.TXT. It is the
same file, but now has a different name.
You also can use wildcards to rename a group of files. If you want to rename a group
of files that have similar names, using wildcards is easier than renaming the files
individually. In this section, you will rename a group of files by using wildcards.
Before beginning this section, make sure your command prompt looks like the
following:
C:\FRUIT>
To rename the files whose names begin with EDIT by using wildcards
228
1. List the files in the FRUIT directory that begin with EDIT by typing the
following at the command prompt:
dir edit.*
A list of the files in the FRUIT directory that begin with EDIT appears.
2. To rename the files that begin with EDIT to the new name PEAR, type the
following command:
This command specifies that all the files that begin with EDIT should be
renamed PEAR, but should keep their original extensions.
3. To confirm that you renamed the files successfully, type the following at the
command prompt:
dir pear.*
When the files were renamed, their extensions remained the same. For
example, EDIT.COM became PEAR.COM, and EDIT.HLP became
PEAR.HLP.
You can also rename extensions this way. For example, suppose you want to
indicate that a group of files ending with a TXT extension are old. You can
use wildcards to rename the files so they have the extension OLD.
To rename all the files in the current directory whose names end with the
extension.TXT
1. View a list of all the files in the current directory with the extension TXT by
typing the following command:
dir *.txt
2. To rename all files in the current directory that end with the extension TXT to
end with the extension OLD, type the following command:
229
ren *.txt *.old
3. To confirm that you renamed the files successfully, type the following at the
command prompt:
dir
The files that had the extension TXT now have the extension OLD.
Deleting Files
This section explains how to delete, or remove, a file that you no longer want on your
disk. If you don‘t have very much disk space, deleting files you no longer use is
essential.
To delete a file, you will use the del command. The del command stands for "delete."
Deleting a File
In this section, you will delete two files using the del command.
Before you begin, make sure your command prompt looks like the following:
C:\FRUIT>
1. Delete the PEAR.COM file by typing the following at the command prompt:
del pear.com
2. Delete the PEAR.HLP file by typing the following at the command prompt:
del pear.hlp
3. To confirm that you deleted the files successfully, type the following at the
command prompt:
dir
230
The PEAR.COM and PEAR.HLP files should no longer appear in the list.
Before you begin this section, make sure your command prompt looks like the
following:
C:\FRUIT>
To delete files in the current directory that end with the extension OLD by using
wildcards
1. View all files that end with the extension OLD by typing the following at the
command prompt:
dir *.old
A list of all the files that end with the extension OLD appears. Make sure that
these are the files you want to delete. When you are deleting files by using
wildcards, this step is very important. It will prevent you from deleting files
accidentally.
2. Delete all files ending with OLD by typing the following at the command
prompt:
del *.old
3. To confirm that all the files with the extension OLD have been deleted, type
the following at the command prompt:
dir
Now that the FRUIT directory is empty, you can delete it by using the rd (remove
directory) command that you learned to use in "Deleting a Directory" earlier in this
chapter.
231
To delete the FRUIT directory
1. Return to the root directory by typing the following at the command prompt:
cd \
2. You can see the FRUIT directory in the directory list by typing the following
at the command prompt:
dir or dir /p
3. Remove the FRUIT directory by typing the following at the command prompt:
rd fruit
4. To verify that the FRUIT directory has been removed, type the following at
the command prompt:
dir or dir /p
When you purchase new floppy disks, you may be required to format them before you
can use them. Practice formatting a floppy disk now.
Caution The data on the disk you format will be erased, so make sure you select a disk
that does not contain information you may need later.
format a:
This command specifies that you want to format the disk in drive A. When
you press ENTER, the following message appears:
232
and press ENTER when ready ...
2. Insert the disk you want to format in drive A label-side up. Then close the
drive door or make sure the disk clicks into the drive. When you are ready,
press ENTER. The following message appears:
As it formats the disk, MS-DOS displays the percentage of the disk that has
been formatted. When the format is complete, the following message appears:
3. A volume label is a name for your disk. You can give your disk any name
you like, as long as it has 11 or fewer characters. For this exercise, type
practice and then press ENTER. Information similar to the following appears:
233
What is a boot disk?
A boot disk will allow you to boot off of a diskette instead of your hard drive. This
diskette can be used to fix issues that may arise during the lifetime of your computer
and/or to help load older MS-DOS games.
Tip: After you have created a boot diskette, it is highly recommended that you write-
protect the diskette to prevent possible computer virus infection and to help the
diskette from being erased.
cd\dos
Note: These steps are for users who have Windows 3.x installed on the computer.
To create a Windows 3.x diskette, from Windows Program manager, click File and
then choose the option to Exit Windows, which will get you to a prompt; at the
prompt, type:
cd\dos
Note: These steps are for users who have Windows 95 installed on the computer.
234
In Windows 95, Microsoft has created a new method of creating a bootable recovery
diskette. Unfortunately, however, this diskette does not support CD-ROM support and
is missing a few recommended files. To do this, click Start / Settings / Control Panel /
double-click the Add Remove programs icon / click the Startup Disk and create disk.
cd\windows\command
Note: These steps are for users who have Windows 98 or Windows ME installed on
the computer.
An excellent feature of Windows 98/ME is its boot diskette. Using Windows to create
you a Windows 98 boot diskette will give you all the needed files as well as CD-ROM
support. To create a Windows 98 boot diskette, click Start / Settings / Control Panel /
double-click the Add Remove programs icon / click the Startup Disk and create disk.
cd\windows\command
NOTE: When making a boot disk, if you are running "Stacker" or some kind of a
DoubleSpace or drive swapper program, this could not work
Once you are in DOS and at the correct directory as instructed in the above sections
by operating system, you are ready to create your bootable diskette. Insert a diskette
that does not contain any information (it will be erased).
235
At the prompt, if you have MS-DOS 6.2 / Windows 3.x / Windows 95 / Windows 98,
type:
FORMAT A:/S
If you have MS-DOS 5.0 type using double density 5.25" diskettes type:
FORMAT A: /360 /S
If you have MS- DOS 3.11 through 4.0 using double density 5.25" diskettes,
type:
FORMAT A: /4 /S
Once the diskette has been formatted and the system has been transferred,
you should be returned to your original directory. In this directory, type:
If you are planning to use this diskette as a diskette to load games or you
feel that you need mouse support, you will need to copy the mouse driver
onto the boot diskette. The MS-DOS mouse driver is generally mouse.com /
mouse.sys. Locate this file and copy it to your bootable diskette.
For CD-ROM support, visit our CD-ROM drivers page for information on
loading your CD-ROM driver.
Once you have copied the above files, create an autoexec.bat and a
config.sys. Get to the floppy drive by typing A:, once at the floppy drive,
type:
236
copy con autoexec.bat [PRESS ENTER]
@echo off [PRESS ENTER]
LH A:\MSCDEX.EXE /D:CDROM [PRESS ENTER] (this line is used for your CD-
ROM drive).
LH A:\MOUSE.* [PRESS ENTER] (skip line if you did not copy mouse file, the
* is either sys / com).
Press and hold CTRL + Z - this should return ^Z. Once this is displayed,
press enter to copy the file.
Press and hold CTRL + Z - this should return ^Z. Once this is displayed,
press enter to copy the file.
Congratulations, after completing the above steps you should now have a
bootable floppy diskette.
Format the floppy diskette you wish to make a bootable Windows NT boot
disk using the Windows NT machine.
Copy boot.ini, ntdetect.com and ntldr to the floppy diskette just formatted.
If you are using any SCSI devices that you need access to, you will also need
to load these drivers onto the diskette
237
Creating a Windows 2000 boot disk
To create a Windows 2000 Professional bootable diskette you will need four
1.44MB diskettes and the Windows 2000 Professional CD.
Users can also easily create an Emergency Repair Disk by clicking Start,
Programs, Accessories, System Tools, and opening Backup. From the Backup
window, click the button for Emergency Repair Disk and follow each of the
steps.
When formatting a floppy diskette, users have the option of creating a MS-
DOS startup disk, follow the below steps to do this.
238
How to use a boot diskette
Once the bootable diskette has been successfully created, following the
below steps you will be able to boot from the diskette.
1. Place the diskette into write-protect mode (in case a virus is on the
computer, this will not allow the virus to transfer itself onto the
diskette).
2. Insert the diskette into the computer and reset or turn on the
computer to begin the boot process.
3. As the computer is booting, answer the questions prompted (if any).
4. Once at the A:\> take the appropriate actions depending upon the
situation of the computer.
5. If you are unfamiliar with MS-DOS we recommend you see our MS-DOS
page.
I won't go into that part right now but here are some of the most important things
you should take into consideration when planning for your XP installation:
After you made sure you can go on, start the installation process.
239
Step #2: Beginning the installation process
You can install Windows XP in several methods - all are valid and good, it all
depends upon your needs and your limitations.
It doesn't matter how you run the setup process, but the moment it runs - all
setup methods look alike.
240
2. You can press F6 if you need to install additional SCSI adapters or other
mass-storage devices. If you do you will be asked to supply a floppy disk
with the drivers and you CANNOT browse it (or a CD for that matter).
Make sure you have one handy.
3. If you want, you can press F2 to run the ASR sequence. For that you
need a good backup created by the Windows XP backup program, and
the ASR floppy disk. If you plan to install a new copy of XP - don't do
anything.
6. Read and accept the licensing agreement and press F8 if you accept it.
241
7. Select or create the partition on which you will install Windows XP
Professional. Depending upon your existing disk configuration choose
one of the following:
If the hard disk is unpartitioned, you can create and size the partition on
which you will install Windows XP Professional.
If the hard disk is already partitioned, but has enough unpartitioned disk
space, you can create an additional partition in the unpartitioned space.
If the hard disk already has a partition that is large enough, you can
install Windows XP Professional on that partition. If the partition has an
existing operating system, you will overwrite that operating system if you
accept the default installation path. However, files other than the
operating system files, such as program files and data files, will not be
overwritten.
If the hard disk has an existing partition, you can delete it to create more
unpartitioned space for the new partition. Deleting an existing partition
erases all data on that partition.
If you select a new partition during Setup, create and size only the partition on
which you will install Windows XP Professional. After installation, use Disk
Management to partition the remaining space on the hard disk.
8. Select a file system for the installation partition. After you create the
partition on which you will install Windows XP Professional, you can
use Setup to select the file system with which to format the partition.
Windows XP Professional supports the NTFS file system in addition to
the file allocation table (FAT) and FAT32 file systems. Windows Server
2003, Windows XP Professional, Windows 2000, and Windows NT are
242
the only Microsoft operating systems that you can use to gain access to
data on a local hard disk that is formatted with NTFS. If you plan to gain
access to files that are on a local Windows XP Professional partition with
the Microsoft Windows 95 or Windows 98 operating systems, you should
format the partition with a FAT or FAT32 file system. We will use
NTFS.
9. Setup will then begin copying necessary files from the installation point
(CD, local I386 or network share).
10. Note: If you began the installation process from an MS-DOS floppy,
make sure you have and run SMARTDRV from the floppy, otherwise the
copying process will probably last more than an hour, perhaps even
more. With SMARTDRV (or if setup was run by booting from CD) the
copying will probably last a few minutes, no more than 5 max.
11. The computer will restart in graphical mode, and the installation will
continue.
243
It will then begin to load device drivers based upon what it finds on your
computer. You don't need to do anything at this stage.
If you do need to make changes press Customize and add your System Locale
etc.
Note for Hebrew users: Unlike W2K, it is SAFE and it is OK for you to install
Hebrew language support at this phase.
244
A warning message will appear. Press Ok.
Setup will copy the necessary files from the installation point.
You can now go to the Regional Options tab and select Israel in the Location
drop-down list, and Hebrew in the Standards and Formats drop-down list. Click
Ok.
245
4. Type the computer name and a password for the local Administrator
account. The local Administrator account resides in the SAM of the
computer, not in Active Directory. If you will be installing in a domain,
you need either a pre-assigned computer name for which a domain
account has been created, or the right to create a computer account within
the domain.
After a few seconds you will receive the Networking Settings window. BTW, if
you have a NIC that is not in the HCL and XP cannot detect it, or if you don't
have a NIC at all, setup will skip this step and you will immediately go to the
final phase of the setup process.
Press Next to accept the Typical settings option if you have one of the following
situations:
246
You have a computer running Internet Connection Sharing (ICS).
You're in a workgroup environment and do not plan to have any other
servers or Active Directory at all, and all other workgroup members are
configured in the same manner.
Otherwise select Custom Settings and press Next to customize your network
settings.
7. One thing you CAN do (you don't have to do it, it's your call - read more
about it on the Increase Internet Connection Speed in Windows XP page)
is to uninstall the Qos Packet Scheduler. Click it and press the Uninstall
button. If you want to keep it you can simply remove the mark from the
QoS check-box. In anyway you can later install or uninstall it if you
want.
Keep the TCP/IP, Client for Microsoft Networks and the File and Print Sharing
options selected.
247
In the General tab enter the required information. You must specify the IP
address of the computer, and if you don't know what the Subnet Mask entry
should be - you can simply place your mouse pointer over the empty area in the
Subnet Mask box and click it. The OS will automatically select the value it
thinks is good for the IP address you provided.
If you don't know what these values mean, or if you don't know what to write in
them, press cancel and select the Typical Settings option. You can easily change
these values later.
248
If you want to join a domain (NT 4.0 domain of W2K/2003 Active Directory
domain) enter the domain's name in the "Yes, make this computer a member of
the following domain" box.
and
or
Also, you need to have connectivity to the domain's domain controllers (only to
the PDC if on an NT 4.0 domain) and a fully functional DNS server (only in AD
domains). Read the Joining a Domain in Windows XP Pro and Requirements
when Joining a Domain pages for more on this issue.
Enter the Active Directory domain name (in the form of xxx.yyy, for example:
DPETRI.NET) or the NetBIOS name of the NT 4.0 domain (in the form of xxx,
for example: DPETRI). Press Next.
Note: If you provide a wrong domain name or do not have the correct
connectivity to the domain's DNS server you will get an error message.
249
A username/password window will appear. Enter the name and password of the
domain's administrator (or your own if you're the administrator on the target
domain).
Note: Providing a wrong username or password will cause this phase to fail.
10. Next the setup process will finish copying files and configuring the setup.
You do not need to do anything.
11. After the copying and configuring phase is finished, if XP finds that you
have a badly configured screen resolution it will advise you to change it
and ask you if you see the new settings right.
13. A Welcome screen is the first thing you see. The computer checks your
Internet connectivity (required for the mandatory Activation and
voluntary Registration processes).
250
You will be asked to register your copy of XP. You can decline if you want.
14. XP will ask you for the default username that will log onto this computer.
You can enter as many as 5 users, but you can create more after the
installation is finished.
BTW, the Administrator is not shown as a valid logon option (read more about it
on the Add the Administrator's Account to the Welcome Screen in XP Pro page).
251
You must have a second hard disk or partition formatted for FAT16/32 in order
to be able to install Windows 98/Me.
I recommend the use of a Windows 98 Startup disk for this procedure. You
should ensure that DEBUG.EXE is on your Startup disk. On a 98 Startup disk,
created from Add/Remove Programs, its in the EBD.CAB file on the Startup
disk. For a 98 Startup disk created from FAT32EBD.EXE its on the floppy
Installing Windows 98
L 100 2 0 1
N C:\BOOTSECT.DOS
R BX
0
R CX
200
W
Q
252
4. Boot the computer with the Win98 Startup Disk and at the A: prompt
type
DEBUG <READ.SCR
Steps 1 - 4 create the BOOTSECT.DOS file needed to boot Win98. You may
need to use the ATTRIB C:\BOOTSECT.DOS -S -H -R command if
BOOTSECT.DOS already exists and you get an error when trying to recreate it.
5. Configure your computer to boot from the CD drive. This is done in the
BIOS, or your computer may offer the option at startup if it detects a
bootable CD. If your computer does not support booting from CD-Rom,
you should also be able to boot with a 98 Startup disk, and run
WINNT.EXE from the I386 folder of your XP CD.
6. Insert your XP CD and boot from it.
7. You'll see some files being copied, then you'll be presented with a choice
of installing or repairing an existing installation. Choose Repair.
8. You'll be asked which XP installation you want to log into. Enter 1.
There is usually only one installation.
9. You'll be prompted for the Administrator password. For Home, the
default password is blank, so just hit Enter. For Pro, enter the same
password you did during setup for the Administrator account (this is not
the same as the password for an Admin level account. It must be the
Administrator account password).
10. At the C:\Windows prompt, type FIXBOOT. You'll be prompted to
confirm. Do so.
11. When FIXBOOT is finished, remove the XP CD and type EXIT and the
machine will reboot.
12. Reconfigure your computer to boot from the hard drive if necessary.
You will now get the XP Boot loader with your choice of operating system.
253
Desktop Disaster Recovery
How you deal with things when they go wrong is how you pave the way to
make things go right. This holds true whether it's a desktop machine or a server that's
crashed, but I think that desktops need their own brand of attention.
Here are five best practices for dealing with a problem on the desktop.
Make sure you keep the user informed about how repairs are going, even if you don't
know everything yourself. If the user has data on the machine that's in danger of loss,
pull that out first before doing anything else.
The reasons for disaster also fall into roughly three categories. They are:
1. Hardware failure. The system's hard drive or other components have failed,
possibly triggering one of the other symptoms described here.
2. Malicious behavior. Viruses, malware or even sabotage can cause things to
go awry.
254
3. User error. Everyone makes mistakes, although some of them are more fatal
than others.
Also remember that most of what you see may only be symptoms of the real problem.
For instance, if an application crashes repeatedly despite being reinstalled, the
problem may be a corrupted user profile that's damaging the application's local data,
not the application itself. Try creating a new user account on that computer and
running the program there (and then deleting the old user profile after migrating all
the needed data). This will be far less of a hassle than re-imaging the machine from
scratch -- which, yes, might fix the problem now but wouldn't tell you why it
happened, or how to avoid it later.
While this can be done with the Windows Recovery Console, it's extremely limited,
and often ornery to work with. The Ultimate Boot CD, for instance, is an excellent
Linux-based recovery CD; there's a Windows version available as well, but it requires
a separately-licensed copy of Windows to work.
Click here to read my tip on the Ultimate Boot CD. You may also be interested in the
tip, No separate license required for this Ultimate Boot CD.
255
5. Document everything
When you're done mopping up after a disaster, document both the problem and the
solution. If the same system keeps failing, for instance, simply wiping the machine
and re-imaging it is not a solution anymore; it's a stopgap. Find out what the real
problem is -- any system that fails catastrophically more than twice in a row is
probably suspect and shouldn't be used again.
If you keep records of past failures, it'll help you be better prepared for future failures
-- whether on the same machine or not. Memory can fail you, and if someone comes
along to do the same job in the future, they deserve to learn from your experiences.
Type: SYS C:
Reboot
Remove the Windows 2000/XP/2003 files & folders plus the following files:
Pagefile.sys
Boot.ini
Ntldr
Ntdetect.com
256
If the W2K/XP/2003 OS was installed on a separate partition (see note below) you
can now easily format that partition without loosing any Win9X configuration (as
long as that partition is NOT the Primary Active partition!)
Note: When dual-booting always keep a separate partition for each OS. Never install
2 or more operating systems on the same partition because it will wreck havoc on you
Program Files folder!
The hardware compatibility list (or HCL) provides a representative list of hardware
peripherals that are compatible with the Microsoft Windows operating systems (e.g.
Windows 98, Windows NT 4.0, Windows 2000, Windows XP and Windows 2003).
Microsoft has validated the compatibility of the hardware peripherals on an x86-based
Windows hardware reference platform.
Microsoft Product Support Services uses the HCL to determine whether or not a
computer is supported for use with the Windows operating system.
Before you install Windows on a computer, check the HCL to determine whether the
computer is certified by Microsoft as Windows-compliant. The latest Windows HCL
is available from the Microsoft Windows Drivers and Hardware Central web site
You can search for specific hardware items and see if they are listed as compatible
with the Microsoft OS that you are running. I suggest you visit the site before buying
any piece of hardware that does not have the Microsoft Windows Logo icon on it.
Note that MS has not tested every computer and/or device in all possible
configurations, and that some computers may be sold with peripherals that are not yet
supported by your version of Windows, or that require a device driver supplied by the
manufacturer.
257
unit v
258
Unit-V
TCP/IP Basics
TCP/IP is a network protocol which is used on LANs, WANs and the Internet.
This article will explain the key concepts of how TCP/IP works.
Like most network protocols, TCP/IP is a layered protocol. Each layer builds
upon the layer below it, adding new functionality. The lowest level protocol is
concerned purely with the business of sending and receiving raw data using specific
network hardware. At the top are protocols designed specifically for tasks like
transferring files or delivering email. In between are levels concerned with things like
routing and reliability. The benefit that the layered protocol stack gives you is that if
you invent a new network application or a new type of hardware, you only need to
create a protocol for that application or that hardware: you don't have to rewrite the
whole stack.
TCP/IP is a four layer protocol, as illustrated above. The lowest level, the link
layer, is implemented within the network adapter and its device driver. Like all the
TCP/IP protocols, it is defined by standards. The standards for generic Ethernet-type
259
networks are defined by the IEEE 802 Committee: for example IEEE 802.3 for
Ethernet networks, or IEE 802.5 for Token Ring networks. Other link layer protocols
that could be used include Serial Line IP (SLIP) or Point-to-Point Protocol (PPP),
which are used when connecting to a network over an asynchronous dial-up link.
Ethernet
Since Ethernet is the most common type of network, let's look at it in a bit
more detail. The Ethernet protocol is designed for carrying blocks of data called
frames. A frame consists of a header containing 48-bit hardware destination and
source addresses (which identify specific network adapters), a two byte length field
and some control fields. There follows the data, and then a trailer which is simply 32-
bit cyclic redundancy check (CRC) field.
The data portion of an Ethernet frame must be at least 38 bytes long, so filler
bytes are inserted if necessary. This means that frames are at least 64 bytes long, even
if they carry only one byte of user data: a significant overhead in some types of
application.
Frames also have a maximum size. Less headers, the maximum size for an
Ethernet frame is 1492 bytes, which is the maximum transmission unit (MTU) for
Ethernet. All link layer protocols have a MTU. It is one hardware characteristic that
the higher level protocol needs to be aware of, because larger blocks of data must be
fragmented into chunks that fit within the MTU and then reassembled on arrival at
their destination.
The next layer up from the link layer is called the network layer. The most
important protocol at this level is IP, the Internet Protocol. Its job is to send packets or
datagrams - a term which basically means 'blocks of data' - from one point to another.
It uses the link layer protocol to achieve this.
Both the network layer and the link layer are concerned with getting data from
point A to point B. However, whilst the network layer works in the world of TCP/IP,
the link layer has to deal with the real world. Everything it does is geared towards the
network hardware it uses.
260
An IP address is a 'soft' address. It is bit like calling your office block "Pan-
Galactic House" instead of its real address, 2326 Western Boulevard. The former is no
use to the postman who has to deliver the letters, unless he can use it to find out the
latter. The link layer Ethernet protocol needs to know the unique hardware address of
the specific network adapter it has to deliver the message to and, in case of an error,
the address of the one it came from.
To make this possible, the TCP/IP protocol suite includes link layer protocols
whose job is to convert between IP and hardware addresses. The Address Resolution
Protocol (ARP) finds out the physical address corresponding to an IP address. It does
this by broadcasting an ARP request on the network. When a host recognizes an ARP
request containing its own IP address, it sends an ARP reply containing its hardware
address.
There is also a Reverse ARP (RARP) protocol. This is used by a host to find
out its own IP address if it has no way of doing this except via the network.
Internet Protocol
IP is the bedrock protocol of TCP/IP. Every message and every piece of data
sent over any TCP/IP network is sent as an IP packet.
261
Instead, inter-net communications take place using one or more "hops." Your
Ethernet card will communicate with another Ethernet device on the route to the final
destination. Routing is the important capability that IP adds to a hardware network
protocol. Before we come to it, we will look at some other features of IP.
An IP packet consists of the IP header and data. The header includes a 4-bit
protocol version number, a header length, a 16-bit total length, some control fields, a
header checksum and the 32-bit source and destination IP addresses. This totals 20
bytes in all.We won't get into the detail of all the IP control fields. However, the
protocol field is important. It identifies which higher level TCP/IP protocol sent the
data. When data arrives at its destination (either the packet's destination address
equals the host's own IP address or it is a broadcast address) this field tells IP which
protocol module to pass it on to.
262
Although the total length field in the IP protocol header is 16 bits, IP packets
are usually much smaller than the 64K byte maximum this implies. For one thing, the
link layer will have to split this into smaller chunks anyway, so most of the efficiency
advantages of sending data in large blocks is lost. For another, IP standards
historically did not require a host to accept a packet of more than 576 bytes in length.
Many TCP/IP applications limit themselves to using 512 byte blocks for this reason,
though today most implementations of the protocol aren't so restricted.
Internet Addressing
Internet protocol addresses, or IP addresses, uniquely identify every network
or host on the Internet. To make sure they are unique, one body, called InterNIC, is
responsible for issuing them. If your network is connected to the Internet and the
computers are required to be addressable from the Internet you must use IP addresses
issued by InterNIC. If you don't, you must set up the gateway between your network
and the Internet so that packets containing the made-up addresses will never pass
through it in either direction.
Internet addresses are 32 bits long, written as four bytes separated by periods.
They can range from 1.0.0.1 to 223.255.255.255. It's worth noting that IP addresses
are stored in big-endian format, with the most significant byte first, read left to right.
This contrasts with the little-endian format used on Intel-based systems for storing 32-
bit numbers. This minor point can cause a lot of trouble for PC programmers and
others working with raw IP data if they forget it.
IP addresses comprise two parts, the network ID and the host ID. An IP
address can identify a network (if the host part is all zero) or an individual host. The
dividing line between the network ID and the host ID is not constant. Instead, IP
addresses are split into three classes which allow for a small number of very large
networks, a medium number of medium-sized networks and a large number of small
networks.
Class A addresses have a first byte in the range 1 to 126. The remaining three
bytes can be used for unique host addresses. This allows for 126 networks each with
up to 16m hosts.
263
Class B addresses can be distinguished by first byte values in the range 128.0.x.x to
191.255.x.x. In these addresses, the first two bytes are used for the net ID, and the last
two for the host ID, giving addresses for 16K networks each with up to 16K hosts.
Class C addresses are in the range 224.0.0.x to 239.255.255.x. Here, the first
three bytes identify the network, leaving just one byte for the individual hosts. This
provides for 2 million networks of up to 254 hosts each.
IP addresses can be further divided to obtain a subnet ID. The main net ID
identifies a network of networks. The subnet ID lets you address a specific network
within that network. This system of addressing more accurately reflects how real-
world large networks are connected together.
You decide how the subnet ID is arrived at by defining a 32-bit value called
the subnet mask. This is logically ANDed with the IP address to obtain the subnet
address. For example, if a subnet mask was 255.255.255.0 and an IP address was
128.124.14.5, 128.124 would identify the Class B network, 128.124.14 would identify
the sub-network, and 5 would identify the host on that sub-network.
Addresses in the range 224.x.x.x to 239.x.x.x are Class D addresses which are
used for multi-casting. Addresses 240.x.x.x to 247.x.x.x are reserved for experimental
purposes.
Net, subnet and host IDs of all binary ones (byte value 255) are used when an
IP packet is to be broadcast. Mercifully, an address of 255.255.255.255 does not result
in a broadcast to the entire Internet!
264
Three sets of addresses are reserved for private address space: networks of
computers that do not need to be addressed from the Internet. There is one class A
address, 10.x.x.x, sixteen class B addresses, 172.16.x.x to 172.31.x.x, and 255 class C
addresses, 192.168.0.x to 192.168.255.x. If you have equipment which uses IP
addresses that have not been allocated by InterNIC then the addresses used should be
within one of these ranges. This is an extra precaution in case router mis-
configuration allows packets to leak on to the Internet.
IP Routing
The question you're probably now asking is: how does an IP packet addressed to a
computer on the other side of the world find its way to its destination? The basic
mechanism is very simple.
On a LAN, every host sees every packet that is sent by every other host on that LAN.
Normally, it will only do something with that packet if it is addressed to itself, or if
the destination is a broadcast address.
A router is different. A router examines every packet, and compares the destination
address with a table of addresses that it holds in memory. If it finds an exact match, it
forwards the packet to an address associated with that entry in the table. This
associated address may be the address of another network in a point-to-point link, or it
may be the address of the next-hop router.
If the router doesn't find a match, it runs through the table again, this time looking for
a match on just the network ID part of the address. Again, if a match is found the
packet is sent on to the address associated with that entry.
If a match still isn't found, the router looks to see if a default next hop address is
present. If so, the packet is sent there. If no default address is present the router sends
an ICMP "host unreachable" or "network unreachable" back to the sender. If you see
this message, it usually indicates a router failure at some point in the network.
The difficult part of a router's job is not how it routes packets, but how it builds up its
table. In the simplest case, the router table is static: it is read in from a file at start-up.
This is adequate for simple networks. You don't even need a dedicated piece of
hardware for this, because static routing functionality is built in to IP.
265
Dynamic routing is more complicated. A router builds up its table by broadcasting
ICMP router solicitation messages, to which other routers respond. Routing protocols
are used to discover the shortest path to a location. Routes are updated periodically in
response to traffic conditions and availability of a route. The details of how this all
works is beyond the scope of this article, however.
Traceroute
We'll conclude by taking a swift look at a common Internet troubleshooting tool.
Traceroute. If you haven't used it before, Traceroute is a diagnostic tool that lets you
find out the route Internet traffic takes between you and any given destination. On a
Windows system you can run it by typing the command tracert at a command
prompt.
Traceroute exploits the fact that traffic between two points will usually follow the
same route at any given time, and that a router will notify the sender using an ICMP
message whenever it receives an IP packet containing a time-to-live (TTL) field of
one.
Normally, the TTL field of an IP packet is set to the value 64. Traceroute starts by
sending a UDP datagram to the destination you specify, setting the TTL field to 1.
The first router that receives it discards it, and sends an ICMP "time-to-live equals 0"
notification back. In the header of the ICMP message is the router's IP address, from
which its name can be determined.
This process is repeated with ever increasing TTLs until the datagram reaches the
destination. To create an error when the destination is reached, the UDP datagram is
addressed to a non-existent port on the destination host. This causes the host to
respond with an ICMP "destination port unreachable" message. Thus, Traceroute
knows that the route has been completed.
Network Adapters
The first piece of hardware that I want to discuss is a network adapter. There
are many different names for network adapters, including network cards, Network
Interface Cards, NICs. These are all generic terms for the same piece of hardware. A
266
network card‘s job is to physically attach a computer to a network, so that the
computer can participate in network communications.
The first thing that you need to know about network cards is that the network
card has to match the network medium. The network medium refers to the type of
cabling that is being used on the network. Wireless networks are a science all their
own, and I will talk about them in a separate article.
At one time making sure that a network card matched the network medium
was a really big deal, because there were a large number of competing standards in
existence. For example, before you built a network and started buying network cards
and cabling, you had to decide if you were going to use Ethernet, coaxal Ethernet,
Token Ring, Arcnet, or one of the other networking standards of the time. Each
networking technology had its strengths and weaknesses, and it was important to
figure out which one was the most appropriate for your organization.
Modern Ethernet networks use twisted pair cabling containing eight wires.
These wires are arranged in a special order, and an RJ-45 connecter is crimped onto
the end of the cable. An RJ-45 cable looks like the connector on the end of a phone
cord, but it‘s bigger. Phone cords use RJ-11 connectors as opposed to the RJ-45
connectors used by Ethernet cable. You can see an example of an Ethernet cable with
an RJ-45 connector, shown in Figure B.
267
Figure B: This is an Ethernet cable with an RJ-45 connector installed
As you can see, computers use network cards to send and receive data. The
data is transmitted over Ethernet cables. However, you normally can‘t just run an
Ethernet cable between two PCs and call it a network.
In this day and age of high speed Internet access being almost universally
available, you tend to hear the term broadband thrown around a lot. Broadband is a
type of network in which data is sent and received across the same wire. In contrast,
Ethernet uses Baseband communications. Baseband uses separate wires for sending
and receiving data. What this means is that if one PC is sending data across a
particular wire within the Ethernet cable, then the PC that is receiving the data needs
to have the wire redirected to its receiving port.
You can actually network two PCs together in this way. You can create what
is known as a cross over cable. A cross over cable is simply a network cable that has
the sending and receiving wires reversed at one end, so that two PCs can be linked
directly together.
The problem with using a cross over cable to build a network is that the
network will be limited to using no more and no less than two PCs. Rather than using
a cross over cable, most networks use normal Ethernet cables that do not have the
sending and receiving wires reversed at one end.
268
Of course the sending and receiving wires have to be reversed at some point in
order for communications to succeed. This is the job of a hub or a switch. Hubs are
starting to become extinct, but I want to talk about them any way because it will make
it easier to explain switches later on.
There are different types of hubs, but generally speaking a hub is nothing more
than a box with a bunch of RJ-45 ports. Each computer on a network would be
connected to a hub via an Ethernet cable. You can see a picture of a hub, shown in
Figure C.
A hub is a device that acts as a central connection point for computers on a network
A hub has two different jobs. Its first job is to provide a central point of
connection for all of the computers on the network. Every computer plugs into the
hub (multiple hubs can be daisy chained together if necessary in order to
accommodate more computers).
The hub‘s other job is to arrange the ports in such a way so that if a PC
transmits data, the data is sent over the other computer‘s receive wires.
Right now you might be wondering how data gets to the correct destination if
more than two PCs are connected to a hub. The secret lies in the network card. Each
Ethernet card is programmed at the factory with a unique Media Access Control
(MAC) address. When a computer on an Ethernet network transmits data across an
Ethernet network containing PCs connected to a hub, the data is actually sent to every
269
computer on the network. As each computer receives the data, it compares the
destination address to its own MAC address. If the addresses match then the computer
knows that it is the intended recipient, otherwise it ignores the data.
As you can see, when computers are connected via a hub, every packet gets
sent to every computer on the network. The problem is that any computer can send a
transmission at any given time. Have you ever been on a conference call and
accidentally started to talk at the same time as someone else? This is the same thing
that happens on this type of network.
A switch, such as the one shown in Figure D, performs all of the same basic
tasks as a hub. The difference is that when a PC on the network needs to communicate
with another PC, the switch uses a set of internal logic circuits to establish a
dedicated, logical path between the two PCs. What this means is that the two PCs are
free to communicate with each other, without having to worry about collisions.
270
Figure D: A switch looks a lot like a hub, but performs very differently
Computer networking technologies are the glue that binds these elements
together. The public Internet allows businesses around the world to share information
with each other and their customers. The global computer network known as the
World Wide Web provides services that let consumers buy books, clothes, and even
cars online, or auction those same items off when no longer wanted.
In this article, we will take a very close look at networking, and in particular
the Ethernet networking standard, so you can understand the actual mechanics of how
all of these computers connect to one another.
Why Network?
271
Networking allows one computer to send information to and receive
information from another. We may not always be aware of the numerous times we
access information on computer networks. Certainly the Internet is the most
conspicuous example of computer networking, linking millions of computers around
the world, but smaller networks play a role in information access on a daily basis.
Many public libraries have replaced their card catalogs with computer terminals that
allow patrons to search for books far more quickly and easily. Airports have
numerous screens displaying information regarding arriving and departing flights.
Many retail stores feature specialized computers that handle point-of-sale
transactions. In each of these cases, networking allows many different devices in
multiple locations to access a shared repository of data.
Before getting into the details of a networking standard like Ethernet, we must
first understand some basic terms and classifications that describe and differentiate
network technologies -- so let's get started
The Ethernet
272
In 1973, at Xerox Corporation‘s Palo Alto Research Center (more commonly
known as PARC), researcher Bob Metcalfe designed and tested the first Ethernet
network. While working on a way to link Xerox‘s "Alto" computer to a printer,
Metcalfe developed the physical method of cabling that connected devices on the
Ethernet as well as the standards that governed communication on the cable. Ethernet
has since become the most popular and most widely deployed network technology in
the world. Many of the issues involved with Ethernet are common to many network
technologies, and understanding how Ethernet addressed these issues can provide a
foundation that will improve your understanding of networking in general.
Ethernet Basics
Protocols
In networking, the term protocol refers to a set of rules that govern
communications. Protocols are to computers what language is to humans. Since this
article is in English, to understand it you must be able to read English. Similarly, for
two devices on a network to successfully communicate, they must both understand the
same protocols.
Ethernet Terminology
273
Ethernet follows a simple set of rules that govern its basic operation. To better
understand these rules, it is important to understand the basics of Ethernet
terminology.
Ethernet Medium
274
Since a signal on the Ethernet medium reaches every attached node, the destination
address is critical to identify the intended recipient of the frame.
Repeaters
The first popular Ethernet medium was a copper coaxial cable known as
"thicknet." The maximum length of a thicknet cable was 500 meters. In large building
or campus environments, a 500-meter cable could not always reach every network
device. A repeater addresses this problem.
Bridges
275
Remember how the multiple access and shared medium of Ethernet meant that
every station on the wire received every transmission, whether it was the intended
recipient or not? Bridges make use of this feature to relay traffic between segments. In
the figure above, the bridge connects segments 1 and 2. If station A or B were to
transmit, the bridge would also receive the transmission on segment 1. How should
the bridge respond to this traffic? It could automatically transmit the frame onto
segment 2, like a repeater, but that would not relieve congestion, as the network
would behave like one long segment.
Switched Ethernet
Modern Ethernet implementations often look nothing like their historical counterparts.
Where long runs of coaxial cable provided attachments for multiple stations in legacy
Ethernet, modern Ethernet networks use twisted pair wiring or fiber optics to connect
276
stations in a radial pattern. Where legacy Ethernet networks transmitted data at 10
megabits per second (Mbps), modern networks can operate at 100 or even 1,000
Mbps!
Some switches today can support hundreds of dedicated segments. Since the
only devices on the segments are the switch and the end station, the switch picks up
every transmission before it reaches another node. The switch then forwards the frame
over the appropriate segment, just like a bridge, but since any segment contains only a
single node, the frame only reaches the intended recipient. This allows many
conversations to occur simultaneously on a switched network.
Full-duplex Ethernet
277
collision detection process and transmit at will, since they are the only potential
devices that can access the medium. This allows end stations to transmit to the switch
at the same time that the switch transmits to them, achieving a collision-free
environment.
Ethernet or 802.3?
You may have heard the term 802.3 used in place of or in conjunction with the
term Ethernet. "Ethernet" originally referred to a networking implementation
standardized by Digital, Intel and Xerox. (For this reason, it is also known as the DIX
standard.)
Ethernet and 802.3 differ slightly in their terminology and the data format for
their frames, but are in most respects identical. Today, the term Ethernet refers
generically to both the DIX Ethernet implementation and the IEEE 802.3 standard.
278
2. The token circles the ring like any frame until it encounters a station
that wishes to transmit data.
3. This station then "captures" the token by replacing the token frame
with a data-carrying frame, which encircles the network.
4. Once that data frame returns to the transmitting station, that station
removes the data frame, creates a new token and forwards that token
on to the next node in the ring.
Token-ring nodes do not look for a carrier signal or listen for collisions; the presence
of the token frame provides assurance that the station can transmit a data frame
without fear of another station interrupting. Because a station transmits only a single
data frame before passing the token along, each station on the ring will get a turn to
communicate in a deterministic and fair manner. Token-ring networks typically
transmit data at either 4 or 16 Mbps.
279
Alternative Network Technologies: Asynchronous transfer mode
So if a router's job is to move traffic between two networks, and the Internet is
one of those networks, where is the other one? In this particular case, the PC that is
connected to the router is actually configured as a very simple network.
280
To get a better idea of what I am talking about, take a look at the pictures
shown in Figures A and B. Figure A shows the front of a 3COM broadband router,
while Figure B shows the back view of the same router.
A broadband Internet router contains a set of RJ-45 ports just like a hub or switch
As you can see in the figures, there is nothing especially remarkable about the
front view of the router. I wanted to include this view anyway though, so that those of
you who are unfamiliar with routers can see what a router looks like. Figure B is
much more interesting. If you look at Figure B, you‘ll see that there are three sets of
ports on the back of the router. The port on the far left is where the power supply
connects to the router. The middle port is an RJ-45 port used to connect to the remote
network. In this particular case, this router is intended to provide Internet
281
connectivity. As such, this middle port would typically be used to connect the router
to a cable modem or to a DSL modem. The modem in turn would provide the actual
connectivity to the Internet.
If you look at the set of ports on the far right, you‘ll see that there are four RJ-
45 ports. If you think back to the first part of this article series, you‘ll recall that hubs
and switches also contained large groups of RJ-45 ports. In the case of a hub or
switch, the RJ-45 ports are used to provide connectivity to the computers on the
network.
Now that I've talked a little bit about what a router is and what it does, I want
to talk about the routing process. In order to understand how routing works, you have
to understand a little bit about how the TCP/IP protocol works.
A subnet mask looks a lot like an IP address in that it follows the format of
having four numbers separated by periods. A typical subnet mask looks like this:
255.255.255.0
In this particular example, the first three numbers (called octets) are each 255,
and the last number 0. The number 255 indicates that all of the bits in the
corresponding position in the IP address are a part of the network number. The
282
number zero indicates that none of the bits in the corresponding position in the IP
address are a part of the network number, and therefore they all belong to the device
number.
The reason why this is important to know is because a router‘s job is to move
packets of data from one network to another. All of the devices on a network (or on a
network segment to be more precise) share a common network number. For example,
if 192.168.1.x was the network number associated with computers attached to the
router shown in Figure B, then the IP addresses for four individual computers might
be:
192.168.1.1
192.168.1.2
192.168.1.3
192.168.1.4
As you can see, each computer on the local network shares the same network
number, but has a different device number. As you may know, whenever a computer
needs to communicate with another computer on a network, it does so by referring to
the other computer‘s IP address. For example, in this particular case the computer
with the address of 192.168.1.1 could easily send a packet of data to the computer
with the address of 192.168.1.3, because both computers are a part of the same
physical network.
You can easily look at this IP address and tell that it does not belong to the
192.168.1.x network. That being the case, the computer that‘s trying to reach the Web
site can‘t just send the packet out along the local network, because the Web server
isn‘t a part of the local network. Instead, the computer that needs to send the packet
looks at its default gateway address.
283
The default gateway is a part of a computer‘s TCP/IP configuration. It is basically
a way of telling a computer that if it does not know where to send a packet, then send
it to the specified default gateway address. The default gateway‘s address would be
the router‘s IP address. In this case, the router‘s IP address would probably be
192.168.1.0.
Notice that the router‘s IP address shares the same network number as the other
computers on the local network. It has to so that it can be accessible to those
computers. Actually, a router has at least two IP addresses. One of those addresses
uses the same network number as your local network. The router‘s other IP address is
assigned by your ISP. This IP address uses the same network number as the ISPs
network. The router‘s job is therefore to move packets from your local network onto
the ISPs network. Your ISP has routers of its own that work in exactly the same way,
but that route packets to other parts of the Internet.
DNS Servers
The IP address that‘s associated with my Web site. To be able to access a Web
site, your Web browser has to know the Web site‘s IP address. Only then can it give
that address to the router, which in turn routes the outbound request packets to the
appropriate destination. Even though every Web site has an IP address, you probably
visit Web sites every day without ever having to know an IP address. In this article, I
will show you why this is possible.
When you open a Web browser and enter the name of a Web site (which is
known as the site‘s domain name, URL, or Universal Resource Locator), the Web
browser goes straight to the Web site without you ever having to enter an IP address.
With that in mind, consider my comparison of IP addresses to postal addresses. You
can‘t just write someone‘s name on an envelope, drop the envelope in the mail, and
284
expect it to be delivered. The post office can‘t deliver the letter unless it has an
address. The same basic concept applies to visiting Web sites. Your computer cannot
communicate with a Web site unless it knows the site‘s IP address.
In the two articles leading up to this one, I talked about several aspects of a
computer‘s TCP/IP configuration, such as the IP address, subnet mask, and default
gateway. If you look at Figure A, you will notice that there is one more configuration
option that has been filled in; the Preferred DNS server.
As you can see in the figure, the preferred DNS server is defined as a part of a
computer‘s TCP/IP configuration. What this means is that the computer will always
know the IP address of a DNS server. This is important because a computer cannot
communicate with another computer using the TCP/IP protocol unless an IP address
is known.
285
Figure A: The Preferred DNS Server is defined as a part of a computer‘s TCP/IP
configuration
With that in mind, let‘s take a look at what happens when you attempt to visit
a Web site. The process begins when you open a Web browser and enter a
URL. When you do, the Web browser knows that it can not locate the Web site based
on the URL alone. It therefore retrieves the DNS server‘s IP address from the
computer‘s TCP/IP configuration and passes the URL on to the DNS server. The DNS
server then looks up the URL on a table which also lists the site‘s IP address. The
DNS server then returns the IP address to the Web browser, and the browser is then
able to communicate with the requested Web site.
Actually, that explanation is a little bit over simplified. DNS name resolution
can only work in the way that I just described if the DNS server contains a record that
corresponds to the site that‘s being requested. If you were to visit a random Web site,
there is a really good chance that your DNS server does not contain a record for the
site.
The reason for this is because the Internet is so big. There are millions of Web
sites, and new sites are created every day. There is no way that a single DNS server
could possibly keep up with all of those sites and service requests from everyone who
is connected to the Internet.
Let‘s pretend for a moment that it was possible for a single DNS server to
store records for every Web site in existence. Even if the server‘s capacity were not an
issue, the server would be overwhelmed by the sheer volume of name resolution
requests that it would receive from people using the Internet. A centralized DNS
server would also be a very popular target for attacks.
286
Instead, DNS servers are distributed so that a single DNS server does not have
to provide name resolutions for the entire Internet. There is an organization named the
Internet Corporation for Assigned Names and Numbers, or ICANN for short, that is
responsible for all of the registered domain names on the Internet. Because managing
all of those domain names is such a huge job, ICANN delegates portions of the
domain naming responsibility to various other firms. For example, Network Solutions
is responsible for all of the .com domain names. Even so, Network Solutions does not
maintain a list of the IP addresses associated with all of the .com domains. In most
cases, Network Solution‘s DNS servers contain records that point to the DNS server
that is considered to be authoritative for each domain.
To see how all this works, imagine that you wanted to visit the www.brienposey.com
website. When you enter the request into your Web browser, your Web browser
forwards the URL to the DNS server specified by your computer‘s TCP/IP
configuration. More than likely, your DNS server is not going to know the IP address
of this website. Therefore, it will send the request to the ICANN DNS server. The
ICANN DNS server wouldn‘t know the IP address for the website that you are trying
to visit. It would however know the IP address of the DNS server that is responsible
for domain names ending in .COM. It would return this address to your Web browser,
which in return would submit the request to the specified DNS server.
The top level DNS server for domains ending in .COM would not know the IP
address of the requested Web site either, but it would know the IP address of a DNS
server that is authoritative for the brienposey.com domain. It would send this address
back to the machine that made the request. The Web browser would then send the
DNS query to the DNS server that is authoritative for the requested domain. That
DNS server would then return the websites IP address, thus allowing the machine to
communicate with the requested website.
As you can see, there are a lot of steps that must be completed in order for a computer
to find the IP address of a website. To help reduce the number of DNS queries that
must be made, the results of DNS queries are usually cached for either a few hours or
a few days, depending on how the machine is configured. Caching IP addresses
greatly improves performance and minimizes the amount of bandwidth consumed by
287
DNS queries. Imagine how inefficient Web browsing would be if your computer had
to do a full set of DNS queries every time you visit a new page.
On the desktop right click My Network Places and select Properties from the
menu
Go to Start => Control Panel and selecting the Network Connections applet
Figure 1
288
You can
configure
advanced
settings
from Advanced
Settings
menu option
on the
Advanced menu of
the Network
Connections folder.
This will allow you to
access the settings
for all the network
connections that you
see listed in Figure 1. Once you select this menu option, you will open the Advanced
Settings dialog box as seen in figure 2.
Figure 2
289
Please note that by looking at and modifying these network settings, you will
improve performance on your system. You see quite a few connections listed in the
‗Connections‘ field of the Advanced Settings dialog box. Within this section, you can
see to the right of it, an up arrow and a down arrow. By selecting a connection simply
by clicking on it to highlight it, you can either move that connection entry up or down
in the order. The top of the order would show the most frequently used, while the least
used should be towards the bottom of the list.
Print Sharing (which is a hardening technique if you don‘t need the sharing
on) and remove any unneeded protocols bound to that connection. You can also move
the binding order up or down in the same way in case you had multiple protocols
bound to a connection and you used one protocol more than the other. For example, if
you wanted to use TCP/IP more frequently than IPX/SPX, you can move TCP/IP to
the top of the list and move IPX/SPX to the bottom of the binding order.
Remember - changing the provider order and changing the order of protocols bound
to those providers will improve performance.
290
Figure 3
291
Figure 4
Note:
To open Network Connections, click Start, click Control Panel, click Network
and Internet Connections, and then click Network Connections.
Network providers are accessed in the order they appear in this list.
To modify the network provider order, you must be logged on as a member of
the Administrators group.
292
Figure 5
XP Home XP Professional
293
Limited to 2 Full User Management
User management security levels, and
no policies Security Policies
Limited to
Workgroup Workgroup Workgroup
networking/ network (unable to networking and
Joining domains join able to join a Domain
a domain)
no security,
Security on sharing everybody Full security based on
disks and folders has access to shared User Management
data
Group Policy
not included Included
Editor
ASR Automatic
not included Included
System Recovery
The lack of the possibility to join a domain and the lack of securing a shared network
resourcewill prevent the use of the XP Home edition in most office networks, even in
configurations whereWindows95/98/ME could be used.More differences will be
listed, once encounter the item during my work.
294
Backup Program on Windows XP Home :
The default installation of WindowsXP Home does not include a Backup program (as
part of "Programs" / "Accessories" / "System Tools"If you have a copy of Windows
XP Home on a Recovery CD-ROM : sorry.
If you have a retail copy ( as sold inthe shops) of Windows XP Home, have a look on
the CD-ROM to:VALUEADD\MSFT\NTBACKUP,which allows to install now the
Backup program.
295
Since Windows XP does not support anymore any ISA Non-Plug & Play Network
adapters,Windows XP is able to detect automatically the settings/configuration of
ISA Plug & Play andPCI network adapters.
Before using network adapters, I suggest to check that the network adapter has be
properly identified and is working.In the Control-Panel, select the System icon:
(or right-click "My Computer" on the desktop and select Properties)Select the tab:
"Hardware" and then use in the section "Device Manager" (middle of the dialogbox)
the button
"Device Manager"
296
In the Device-Manager, expand the section for Network Adapters :
297
Tab : GeneralMake sure, that the "Device status" is:"This device is working
properly".if not, use the button "troubleshooting"
298
tab: Advanced
299
tab : Driver
In case that Windows has problems usingthe driver, you can download from the
manufacturer of the network adaptera new driver, which you can use thento "Update"
300
Tab: Resources
Under "Resource Settings", you will see the I/O-range and IRQ used/assigned
by this component. For PCI network cards, it is not possible to change the resources
(I/O-range and IRQ ), but for ISA Plug & Play card you can assign different settings
(if you need to resolve a resource issue, but that should not be required,
301
Connecting XP to Multiple Networks: Office and Home
Are you using at work a notebook computer connected to your company network ?
If your company network uses TCP/IP protocol and a network server, then you will
have your notebook most probably configured to get the IP-address via DHCP:
Properties of the Network connection :When you verify your network settings in
theProperties of the Network, checking the "Status" of your LAN connection:
you should see that your TCP/IP-address was "Assigned by DHCP"You carry your
notebook home and connect it to your home-network, to exchange somefiles with
other computers used in your family. Most probably there will be no server installedat
your home or another system able to act as DHCP-server, so Windows XP ( like
302
all other systems at home are also
configured to use this Auto-IP-Address
generation,
then you can use the network without
having to reconfigure the TCP/IP-settings
303
on yournotebook.But if you use at home manually assigned IP-addresses (example:
192.168.1.x- range),then you are required to adjust on your notebook the IP-address to
match it up with theIP-address range used at home.You have to do this manually on
previous versions of Windows.Windows XP allows you to automate this step: In the
Properties of Networking, display the Properties of your LAN network connection ,
display the Properties of the TCP/IP-protocol and select the tab
"AlternateConfiguration" :
304
This will be indicated in the "Status" of your LAN connection:
Windows 98 Networking
Upgrade your "old" version of Windows98 with the new features introduced on
Windows98-SE (like: ICS: Internet Connection Sharing), Microsoft is offering a low-
cost upgrade(you will have to order the upgrade directly from Microsoft, this
upgrade is NOT available in the shops ). Note: Starting with Windows98-SE (?), the
Setup-procedure copies all setup-file (121 Mbytes) to the local disk( avoiding to
prompt for the CD-ROM when making later a change to the configuration ).
A copy of Windows98, both at work and at home. At work, upgraded a partition with
an existing Windows95 installation to Windows98, while at home, I installed
Windows98 "fresh" on an empty partition, getting the first time the display of the
"channels" :
305
Except for the (optional) Webpage look (the "Active Desktop"), the Control-Panel has
very much the same options, including the Network, but there are a few differences:
1) Installation The installation procedure of Windows98 is much more stable than the
installation procedure of Windows95 (it did not "hang" on the detection of NE2000-
compatible network card, as Windows95 did). But: Windows98 did NOT get it
completely correct: When it prompted during the installation for the parameters of the
NE2000 network card, we have to adjust/define manually the IRQ to be used:
In the Network Properties, selected the "NE2000 Compatible" network adapter, then
clicked on the button "Properties". In the window for the "NE2000 Compatible
Properties", selected the tab: Resources, where I changed the values to match the
hardware settings of my installed NE2000.
306
When upgrading from Windows95 to Windows98, you could also become a victim of
the Windows98 Version Conflict Manager (VCM), which may have replaced a
working Windows95 driver with a buggy Windows98 driver.
307
While Windows95 installs by default the protocols NetBEUI and IPX/SPX (which
allows an inexperienced user to get a network working, as long as the workgroup
name is identical and something is shared, see :Which protocol to use ?),
Windows98 is installing by default ONLY TCP/IP protocol (configured for DHCP-
usage, which will NOT work on simple PC-to-PC networks, because both
Windows95 and Windows98 and even WindowsNT4 Workstation CANNOT act as a
DHCP server).
This can cause problems on networks with a mixture of Windows95 and Windows98
systems, in case the Default Protocol is not checked properly.
3) IP-AutoConfiguration
308
My advise: unless you have a good reason to use TCP/IP, loaded the NetBEUI
protocol (which is very easy: NOTHING needs to be configured) and delete the
TCP/IP protocol.
If you need TCP/IP, assign yourself an IP-address (to speed up booting).
The Network Neighborhood is the same (except for the Web-Page/Active Desktop
look) including the same error-messages as under Windows95 : "Unable to browse
the network", if you are
309
too quick (while waiting for the systems to elect a Browse-Master):
So, when it comes to Networking, I expect the new Windows98 to be the same as
Windows95.
4) Interrupt Sharing on PCI-devices
5)DialupNetworking
310
Dialup Networking is very similar to the DUN 1.2 upgrade, as included in
Windows95B (OSR2) or downloadable from Microsoft.
And like in the DUN 1.2 upgrade, Dialup Networking Server is INCLUDED in
Windows98 (and not an extra in the Plus!- package, as on the first Windows95
releases):
MS PC-to-PC Network
Once the new network card has been installed and you power-on the Windows95/98
system, 2 things can happen:
311
(This usually happens on PCI and Plug-and-Play ISA-cards)
If it is a board know to Win95, let it use it own drivers, otherwise you need to supply
the new Network-driver software (usually delivered on a floppy).
Windows95 does NOT automatically detect the new card
(this is usually the case with non Plug-and-play ISA cards)Goto the "Control-panel",
select "Add new Hardware" and let Windows95 detect the new board.(If you know
the EXACT type, the Port-address and then IRQ, maybe also the required DMA), you
can save yourself the few minutes of "search-time" by NOT allowing Windows95 to
search, but by selecting first as "Hardware Type" the "Network adapters":
In the windows "Select Device", you pick first the manufacturer in the left box, then
the model of the Network board :
312
(The selected in this example an "NE2000 compatible", which is a very popular
board.Now, in the "Control-Panel", open the "Network" applet, it should show the
following entries:
313
Windows95
installs by default the
protocols NetBEUI and IPX/SPX, while Windows98 installs only TCP/IP.
The suggest now to verify, that Windows95/98 got it right in its hardware selection
(and if you added the board yourself, you MUST check it now and define the proper
resources).Click on the line defining the "Network adapter", then select "Properties",
314
then the tab: "Resources":
Verify, that the settings match the jumpers or Software Configuration values
(Network card installation and IRQ/INT), change the values if required (it may
require to change the configuration type "Basic Configuration 0" or higher).
Go back to the "Network" tab:"Configuration":delete now all items, which are NOT
required for a PC-to-PC Windows95/98 network(to make it easy in setup, I select as
protocol the "Microsoft NetBEUI", because it is simple (NOTHING to configure)
and fast, however, you can also choose to install IPX/SPX or TCP/IP as protocol, but
these protocols require an additional configuration step):
Click now on the button "File and Print Sharing", put the check-mark on "Sharing
315
disks" and (if required) on "Sharing printers".The "Network" tab:"Configuration"
should now look like:
316
Now, you need to define a name for your computer and a workgroup:
Click on the Tab:"Identification":
Give the computer now a name, which MUST be UNIQUE on the complete network.
Give the workgroup a name, which MUST be the SAME on all connected systems.
When you now close our network-applet, you need your Windows95 CD-ROM (or
floppies), because Windows95 needs to load now the network-s/w.
Once rebooted, you will be asked for a User-name. On a Windows95 network
(without a NOVELL-server or Windows NT server), you can enter ANY name as
user-name.
But although the network is now installed and should work properly, you cannot yet
access data on other systems, you first need to take care about Sharing and Mapping
of network drives.
317
Windows ME Network Card Installation
When configuring your network,you are used on Windows95 and 98to be able to add
a new adapter fromwithin the Network Properties:When selecting to "Add" on a
318
The "Wizard" will start.
319
You can follow the recommendation to let Windows search for new hardware.
If you install a legacy ISA Network card, Windows ME may not find
it and then you need to select it from the list
320
and select my specific network card(in this example: a 3COM 3C509B,
configured as NON-Plug&Play)
Windows ME is not able to detect the hardware settings for Input/Output Ports and
Interrupt Request.In this example the values estimated by Windows were not
correct.
This required to define manually in the "Device Manager" (part of the Properties of
"System") for this network card: Tab: Resources the proper values.
321
Such a change requires a restart of the system.
After the restart, check again in Device-Manager, that the Network card is working
properly:
322
Networking between WindowsXP and Windows95/98/ME
When installing a network between a Windows95/98/Me and a Windows XP system,
just make sure that you configure both systems with all required components
(same as for networking between Windows95/98/ME and Windows 2000, see also the
Microsoft Knowledge Base article Q258717 ) :
323
Since the default protocol forWindows XP is now TCP/IP,you should also use TCP/IP
on the Windows95/98/ME system.(for details on the selection/ installation of
protocols, pleaseview the Adjust the Network Configuration )
Check on TCP/IP properties: for Windows95, you must define manually an IP-
address, for Windows98/ME, you can select to use the Windows 98 TCP/IP
AutoConfiguration. how ever: since the Windows98 Auto-IP-configuration will
cause
a delay at startup, I strongly suggest to assign manually an IP-address (use an address
from the range 192.168.x.x with subnet mask 255.255.255.0 ) test, that you have a
working network connection to the Windows2000 system by making the TCP/IP
PING test.
324
Verify the Windows XP Network. By default, TCP/IP is installed and configured for
an Automatic IP-configuration.Although it will not delay the startup, the network will
not be ready for a while, since the IP-address will not yet be defined. I suggest to
define the IP-address manually, assigning an IP-address in the same range as defined
on the Windows95/98 system.test, that you have a working network connection to the
Windows95/98/ME system by making the TCP/IP PING test.
325
2) Install File-and-Printer Sharing:
326
3) make sure to be in the same workgroup:
327
Check in the Properties of "My Computer", tab: Network Identification, that the name
of the workgroup is the same as defined on the Windows95/98/ME system. if
required, adjust it.
4) Make the resources available by Sharing disks/folders on Windows95/98/ME
and by sharing disks/folders on Windows XP Home Edition / sharing
disks/folders on Windows XF Prof.
328
5) If you used Windows XP professional, create a WindowsXP Username for the user
workingon the Windows95/98/ME system:
You can use any Username and password to connect to Windows XP Home Edition,
but you MUST define a username (and password, if required) to logon (if you select
on the Windows95/98/ME "Enter Network Password" to "Cancel" or press the "ESC-
key", then you did NOT logon to the network and can NOT use the network ! )
329
7) the Windows95 "Network Neighborhood" should allow you now to access the
WindowsXP system and the Windows XP "My Network Places" / "Computers Near
Me"
access to the Windows:
330
Although Windows XP allows to logon without passwords, it requires that passwords
are defined for users, when such users like to connect via the network to shared
resources on the Windows XP system : Trying to access from Windows95/98 to
Windows XP with matching usernames but using blank ( = no ) passwords will result
on Windows95 to an "Unknown Error 31".
Solution : define on both systems a password for this user or use on Windows XP
the
Group-Policy Editor to allow network access without passwords.
331
What is a computer virus?
Computer viruses are small software programs that are designed to spread from one
computer to another and to interfere with computer operation.
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.
Viruses can be disguised as attachments of funny images, greeting cards, or audio and
video files.Viruses also spread through downloads on the Internet. They can be hidden
in illicit software or other files or programs you might download.
To help avoid viruses, it's essential that you keep your computer current with the
latest updates and antivirus tools, stay informed about recent threats, and that you
follow a few basic rules when you surf the Internet, download files, and open
attachments. Once a virus is on your computer, its type or the method it used to get
there is not as important as removing it and preventing further infection.
Here are a few primary indicators that your computer might be infected:
332
• Your computer restarts on its own and then fails to run normally
These are common signs of infection—but they might also indicate hardware or
software problems that have nothing to do with a virus. Unless you run the Microsoft
Malicious Software Removal Tool and install industry-standard, up-to-date
antivirus software on your computer, there is no way to be certain if your computer
is infected with a virus or not. If you don't have current antivirus software installed or
if you're interested in installing a different brand, you can try Windows Live
OneCare free for 90 days or visit our Security software downloads page for
software from other companies.
Tip: Beware of messages warning you that you sent e-mail that contained a virus.
This can indicate that the virus has listed your e-mail address as the sender of tainted
e-mail. This does not necessarily mean you have a virus. Some viruses have the
ability to forge e-mail addresses.
You can continue to improve your computer's security and decrease the possibility of
infection by using a firewall, keeping your system up-to-date, maintaining a current
antivirus software subscription, and following a few best practices.
Tip: 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.
333
Steps to help avoid viruses:
1. Use an Internet firewall (Note: Windows XP with SP2 has a firewall already
built-in and turned on by default).
2. Visit Microsoft Update and turn on automatic updating.
Note: If you've installed Office 2003 or Office XP, Automatic Updates will
also update your Office programs. If you have an earlier version of Office, use
Office Update.
3. Subscribe to industry standard antivirus software, such as Windows Live
OneCare and keep it current.
4. Never open an e-mail attachment from someone you don't know.
5. Avoid opening an e-mail attachment from someone you know, unless you
know exactly what the attachment is. The sender may be unaware that it
contains a virus.
What about spyware?
Although spyware programs are different from viruses, some can behave like
viruses and pose similar and other risks. To help protect against spyware, use
antispyware software such as Windows Defender. Windows Defender comes with
Windows Vista. If you use Windows XP SP2, you can download Windows
Defender for no charge.
Here are a few primary indicators that your computer might be infected:
334
Your computer runs more slowly than normal
Your computer stops responding or locks up often
Your computer crashes and restarts every few minutes
Your computer restarts on its own and then fails to run normally
Applications on your computer don't work correctly
Disks or disk drives are inaccessible
You can't print correctly
You see unusual error messages
You see distorted menus and dialog boxes
These are common signs of infection—but they might also indicate hardware or
software problems that have nothing to do with a virus. Unless you run the Microsoft
Malicious Software Removal Tool and install industry-standard, up-to-date
antivirus software on your computer, there is no way to be certain if your computer
is infected with a virus or not. If you don't have current antivirus software installed or
if you're interested in installing a different brand, you can try Windows Live
OneCare free for 90 days or visit our Security software downloads page for
software from other companies. Tip: Beware of messages warning you that you sent
e-mail that contained a virus. This can indicate that the virus has listed your e-mail
address as the sender of tainted e-mail. This does not necessarily mean you have a
virus. Some viruses have the ability to forge e-mail addresses.
2. If you currently use antivirus software, visit the manufacturer's Web site, update
your software, and then perform a thorough scan of your computer. If you don't use
antivirus software, subscribe to a service and scan your computer immediately.
3. Download, install, and run the Malicious Software Removal Tool (for Microsoft
Windows XP or Windows 2000 users). Note that this tool does not prevent viruses
from infecting your system; it helps to remove existing viruses.
335
Why didn't our antivirus software work?
It's crucial to keep your antivirus software current with the latest updates (usually
called definition files) that help the tool identify and remove the latest threats.
In addition, not all antivirus tools are the same; if you find that the one you use isn't
working to your satisfaction, you should do some research and try an alternative.
Note: What you might think is a virus could actually be spyware. Download and
install Windows Defender or other antispyware software to see if that fixes the
problem. Windows Defender comes with Windows Vista. If you use Windows XP
SP2, you can download Windows Defender for no charge.
336