You are on page 1of 17

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

WHAT IS CPU
CPU is sometimes referred to as the brain or heart of a computer system.
It is the part of the computer that actually processes the data.
The CPU
a. accepts data and instructions from the input device (or from the software stored in its memory).
b. processes the data according to the given instructions.
c. finally stores the results of the operations in its memory or displays it in a suitable output media
such as monitor, printer etc.
The CPU also controls the flow of data through the system, places data in memory and retrieves them
when needed.
In a microcomputer, the entire CPU is contained on a tiny chip called a microprocessor. The chip is
mounted on a piece of plastic with metal wires attached on it.
WHAT IS PROCESSING

The procedure that transforms raw data into useful information is called processing.

Two components handle processing in a computer:


(i)
processor (CPU)
(ii)
memory.

Both of these two components are located on the computers main system board or Motherboard
(the circuit board that connects the CPU to all the other hardware devices).
FUNCTION OF A CPU
The primary function of a CPU is to execute sequence of instructions, which are stored in an external
main memory. Program execution in CPU is therefore carried out as follows:
i)

The CPU accepts data and instructions from the input device (or from the software stored in its
memory).
It then processes the data according to the given instructions.
Finally the CPU stores the results of the operations in its memory or displays it in a suitable
output media such as monitor, printer etc.

ii)
iii)

FUNCTIONAL PART OF A CPU


Every CPU has at least two basic parts:
(i)
the Control Unit
(ii)
the Arithmetic and Logic Unit (ALU).
Moreover, memory is also referred to as the part of CPU.
The parts of the CPU are usually connected by an electronic highway known as Bus.
To temporarily store data and instructions, the CPU has high-speed special-purpose storage devices
called Registers.
ARITHMETIC AND LOGIC UNIT (ALU)
All arithmetic calculations and logical decisions are performed in the ALU.
Arithmetic operations include addition, subtraction, multiplication and division.
Logical operations include comparisons, such as determining whether one number is equal
to, greater than, or less than another number.
[
N.B.

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

Many instructions (other than instructions involving arithmetical or logical operations)


carried out by the control unit of the CPU involve simply moving data from one place to
another. For example:
(i) Moving data from memory to storage (storage devices hold data that are not currently
being used by the CPU; examples are hard disk, floppy disk, compact disk etc),
(ii) Moving data from storage to printer, monitor and so forth.
]
Data and instructions that involve arithmetic or logical operations, stored in the primary
memory before processing, are transferred to the ALU as and when needed for processing.
Intermediate results generated in the ALU are temporarily transferred back to the primary
memory, until needed later.
After the processing is over, the ALU then sends result to the memory unit to be stored either
permanently or temporarily.
Hence, data may move from primary memory to ALU, and back again to main memory, many
times, before the processing is over.
The ALU includes a group of registers which are the high-speed memory element built directly into the
CPU and which are used to hold the data currently being processed. For example, the control unit might
load two numbers from memory into the registers in the ALU. Then it might tell the ALU to divide the
two numbers (an arithmetic operation) or to see whether the two numbers are equal (a logical operation).
CONTROL UNIT
Control Unit
Although, control unit does not perform any actual processing on the data, it acts as a
central nervous system (that is, control unit does not execute instructions itself; it tells
other parts of the computer system what to do).
It controls and coordinates the activities of all other units of a computer system.
The CPUs instructions for carrying out commands are built into the control unit.
It takes instructions from the memory unit one at a time and interprets them.
It then sends appropriate signals to all other units to cause the specific instruction to
be executed.
The control unit ensures that, according to the stored instructions, the right operation
is done on the right data at the right time.
The results that are stored in the memory can be transferred into human readable form
by means of an output device.
It determines the movement of electronic signals between the main memory and the
arithmetic and logic unit, as well as the control signals between the CPU and
input/output devices.
INSTRUCTION AND INSTRUCTION SETS
An instruction is a command that the computer must execute so that a specific action can
be carried out.
The instructions, or instruction sets, list all the operations that the CPU can perform.
Each instruction in the instruction set is expressed in microcode- a series of basic
directions that tell the CPU how to execute more complex operations.
Before a program can be executed, every command in it must be broken down into
instructions that correspond to the ones in the CPUs instruction set. When the program is
executed, the CPU carries out the instruction in order by converting them into microcode.
The CPUs instructions for carrying out commands are built into the control unit.

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

CPUs made by different manufacturers have different instruction sets.


In fact, different models of the CPUs of the same manufacturers also often have different instruction sets.
However, manufacturers tend to group their CPUs into families that have similar instruction sets.
Usually, when a CPU is developed, it is ensured that its instruction set includes all the instructions in the
instruction set of its predecessor CPU, plus some new ones. This manufacturing strategy is known as
upward or forward compatibility and the new CPU is said to be upward compatible with its predecessor.
Intels x86 families of processors, for instance, includes the most common type of CPU found in the
majority of PCs (personal computer).
UPWARD AND DOWNWARD COMPATIBILITY
Upward or Forward Compatibility

It is the capability of a hardware device (or a software product) to interact


successfully with all succeeding versions of software (or hardware device). This hardware
device (or software product) is called upward compatible.

