Processor: Central Processing Unit (CPU)
 |
The CPU is the part of the computer that carries out
computation. |
 |
Computation is based on two operations:
-
Arithmetic operations: start with basic addition and
includes subtraction, multiplication, and division.
-
Logical operations: comparing two things (e.g., two
numbers).
|
 |
The CPU also manages the flow of data in the computer
(to/from memory, I/O). |
 |
The CPU operates by executing instructions upon data
that is stored in dynamic memory. |
 |
Instructions consist of two parts:
-
Opcode - the action to be performed (e.g., Add).
-
Operand - the data to be worked on (e.g., the data to
be added).
|
 |
Internal operation of the CPU, also called the "pipeline"
(see figure below) consists of four stages:
-
Fetch - get an instruction from dynamic memory
(outside the CPU chip).
-
Decode - analyzes the instruction to determine how it
should be processed. May also include looking at multiple instructions
for optimized processing.
-
Execute - use the ALU (arithmetic/logical unit) to
process the instruction (instruction sets are a limited group of commands
that a computer can do).
-
Store - send the result of the processing back to
memory or keep it in local registers (very fast, internal CPU memory) for
further processing. A bank of registers can be used to speed the
overall processing of data because you do not have to store them in external
dynamic memory.
|
 |
CPU Clock - typically a quartz crystal that provides a
timing pulse measure in microseconds to control the sequencing of
instructions. A single instruction may require a single clock cycle
whereas others may require two or three cycles. CPU performance is often
measured in cycles per second (Hertz) and is often clocked at millions (MHz)
and billions (GHz) of cycles. |
 |
Interrupts - the CPU depends on a bank of signals that
it checks to determine if outside devices (memory, I/O, keyboard, ports) need
attention. Interrupts have priorities and and are tracked for
sequencing. A stack is used by the CPU to keep track of the interrupts.
When the interrupt is triggered, an instruction is provided that tells the CPU
how to process it. |
 |
The internal structure of the CPU includes a data path to
move data and instructions around. The data path is typically
32-bits wide (64-bits are forthcoming). |
 |
To speed up a processor:
 |
Increase the clock speed. |
 |
Increase the width of the data path. |
 |
Create asynchronous CPU's, by taking the clock out, you
don't waste cycles with non-processing activities. |
 |
Improve the performance of the chip transistors, typically
by making them smaller.. |
 |
Decrease the distance between elements of the processor (the
wires, called "traces"). |
 |
Pipelining - moving and processing multiple
instructions simultaneously through the fetch, analyze, execute, and store
stages. Instructions are run through stages in parallel in which every
clock cycle is used to process instructions. CPUs with multiple
pipelines are called superscalar. |
|
 |
Specialized advanced processor architectures include:
 |
RISC (reduced instruction set computing), created in
the 1970's; the chip has a smaller set of instructions (by getting rid of
little-used instructions) that run at a very high speed. |
 |
SIMD (single instruction multiple data), uses
multiple parallel pipelines to process data simultaneously; a variation
called "vector computation" is used in super computers..
|
 |
VLIW (very long instruction word), complex
instructions (up to 128 bits) are simultaneously applied to multiple
pipelines. |
 |
Linked CPUs - running multiple processors by linking
address and data buses. |
|
 |
Special purpose CPU's:
 |
ASIC (application-specific integrated circuit) -
simpler processors designed to handle a limited set of tasks very
efficiently (e.g., automotive computer processors). |
 |
DSP (digital signal processor) - typically used to
handle audio/video analog data signals; applies techniques such as
transforming, compression/decompression, and removing interference; designed
to run at very high speeds (e.g., video codecs, and video/game processors). |
 |
FPGA (field programmable gate array) - change the
operation of the processor on the fly via special purpose transistors (e.g.,
used in target recognition systems to process complex, changing data
sets on the fly). |
|
 |
New approaches for CPUs:
 |
Supercooling - cooling the processor can increase
speed; problem is the hardware for cooling. |
 |
Optical computing - use optical switches for
processing (faster than electrical signals). |
 |
Biological computing - use DNA and enzymes to process
information. |
|
The following image illustrates the interaction of the data
and address busses and the CPU pipeline to process instructions and data
(use your browser refresh button to refresh the animation):

Key CPU Terminology
 | Address: the scheme that determines how computer memory is
organized. Modern computers typically depend on 32-bit schemes (there
are also 64-bit) that yield over 4 billion locations for storing data. |
 | Bus: the pathway in the computer that carries data between the
various parts (CPU, I/O) of the computer. |
 | Chipset: the group of chips that integrates the various discrete
components of the computer. |
 | Instruction: commands that are executed by a
particular CPU. For example ADD, SUB (subtract), FETCH, SAVE.
Typically consists of an opcode (what is to be done) and an operand (the data
that is operated on). |
 | Instruction set: the totality of instructions and how they are
organized for a particular CPU. Different vendors will use different
instruction sets (although they will have a great deal of commonality). |
 | Interrupts: signals from various system elements (e.g., I/O devices
such as the keyboard) that are checked by the CPU. |
 | Pipeline: the stages of fetch, decode, execute, and store that is
used by the CPU to process instructions. |
 | Register: short term, very fast, efficient memory within the CPU. |
|