You are on page 1of 5

lntegrated Training System

rlithql,at\ r..i,L n!r!qrla.a rlaaltle 2t4

Module 5.7 Microprocessors


lntroduction
The brain of a computer system is the central processing unit, which we generally refer to as the
CPU or mainframe. The central processing unit is the computer. lt is the CPU that processes
the data transferred to it from one of the various input devices, and then transfers either the
intermediate or final results of the processing to one of many output devices. A central control
section and work areas are required to perform calculations or manipulate data. The CPU is the
computing center of the system. lt consists of a control section, internal storage section (main or
primary memory), and arithmetic-logic section. Each of the sections within the CPU serves a
specific function and has a particular relationship to the other sections within the CPU.

Figure 7 .1 - A modern CPU is no bigger than a 10 pence piece

Registers are temporary storage places on the CPU. A register holds data waiting to be
processed by an instruction, or data that has already been processed (say, the result of adding
two numbers together).

The arithmetic logic unit, or ALU, acts as the CPU's calculator, performing the math and logic
functions dictated by the instructions.

5 Use and/or disclosure is


Module 5.7 Microprocessors governed by the statemenl
TTS lntegrated Training System on page 2 of this chapter
@ Copyright 2010
lntegrated Training System
*+*ig ned i'i ilttt*{;1ai"ien wit* 1*e
cii:*,ifi FrL.t.cc. i:k queil;nf $,acticf, ff ii

Fetch-decode-execute Cycle

The CPU consists of three basic instruction sets that help the CPU do its job:
.The instruction fetch grabs instructions from RAM or an area of memory located on the
CPU and feeds it to the Arithmetic Logic Unit (ALU).
.The instruction decode takes the instruction from the fetch and translates it so the CPU
understands it. lt then determines what steps are necessary to accomplish that
instruction.
.The instruction execute tells the ALU to carry-out a mathematical sequence on the data;
add, subtract, multiply, or divide.
INPUT OUTPUT

CENTRAL PROCESSING UNIT

CONTROL SECTION

I NTERNAL STO RAGE SECTION

INPUT OUTPUT
STORAGE STORAGE
AREA AREA

ARITHM ETIC-LOGIC SECTION

DATA FLOW

---l>
INSTRUCTION FLOW
...aa.aaaatar>
FLOW OF CONTROL

Figure 7 .2 -The CPU and the computer peripherals

6
Module 5.7 Microprocessors Use and/or disclosure is
governed by the statement
TTS lntegrated Training System
on page 2 of this chapter
O Copyright 2010
I ntegrated Training System
lle*ign*d in sssc*i*ti*n **itt the
clu*$*pr*.**.uh qu€$1,#n Gr€eti*e 6i#

Control Section
The control section manages and coordinates all the operations of the chip. lt lets the ALU know
when to calculate, tells the fetch when to grab a value, and tells the decoder when to translate
the value into an instruction.

The control section may be compared to a telephone exchange because it uses the instructions
contained in the program in much the same manner as the telephone exchange uses telephone
numbers. When a telephone number is dialed, it causes the telephone exchange to energize
certain switches and control lines to connect the dialing phone with the phone having thJ
number dialed. ln a similar manner, each programmed instruction, when executed, cluses the
control section to energize certain control lines, enabling the computer to perform the function or
operation indicated by the instruction.

The program may be stored in the internal circuits of the computer (computer memory), or it
may be read instruction-by-instruction from external media. The internally stored progiam type
of computer, generally referred to only as a stored-program computer, is the mosi practical type
to use when speed and fully automatic operation are desired.

Computer programs may be so complex that the number of instructions plus the parameters
necessary for program execution will exceed the memory capacity of a stored-program
computer. When this occurs, the program may be sectionalized; that is, broken down into
modules. One or more modules are then stored in computer memory and the rest in an easily
accessible auxiliary memory. Then as each module is executed producing the desired resulti, it
is swapped out of internal memory and the next succeeding module read in.

ln addition to the commands that tell the computer what to do, the control unit also dictates how
and when each specific operation is to be performed. lt is also active in initiating circuits that
locate any information stored within the computer or in an auxiliary storage device and in
moving this information to the point where the actual manipulation or modification is to be
accomplished.