Upward compatibility allows software written for a computer with a particular


CPU, to work on computers with newer processors of the same family.

It also allows the users of these computer systems to easily upgrade their system,
without worrying about converting all their existing software.
Downward or Backward Compatibility

It is the capability of a new hardware device (or new software product) to interact
successfully with all the same software product (or hardware device) that its predecessor
could. This hardware device (or software product) is called downward compatible.
MICROPROCESSOR

In a personal computer, the processor usually consists of one or more specialized


chips which are called microprocessors.

They are composed of silicon or other material etched with many tiny electronic
circuits.

They are integrated circuit (IC) based on the VLSI (very large scale integration)
and ULSI (ultra large scale integration) technology.
CO-PROCESSOR
A co-processor is a separate instruction-set processor that is closely coupled to the CPU and whose
operation is to enhance the processing speed of the main processor (CPU). Complicated arithmetic
operations like exponentiation and trigonometric functions are costly to implement in the CPU hardware,
while software implementations of these operations are slow. An arithmetic or math coprocessor is used
as the auxiliary processor to the CPU to provide fast, low-cost hardware implementations of these special
math functions. Newer CPUs have math coprocessor built-in. Earlier CPUs did not have them, so many
users choose to upgrade their machines by adding them.
TYPES OF PROCESSORS/ CPU USED IN PERSONAL COMPUTERS
Two biggest players (i.e. manufacturers) in the PC CPU market are Intel and Motorola. Intel processor
today controls most PCs. The primary exception to this rule is the Apples Macintosh. All Macs use
processor chips made by Motorola. In addition, several firms, such as AMD (Advanced Micro Devices)
and Cyrix, make processors that are mimic the functionality of Intels processors.
THE RISC AND CISC PROCESSOR
CISC Processor (Complex instruction set computer)

CISC means complex instruction set computer.

It is a kind of microprocessor chip.

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

In this type of processor, the instruction sets are complex and large, typically
containing 200 to 300 instructions.

The processors in IBM-compatible computers and Motorola 680x0 computers are


CISC processors.

Length of each instruction in this type of processor is of variable length.

There are also variable lengths addressing modes.


RISC Processor (Reduced instruction set computer)

A newer theory in microcomputer design holds that if the instruction set for the
CPU is kept small and simple, each instruction will execute much faster, allowing the processor
to complete more instructions during a given period.

CPUs designed according to this theory are called RISC processor (Reduced
Instruction Set Computer). In this type of processors, reduced number of instructions is used.

Length of each instruction in this type of processor is of equal/ fixed length.

Fixed length addressing modes

This type of processor is used in the PowerPC computers.

RISC processor-based PC results in a faster and less expensive than that of CISC
processor-based PC.
REGISTER
Register is the high-speed memory location that is built directly into the ALU part of the CPU.
It holds data and instructions temporarily that are currently being processed.
The computer loads instruction and data from main memory into the registers just before
processing, which helps the computer process faster.

The size of the registers, which is sometimes called the word size, indicates the amount of data
with which the computer can work at any given time.
The bigger the word size, the more quickly the computer can process a set of data.
64-bit processor, or 64-bit register or 64-bit computer means that the word size of the computer is
8 bytes (64 bits), i.e. the register of this computer contains 64 bit data and the computer can process
64 bit data at any given time. If the factors like memory, clock speed, data bus etc. are kept equal,
then a CPU with 32-bit registers can process data twice as fast as one with 16-bit registers.

TYPES OF REGISTERS
Although, the number of registers varies from computer to computer, there are some registers which are
common to all computers. Brief descriptions of these registers are given below.
1) Memory Address Register (MAR)
It holds the address of the active memory location.
The address is loaded from the Program Control Register (PC) when an instruction is read
from memory.
2) Memory Buffer Register (MBR)
This register acts as a buffer between the CPU and the memory
It holds the contents of the memory word read from, or written in memory.
An instruction word placed in this register is transferred to the Instruction Register (IR)
A data word placed in this register is accessible for operation with the Accumulator
Register (AC) or for transfer to I/O Register.
3) Program Control Register (PC)
It holds the address of the next instruction to be executed.
[Normally, the instructions of a program are stored in consecutive memory locations, and
read and executed in sequence, unless a branch instruction is encountered].
For a branch instruction, the address part of the branch instruction is transferred to the
Program Control Register (PC) to become the address of the next instruction.
4) Accumulator Register (AC)
PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

It holds:

(i) The initial data to be operated upon.


(ii) The intermediate results.
(iii) And the results of processing.
It is used during the execution of most instructions.
The results of arithmetic operations are returned to the Accumulator Register (AC) for
transfer to main memory, through the Memory Buffer Register (MBR).
In many computers, there are more than Accumulator registors.
5) Instruction Register (IR)
It holds the current instruction, which is being executed.
As soon as the instruction is stored in this register, the operation part and the address part
of the instruction are separated.
The address part of the instruction is sent to Memory Address Register (MAR), while its
operation part is sent to the Control Unit, where it is decoded, and interpreted for the
action to be performed.
6) Input/Output Register (I/O)
It is used to communicate with the input/output device.
All input information, such as instructions and data, are transferred to this register by an
input device.
Similarly, all output information, to be transferred to an output device, are found in this
register.

The registers discussed above can be of special purpose or general purpose.


Special purpose registers are dedicated for certain functions only and are generally
not under program control.

General purpose registers can be used for several functions under program control.
They are convenient store for holding data which is currently processed by the ALU, for storing some
data temporarily and also for storing intermediate results.
COMPUTERS INTERNAL CLOCK (SYSTEM CLOCK)
Every microcomputer has a system clock whose main purpose is not to keep the time of the day.
The system clock is used to time the processing operation of a computer, i.e. it controls how fast
all the operations within a computer take place.
Like most modern wristwatches, computers clock is driven by a quartz crystal.
When electricity is applied, the molecules in the crystal vibrate millions of times per second, a
rate that never changes.
Computer uses the vibrations of the quartz in its system clock to time its processing operations.
The faster the clock, the faster the processing.
The speed of the vibration is determined by the thickness of the crystal.
Computers clock speed is measured in hertz (Hz), which means cycles per second.
A computers clock speed is 133 MHz; it means that the computer can turn off and back on
again133000000 transistors within a second.
Over the years, computers clock speeds are increasing rapidly. The first PC operated at 4.77
MHz (megahertz). Now a processor with more than 1.5 GHz (gigahertz) is available today.
If the factors like memory, data bus, register size etc are kept equal, then a CPU operating at 300
MHz can process data more than twice as fast as the same one operating at 133 MHz.
WAYS IN WHICH PROCESSING SPEED ARE MEASURED
There are three ways in which processing speed of a computer is measured:
(i) Time to complete one machine instruction, in fraction of a second:

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

The speeds for completing one machine cycle are measured in ms (milliseconds)
for older and slower computers; in s (microseconds) for most microcomputers; in ns
(nanoseconds) for mainframes and in ps (picoseconds) for Supercomputer.

A millisecond is one-thousandth of a second i.e. 1 ms=10-6 s


A microsecond is one-millionth of a second i.e. 1 s=10-6 s
A nanosecond is one-billionth of a second i.e. 1 ns=10-9 s
A picosecond is one-trillionth of a second i.e. 1 ps= 10-12 s

(ii) Time to complete instructions, in MIPS (million of instructions per second):

Another measurement for processing speed is the number of instructions per


second that a computer can process.

Using this way, the processing speed is measured in MIPS (million of instructions
per second) or in BIPS (billion of instructions per second)

If a computers processing speed is 75 MIPS, it can perform 75 millions


instructions per second, i.e. 75x106=75000000 (seven core and fifty lakh) instructions per
second.
(iii) Time in floating-point operations per second (flops):

flops is a special kind of mathematical calculation which is used mainly with


Supercomputers.

It is normally expressed in mega-flops (millions of floating-point operations per


second), giga-flops etc.
MACHINE CYCLE

A machine cycle is a series of operations performed to execute a single instruction.

Each time the CPU executes an instruction, it takes a series of steps. The
completed series of steps is called a machine cycle.

A machine cycle itself can be broken down into two smaller cycles:
(a) Instruction Cycle (I-cycle):
In instruction cycle, the control unit fetches (gets) an instruction from mail memory
and decodes that instruction (determine what it means).
(b) Execution Cycle (E-cycle):
During the execution cycle, the ALU executes the instruction (performs the
operation on the data) and stores the processed results in main memory or a register.
At the beginning of the machine cycle (that is, during the instruction cycle), the CPU takes two steps:
1. Fetching:
Before the CPU can execute an instruction, the control unit must retrieve (or fetch) a command or
data from the computers memory.
2. Decoding
Before a command can be executed, the control unit must break down (or decode) the command
into instructions that correspond to those in the CPUs instruction set.
After that, the CPU is ready to begin the execution cycle:
i)
Executing
When the command is executed, the CPU carries out the instructions in order by converting them
into microcode.
ii)
Storing
The CPU may be required to store the results of an instruction in memory (but this condition is
not always required).
Machine cycle (instruction cycle and execution cycle) is illustrated below with how the CPU plays a
sound:
PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

RAM
Play sound

CIT-311

System Bus
Play sound sent over
bus to the CPU

Steps:
Play sound is sent from RAM to CPU
Control unit breaks the command into
instruction set the CPU can handle.

RAM
Play sound

Control Unit
Instruction1
Instruction2
Instruction13

Figure: Fetching and decoding


an instruction to play a sound

System Bus

Control Unit
Instruction1
Instruction2
Instruction13

CPU tells sound card


to play sound

Steps:
Control unit executes instructions 1 to 3
Command is sent over system bus to sound
card.

Sound card
Figure: The execution cycle
plays the sound.

PIPELINING/ PIPELINE PROCESSING

Most microprocessors execute instructions rapidly; newer ones can perform even faster by
using pipelining.

In this process, the control unit begins a new machine cycle- that is; it begins executing a
new instruction- before the current instruction is completed. Executions are performed in stages:
when the 1st instruction completes the fetching stage, it moves to the decode stage and a new
instruction is fetched.

In pipelining, each instruction is broken up into several parts. Once the 1st part of an
instruction is done, it is passed to the 2nd part. Since the 1st step in the line is now idle, the
pipeline then feeds a new step one.