The four major types of instructions are (1) transfer, (2) arithmetic, (3) logic, and (4) control.
Transfer instructions are those whose basic function is to transfer (move) data from one location
to another. Arithmetic instructions are those that combine two pieces of data to form a single
piece of data using one of the arithmetic operations.

Logic instructions transform the digital computer into a system that is more than a high-speed
adding machine. Using logic instructions, the programmer may construct a program with any
number of alternate sequences. For example, through the use of logic instructions, a computer
being used for maintenance will have one sequence to follow if the number of a given item on
hand is greater than the order amount and another sequence if it is smaller. The choice of which
sequence to use will be made by the control section under the influence of the logic instruction.
Logic instructions, thereby, provide the computer with the ability to make decisions based on the
results of previously generated data. That is, the logic instructions permit the computer to select
the proper program sequence to be executed from among the alternatives provided by the
programmer.

7
Module 5.7 Microprocessors Use and/or disclosure is
governed by the statement
TTS lntegrated Training System
on page 2 of this chapter
@ Copyright 20'10
I ntegrated Training System
De*igned i,.1 s$$cci*iion rujtii the
elub${pr*.c*. *k que$lion praeti** ai*

Control instructions are used to send commands to devices not under direct command of the
control section, such as inpuVoutput units or devices.

Arithmetic Logic Unit (ALU)


The arithmetic-logic section performs all arithmetic operations-adding, subtracting, multiplying,
and dividing. Through its logic capability, it tests various conditions encountered during
processing and takes action based on the result. As indicated by the solid arrows in figure 7.2,
data flows between the arithmetic-logic section and the internal storage section during
processing. Specifically, data is transferred as needed from the internal storage section to the
arithmetic-logic section, processed, and returned to the internal storage section. At no time does
processing take place in the storage section. Data may be transferred back and forth between
these two sections several times before processing is completed. The results are then
transferred from internal storage to an output unit, as indicated by the solid arrow (fig. 6.6).

Memory Section
The memory (internal storage) section of a computer is essentially an electronically operated file
cabinet. lt has a large number (usually several hundred thousand) of storage locations; each
referred to as a storage register. Every item of data and program instruction read into the
computer during the loading process is stored or filed in a specific storage address and is
almost instantly accessible.

The memory inside a CPU is often called the Registers:


.
The program counter is the register that holds lhe memory address of the current
instruction being executed. When the next instruction is to be fetched, this register is
incremented by the appropriate number of bytes.
.
Some CPUs contain a memory address register, which holds the address of the byte
being loaded. This doesn't necessarily mean the instruction byte, as several instructions
have one or more bytes as operands (i.e. that follow the instruction). Other CPUs don't
have this register. They simply increase the program counter and use it to fetch the next
byte(s) into memory.
.
General registers. These are sometimes called the Accumulators and index registers.
o
Status register (also called the condition codes register) which indicates various things
about the last calculation carried out. For instance, there is a zero flag (which is set to
true if the last calculation produced a zero), a carry flag (true if the last calculation
produced a carry out i.e. an overflow) etc.

Actually, the first step in loading instructions and data into a computer is to manually place
enough instructions into memory using the keyboard or electronically using an operating
system, so that these instructions can be used to bring in more instructions as desired. ln this
manner a few instructions are used to bootstrap more instructions. Some computers make use
of an auxiliary (wired) memory that permanently stores the bootstrap program, thereby making
manual loading unnecessary.

8 Use and/or disclosure is


Module 5.7 Microprocessors governed by the statemgnl
TTS lntegrated Training System on page 2 oi this chapter
O Copyright 2010
lntegrated Training System
Des Sneri !fi as$*craii+n ri lh tlre
ci"b*{ilr+.c+ ur fi#egtion pt#ft;{,e #;{l

The CPU Glock


Also called clock rate, this is the speed at which a CPU executes instructions. Every computer
contains an internal clock that regulates the rate at which instructions are executed and
synchronizes all the various computer components. The CPU requires a fixed number of clock
ticks (or clock cycles) to execute each instruction. The faster the clock, the more instructions the
CPU can execute per second. The clock cycle is the smallest operation any computer makes.

Clock speeds are expressed in megahertz (MHz) or gigahertz (GHz).

I Module 5.7 Microprocessors Use and/or disclosure is


governed by the statemenl
TTS lntegrated Training System on page 2 of this chapter
@ Copyright 2010

You might also like