Using this technique, newer microprocessors can execute up to 20 instructions


simultaneously.
PARALLEL PROCESSING/ MULTIPROCESSING

A computer system with more than one processor is said to be a multiprocessing (MP)
system.

Computers having multiprocessors can handle greater data flow, complete more tasks
in a shorter time (i.e. their speed increases rapidly), and can handle many input and output
devices.

Multiprocessor versions of PCs are available today which are commonly used as network
servers, Internet host computers, and stand-alone workstations.

The IBM 3090 computer has two to four processors, and the Cray X MP4 has four
processors.
SMP (Symmetric Multiprocessing):

It is a special form of multiprocessing that uses an even number of processors.

Its advantage is that the number of processors is limited to a power of two.


PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

Due to the limitation on the number of processors, it is easier to design system with SMP.

MPP (Massively Parallel Processing)

It is a processing architecture that uses hundreds to thousands of microprocessors in one


computer to perform complex tasks quickly.

Intel, in conjunction with the US Department of Energys Sandia National Laboratory,


constructed the worlds fastest supercomputer which includes more than 7200 Pentium Pro
processors. Its speed is 1.06 teraflops (trillions of floating point operations per second).
THE BUS SYSTEM
In microcomputer, the term bus refers to the paths between the components of a computer.
It carries all information and signals involved in the system operation.
There are three buses in microcomputer:
(i) Address bus,
(ii) Data bus, and
(iii) Control bus.
These buses connect the CPU to each of the memory and I/O elements so that data and
information can flow between the CPU and any of these other elements.
Like the processor, the buss speed is measured in megahertz (MHz), because it has its own clock
speed.
ADDRESS BUS
This is a unidirectional bus that carries binary address outputs from the CPU to the memory or
I/O (input/output) elements.
In a computer with 16-bit address bus, there are 216=65536 different possible addresses. Each of
these addresses corresponds to one memory location or one I/O element.
When the CPU wants to communicate (read or write) with a certain memory location or I/O
device, it places the appropriate 16-bit address code on its 16 address pin on the address bus.
These address bits are then decoded to select the desired memory location or I/O device.
The address bus is important because the number of wires in it determines the maximum number
of memory addresses. For example, with eight bits, 28=256 different values can be represented. If
the address bus contains 8 wires (i.e. 8-bits address bus), it can carry eight bits at a time and the
CPU can address only 256 bytes of RAM. A PC with 20-bit address bus can address
220bytes=1MB of RAM. A PC with 32-bit address bus can address 220bytes=4GB of RAM.
Therefore, the bigger the address bus, the CPU can address more memory and hence the bigger
memory size.
DATA BUS
This is a bi-directional bus
It carries data between the CPU and memory or I/O elements.
Actually, the bus is a group of parallel wires. Each wire on the data bus transfer one bit at a time.
An 8-wires (or 8-bit) data bus can move eight bits (1 byte) at a time, a 16-wires (or 16-bit) data
bus can transfer 16 bits (2 bytes) at a time, a 32-wires (32-bit) data bus can transfer 32 bits (4
bytes) at a time. With a wider data bus, the computer can move more data in the same amount of
time (or the same amount of data in less time).
Therefore, the number of wires in the data bus affects the speed at which data can travel
between hardware components.
In an 8-bit computer, the data bus can be either input or output, depending on whether the CPU
is performing a read or a write operation. During a read operation, they act as an inputs and
receive data that have been placed on the data bus by memory or I/O elements selected by the
address code on the address bus. During the write operation, the data bus acts as outputs and
place data on the data bus, which are then sent to the selected memory or I/O elements.

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

Newer model computers have a 64-bit data bus called the FrontSide Bus (FSB) that transfers eight
bytes at a time.
CONTROL BUS

This bus carries control signals from the CPU to the memory or I/O devices.

The signal of the control bus synchronizes the activities of the separate computer
elements.

The CPU sends some of these control signals (such as Read or Write) to the other elements
to tell them what type of operation is currently in process.
BUS STANDARDS/ BUS ARCHITECTURE
The components of a computer system communicate with one another through a series of wires (lines)
known as bus. There are several principal bus standards:

ISA Bus (Industry Standard Architecture)


This bus was developed by IBM (International Business Machine) for its personal
computer.
It is a 16 bit bus (At first it was 8 bit bus when developed)
This bus is still used in many computers to attach slower devices (such as modems and
input devices) to the CPU.
It works significantly for 286 microprocessor-based computers.

MCA Bus (Micro Channel Architecture)


This bus was developed by IBM for its PS/2 microcomputer. Its also supports 386
microprocessor-based computers.
It is a 32 bit bus
Expansion cards designed for ISA bus or EISA bus do not run in the MCA bus slot.
This bus was not backward compatible.

EISA Bus (Enhanced Industry Standard Architecture)


This bus is developed by a consortium of hardware developers.
It is a 32 bit bus
Expansion cards designed for ISA bus will run in the EISA slots.

PCI Bus (Peripheral Component Interconnect)


This bus is designed by Intel Corporation
It is a 64 bit bus
This bus was open domain i.e. allowing anyone to use it without Intels permission or
any payment to Intel.
This bus integrates new data types, such as audio, video, and graphics.
It is widely used in high-speed Pentium-based computers.

Accelerated Graphics Port (AGP) Bus


This bus allows the video card to access the systems RAM directly.
It increases the speed of graphics performance.

PREPARED

PCMCIA Bus (Personal Computer Memory Card International Association)


It is an open domain (i.e. allowing anyone to use it without permission), nonproprietary
bus standard
This bus is used for notebook, sub-notebook and palmtop computers.
It allows user to insert credit card-size peripherals such as memory cards, modems etc.
A card used in this bus is now called PC Card.

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

VESA Bus (Video Electronics Standard Association)


It is a local bus used to connect peripherals directly to the microprocessors.
It is a 32 bit bus.

USB Bus (Universal Serial Bus)


This bus is connected to the PCI bus
Unlike the PCI and AGP bus, USB is a hot swappable bus. (Hot Swappable means, a user
can connect and then disconnect a USB device without affecting the machine.
It allows connecting lower speed I/O devices to PC such as mouse, keyboard, flash
memory, etc. without having to go through a complex installation procedure.
USB supports up to 127 devices connected in either a daisy chain or hub layout.

PC Card Bus
A PC Card is about the size of a stack of four credit cards.
This bus is exclusively used on laptop computers.
Like USB, PC Card is hot swappable.
Common uses of PC Card include WiFi cards, network cards, and external modems.
This bus is an external extension of an internal PCI bus.

STANDARD EXPANSION PORTS


A port is a socket on the outside of the system unit that is connected to an expansion board on the
inside of the system unit.
Ports allow connecting common devices (such as monitor, printer, keyboard, modem, mouse,
speaker etc) to computer.
Without ports, computer would not boot properly.
Some commonly used ports are discussed below.

Serial Port:
A serial port, or RS-232 port, enables a line to be connected that will send bits one after the other
on a single line, like cars on a one-lane highway. This port is used principally for communication
line, modem, and mouse. Serial ports are frequently labeled COM for communications.

Parallel Port:
A parallel port allows lines to be connected that will enable for example 8 bits to be transmitted
simultaneously, like cars on an eight-lane highway. Parallel lines move information faster than
serial lines do, but they can transmit information efficiently only up to 15 feet. Thus parallel ports
are used principally for connecting printers.

Network Adapter Port/ Network Port:


This port allows computer to plug into a network or use a high-speed Internet connection.

Video Adapter Port/ Monitor Port:


This port is used to connect monitor outside the computer to the video adapter card inside the
system unit. This port is found either by the serial port or with the expansion card.

Audio Port:
There are typically audio ports on modern computers: one for connecting speaker, another for
connecting microphone and other for MIDI (musical instrument digital interface) port.

Modem Port:
This port connects computer to a phone line for accessing to the Internet.

Mouse and Keyboard Ports:


These ports connect the keyboard and mouse to the computer.

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

SPECIALIZED EXPANSION PORTS


In addition to the standard expansion ports, many PCS include some specialized ports. These ports allow
the connection of special devices, which extend the computers bus in unique ways. Some specialized
ports are discussed below:

SCSI Port (Small Computer System Interface)


The SCSI (pronounced as skuzzy) port provides an interface for transferring data at
high speed
It takes a different approach from standard serial or parallel ports.
Instead of forcing the user to plug multiple cards into the computers expansion slots, a
single SCSI adapter extends the bus outside the computer by way of a cable.
SCSI is like an extension cord for the data bus that can plug one SCSI device into
another to form a chain.
When SCSI devices are connected to one another and plugged into a single SCSI port,
they are called daisy chain.
Many devices use SCSI interface, for example, high-end hard disk drive, scanner, tape
drive, CD-ROM drive, flash disk, mouse, keyboard, modem, printer etc.

USB Port (Universal Serial Bus)


USB is a new expansion bus technology that currently enables the user to connect 127
different devices into a single port e.g. camera, flash disk, floppy disk, compact disk,
keyboard, mouse, modem, printer, scanner, etc.

USB has several features:


(i) It is a hot swappable bus. (Hot swappable means that users can switch USB
devices without rebooting the PC.
(ii) It is very easy to use, because after plugging in the device, it is ready to run.
(iii) USB supports 127 different devices to connect to the computer using a single port.

FireWire Port (IEEE 1394 Port)


This port was once found only on Macintosh computers, but it is now common in
IBM-compatible PCs.
It is an expansion bus technology that extends the computers bus to many peripheral
devices through a single port.
It is used to connect video devices such as camera. Many digital TV connections also
use FireWire.
It supports data transfer rates of up to 400 Mbps (mega bits per seconds)
Because IEEE 1394 compliant technology is so expensive, it is not expected the
dominant bus technology.

EXPANSION SLOTS AND EXPANSION BOARDS

Expansion slots are extension of computers bus that provide a way to add new
components to the computer. In other words, they are sockets on the motherboard into which you can
plug expansion cards.

The slots accept expansion boards (also called cards or adapters or simply boards)

Adapters serving as input and output purposes provide a port to which devices can be
attached.

Various adapters or cards are used in a PC such as display adapter (or video controller
adapter, or graphics adapter card), network interface card or adapter, sound card or adapter, internal
modem card, TV card, PCMCIA card or PC card etc.
PLUG AND PLAY
PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

It is a feature of an operating system that enables user to add new hardware devices to
the computer via an existing port or expansion slot without performing technically difficult
configuration procedures.

Plug and play compliant operating system can automatically detect a new hardware
component, check for existing driver programs that will run the new device, and load necessary files.
Depending on how the new device is connected, this process may require restarting the system for
taking effect the installed hardware component.

CPUS USED IN PERSONAL COMPUTERS


At present, there exist a lot of manufacturers in the processor market. Among them, Intel, Motorola,
AMD (Advanced Micro Devices) are the pioneer in the manufacturing of processors.
Intel Processors:
The Intel Corporation is the largest manufacturer of microchips in the world.
Intel first introduced its 4004 model microprocessor in 1971 and this processor was used in the first IBM
PC.
Intels most popular PC processors are the Pentium 4, Pentium III, Pentium III Xeon, and Celeron.
A newer Intel Processor named Itanium is a 64-bit processor which is used in high-performance
workstations and network servers.
Motorola Processors:
Freescale manufactured processors used in Apples Macintosh computers.
Its most popular processors are in the PowerPC

FACTORS AFFECTING THE PROCESSING SPEED OF A COMPUTER


Although all microcomputers have a CPU and memory, their power is not the same. The power or
computing power of a PC usually refers to the speed with which the computer processes data. More
computing power means faster processing. The CPU computing power is increasing rapidly as more
transistors are being placed on smaller chips. One reason the speed increases is because the distance
between the transistors is reduced.
The circuitry design of a CPU determines its basic speed, but several additional factors can increase the
processing speed of a CPU. These factors are:
Size of the register of the CPU:
The size of the registers indicates the amount of data with which the computer can work at any
given time. The bigger the register size, the more quickly the computer can process a set of data.
If the factors like memory, clock speed, data bus etc are kept equal, then a CPU with 32-bit
register can process data twice as fast as one with 16-bit register.
Size of memory (RAM)
More RAM means the computer can use bigger, more powerful programs, and those programs
can access bigger data files. The computer does not necessarily have to load an entire program
into memory to run it, but more of the program it can fit into memory; the faster the program will
run. For example, a PC with 12 MB of RAM is capable of running Microsoft Windows 98, even
though the program actually occupies about 50 MB of disk storage space. When you run
Windows, to program does not need to load all its files into memory to run properly. It loads only
the most essential parts into memory. When the computer needs access to other parts of the
program on the disk, it can unload, or swap out, non essential parts from the RAM back to the
hard disk Then the computer can load, or swap in, the program code or data it needs. If your PC
has 16 MB of RAM, you will notice a dramatic difference in how fast Microsoft Windows 98

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

runs because the CPU will need to swap program instructions between RAM and the hard disk
much less often.
Cache memory
Moving data between RAM and the CPUs registers is one of the most time-consuming operation
a CPU must perform, simply because RAM is much slower than the CPU. A partial solution to
this problem is to include a Cache memory in the CPU. When a program is running & the CPU
needs to read data or instructions from RAM, the CPU first checks to see whether the data or
instruction is in cache memory. If the data that it needs is not there, it reads the data from RAM in
to its registers but it also loads a copy of the data into the cache memory. The next time the CPU
needs that same data, it finds it in the cache memory and saves the time needed to load the data
from RAM. Frequently used programs that need a repeated operation is resided in cache memory.
Clock speed
Computers clock is used to time the processing operation of a computer. Clock speed is
measured in hertz (Hz), which means cycles per second. A computers clock speed is 133 MHz; it
means that the computer can turn off and back on again133000000 transistors within a second.
Over the years, computers clock speeds are increasing rapidly. The first PC operated at 4.77
MHz (megahertz). Now a processor with more than 1.5 GHz (gigahertz) is available today. If the
factors like memory, data bus, register size etc are kept equal then a CPU operating at 300 MHz
can process data more than twice as fast as the same one operating at 133 MHz.
Data bus
Each wire on the data bus transfer one bit at a time. Hence, an 8-wires (or 8-bit) data bus can
move eight bits (1 byte) at a time, a 16-wires (or 16-bit) data bus can transfer 16 bits (2 bytes) at a
time, a 32-wires (32-bit) data bus can transfer 32 bits (4 bytes) at a time. Therefore, the number
of wires in the data bus affects the speed at which data can travel between hardware
components. With a wider data bus, the computer can move more data in the same amount of
time (or the same amount of data in less time).
Address bus
The number of wires in the address bus determines the maximum number of memory addresses.
For example, with eight bits, 28=256 different values can be represented. If the address bus
contains 8 wires (i.e. 8-bits address bus), it can carry eight bits at a time and the CPU can address
only 256 bytes of RAM. A PC with 20-bit address bus can address 2 20bytes=1MB of RAM. A PC
with 32-bit address bus can address 220bytes=4GB of RAM. Therefore, the bigger the address bus,
the CPU can address more memory and hence the bigger memory size.
Coprocessor
A co-processor is a separate instruction-set processor that is closely coupled to the CPU and
whose operation is to enhance the processing speed of the main processor (CPU). Complicated
arithmetic operations like exponentiation and trigonometric functions are costly to implement in
the CPU hardware, while software implementations of these operations are slow. An arithmetic or
math coprocessor is used as the auxiliary processor to the CPU to provide fast, low-cost hardware
implementations of these special math functions. Newer CPUs have math coprocessor built-in.
Earlier CPUs did not have them, so many users choose to upgrade their machines by adding them.
CPU-MEMORY INTERCONNECTION
How does the CPU write data into memory and read data from memory?
A computers internal memory is made up of RAM and ROM that are constantly interfaced to the CPU
over three groups of signal lines or signal buses: Address Bus, Data Bus and Control Bus. Each of these
buses consists of several lines (the number of lines in each bus will vary from one computer to another).
PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

These three buses play a necessary role in allowing the CPU to write data into memory and to read data
from memory.
When a computer is executing a program of instructions, the CPU continually fetches (reads) information
from those locations in memory that contain (1) the program codes representing the operations to be
performed and (2) the data to be operated upon. The CPU will also store (write) data into memory
locations as dictated by the program instructions.

Address Bus

Memory

CPU
Data Bus

Control Bus
Figure: CPU-Memory Connection
WRITE OPERATION
When the CPU is sending data to another computer element, it is called a write operation and the CPU is
writing to the selected element.
READ OPERATION
When the CPU is receiving data from another computer element, it is called a read operation and the CPU
is reading from the selected element.
When the CPU wants to write data to a particular memory location, the following steps must occur:
Write Operation:
Step_1: The CPU supplies the binary address of the memory location where the data are to be stored. It
places this address on the address bus lines.
Step_2: The CPU places the data to be stored on the data bus lines.
Step_3: the CPU activities the appropriate control signal (for this case, memory write operation) using
the control bus.
Step_4: The memory decodes the binary address supplied by the CPU via address bus to determine to
which location is being selected for the store operation.
Step_5: Finally, the data on the data bus are transferred to the selected memory location.
Whenever the CPU wants to read from a specific memory location, the following steps must occur:
Read Operation:
Step_1: The CPU supplies the binary address of the memory location from which data are to be
retrieved. It places this address on the address bus lines.
Step_2: The CPU activates the appropriate control signal lines for the memory read operation.
Step_3: The memory IC decodes the binary address to determine which location is being selected for
the read operation.
Step_4:
The memory IC places data from the selected memory location on the data bus form where
they are transferred to the CPU.

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

DIRECT MEMORY ACCESS (DMA)

DMA is a facility used in the PC architecture which allows a peripheral to read or


write from main memory without the help of the CPU. That is, DMA (direct memory access) is a
technique for transferring data from main memory to a device without passing it through the CPU.

Computers that have DMA channels can transfer data to and from devices much
more quickly than computers without a DMA channel can. This is useful for making quick backups
and for real-time applications.

Some expansion boards, such as CD-ROM cards, graphics cards, network cards,
sound cards, disk drive controllers, etc are capable of accessing the computer's DMA channel. When
you install the board, you must specify which DMA channel is to be used, which sometimes involves
setting a jumper or DIP switch

On PCs, there are usually eight available DMA channels. Most sound cards are set
to use DMA 1.

Since the CPU is not involved in the data transfer operation and some amount of
the processing time is saved so it is FAST and brings about and overall increase in the performance of
the computer system.
Category of DMA Modes:
Several different DMA modes have been defined for the IDE/ATA interface; they are grouped into two
categories:
(i) Single word DMA modes- when these modes are used, each transfer moves just a single word
of data. This mode is slower than multiword DMA mode.
(ii) Multiword DMA modes- In this mode, a "burst" of transfers occurs in rapid succession, one
word after the other, saving the overhead of setting up a separate transfer for each word. This
of DMA is used in EISA and PCI equipped systems.
DMA Channels

Direct memory access (DMA) channels are system pathways used by many devices to
transfer information directly to and from memory. However, conflicts on DMA channels can cause
very strange system problems and can be very difficult to diagnose. DMAs are used most commonly
today by floppy disk drives, tape drives and sound cards.
Why DMA Channels were invented for data transfer

In computer not using DMA, the CPU would have to copy each piece of data from
the source to the destination. This is typically slower than copying normal blocks of memory since
access to I/O devices over a peripheral bus is generally slower than normal system RAM. During this
time the CPU would be unavailable for any other tasks involving CPU bus access. But it can continue
to work on any work which does not require bus access.

As you know, the processor is the "brain" of the machine, and in many ways it can
also be likened to the conductor of an orchestra. In early machines the processor really did almost
everything. In addition to running programs it was also responsible for transferring data to and from
peripherals. Unfortunately, having the processor perform these transfers is very inefficient, because it
then is unable to do anything else.

The invention of DMA enabled the devices to cut out the "middle man", allowing
the processor to do other work and the peripherals to transfer data themselves, leading to increased
performance. Special channels were created, along with circuitry to control them that allowed the
transfer of information without the processor controlling every aspect of the transfer. This circuitry is
normally part of the system chipset on the motherboard.

Note that DMA channels are only on the ISA bus (and EISA and VLB, since they
are derivatives of it). PCI devices do not use standard DMA channels at all.

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

How To Enable Direct Memory Access (DMA) In Windows


Microsoft Windows includes a Bus Mastering feature known as Direct Memory Access or DMA. When
this DMA feature is enabled, it basically allows your Hard Drive and CD Rom Drive to transfer their
information directly to and from memory without passing through the Microprocessor. Hence the
word, Direct Memory Access. In short, when your disk drives use Direct Memory Access to access
their information, this reduces the load placed upon your CPU and your system works faster.
Essentially, Direct Memory Access (DMA) is the theoretical data access rate of a Drive measured in
megabytes per second. For instance, an Ultra DMA-100 Hard Drive will theoretical access data at a
rate of 100 megabytes per second and an Ultra DMA-133 Drive will theoretical access data at a rate
of 133 megabytes per second. Therefore, this technical brief will show you how to enable Direct
Memory Access (DMA) on your Computer System.

How To Enable the DMA Setting On Your Hard Disk Drive


1. Go into your Control Panel by first clicking on the Start Button.
2. Then click on Settings and then click on the Control Panel icon.
3. Then Double click on the System icon to open up the System Properties
window.
4. Then click on the Device Manager tab at the top of the screen.
5. Now click on the plus sign [+] next to the Disk drives Icon to expand
that section.
6. Double click on your IDE Disk Drive to display the Properties Window.
7. Then click on the Settings Tab located at the top of the screen.
8. Within the Options section, You will see a white box next to DMA.
9. Placing a check mark into this white box will enable the high speed DMA
transfer setting.
10. Clearing an existing check mark from this white box will disable the DMA
transfer setting.
11. Then click on the OK button at the bottom of the screen to save your
settings.
12. And then click on OK to exit the System Properties Window.
13. Select Yes when Windows Prompts you to Restart your Computer now.
14. Repeat the above procedure on any additional Hard Drives you have in
your system.

How To Enable The DMA Setting On Your CD/DVD Rom Drive


1. Go into your Control Panel by first clicking on the Start Button.
2. Then click on Settings and then click on the Control Panel icon.
3. Locate the System icon and Double click on it to open up the System
Properties window.
4. Then click on the Device Manager tab at the top of the screen.
5. Now click on the plus sign [+] next to the CD ROM Icon to expand that
section.
6. Double click on your CD Rom Drive to display the Properties Window.
7. Then click on the Settings tab at the top of the screen.
8. Within the Options section, You will see a white box next to DMA.
9. Placing a check mark into this white box will enable the high speed DMA
transfer setting.
10. Clearing an existing check mark from this white box will disable the DMA
transfer setting.
11. Then click on the OK button at the bottom of the screen to save your
settings.
12. And then click on OK to exit the System Properties Window.
13. Select Yes when Windows Prompts you to Restart your Computer now.
14. Repeat the above procedure on any additional CD/DVD Rom Drives you
have in your system.

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

CPU DETAILS/ CPU FUNDAMENTALS

CIT-311

How To Enable DMA For Windows XP


For Windows XP, Direct Memory Access is not set for individual Hard Drives and CD Rom Drives as
depicted above. Instead, DMA is set for the Primary IDE Channel and the Secondary IDE Channel. In
short, each Channel allows us to have two devices connected for a total of four devices. These
devices can be a combination of Hard Disk Drives, CD Rom Drives, CDRW Drives, DVD Drives and
Tape Backup Drives etc. Therefore, if both channels are set for DMA access, then all the devices in
your system will be set to use DMA.

For Windows XP
1. Go into your Control Panel by first clicking on the Start Button.
2. Then click on the Control Panel icon located in the right column of the
Start Menu.
3. If your Start Menu is set to the Classic View, then begin by clicking on
the Start Button.
4. Then click on Settings, then click on the Control Panel icon to open up
the Control Panel.
5. Now, Double click on the System icon to open up the System Properties
window.
6. Now click on the Hardware tab located at the top of the screen.
7. Then click on the Device Manager button in the center area of the
screen.
8. Now click on the plus sign [+] next to the IDE ATA/ATAPI controllers to
expand that section.
9. Then double click on the Primary IDE Channel to display the Primary IDE
Properties window.
10. Then click on the Advanced Settings Tab at the top of the screen.
11. Now for Device 0, ensure that the Transfer Mode: selection is set to DMA
if available.
12. Then for Device 1, ensure that the Transfer Mode: selection is also set to
DMA if available.
13. Then click on the OK button at the bottom of the screen to save your
settings.
14. Then double click on the Secondary IDE Channel to display the
Secondary IDE Properties window.
15. Then click on the Advanced Settings Tab at the top of the screen.
16. Now for Device 0, ensure that the Transfer Mode: selection is set to DMA
if available.
17. Then for Device 1, ensure that the Transfer Mode: selection is also set to
DMA if available.
18. Then click on the OK button at the bottom of the screen to save your
settings.
Then close Device Manager and the Control Panel to return back to your Windows session.

PREPARED

BY:

KHAN MOHAMMAD AKKAS ALI, B.SC. (HONORS) M.SC IN CSE, JU

You might also like