Professional Documents
Culture Documents
3.0 Central Processing Unit: ITE 1922 - ICT Applications
3.0 Central Processing Unit: ITE 1922 - ICT Applications
Introduction
In the previous lesson, We discussed input and output devices in a computing system.
This lesson will focus in detail on the Central Processing Unit (CPU).
Learning outcomes
After completing this lesson, you will be able to,
Identify the main components of the CPU
Explain the use of main components of the CPU
Describe the functions of the CPU
The Central Processing Unit (CPU), or the processor, is the component in a digital
computer that interprets instructions and processes data contained in computer
programs. CPUs are one of the necessary components found in computers of any era,
along with primary storage and input/output facilities.
How powerful does a computer need to be? How fast is fast enough?
We may never know the ultimate answer to these questions because when it comes to
computer performance, the bar continues to be raised. In response to that, processor
developers make chips of ever-increasing speed and power.
The Central Processing Unit (CPU) is the ‘brain’ of a computer system. It is its
microscopic circuitry that serves as the main information processor in a computer. A
CPU that is manufactured using integrated circuits is known as a microprocessor. At
Standard CPUs contain processing units that interpret and implement software
instructions, perform calculations and comparisons, make logical decisions,
temporarily store information for use by other CPU processing units, keep track of the
current step in the execution of the program, and allow the CPU to communicate with
the rest of the computer.
We will discuss the main components, operations, and functions of the CPU in detail
in the sections that follow.
As shown in Figure 3.1, in the von Neumann architecture, the CPU has two main
components; namely, the control unit and the arithmetic logic unit (ALU).
(Courtesy:https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Von_Neumann_Architectur
e.svg/510px-Von_Neumann_Architecture.svg.png)
Control unit
This will coordinate and manage the operations of all parts of the computer. It
obtains the instructions from the memory, interprets them, and directs the operation
of the computer and it communicates with input/output devices to transfer data or
results from storage. However, it does not carry out any actual data processing
operations and storage of data.
The arithmetic section will perform arithmetic operations like addition, subtraction,
multiplication, and division. Through repetitive use of those operations, complex
operations will be performed.
Then the logic section will perform logic operations like comparing, selecting,
matching, and merging data.
There are four steps that nearly all von Neumann CPUs use in their operation. They
are fetch, decode, execute, and write back (see Figure 3.2).
Fetch
This involves retrieving an instruction (which is represented by a number or
sequence of numbers) from program memory. The location in program memory
is determined by a program counter (PC), which stores a number that identifies
its current position in the program. In other words, the program counter keeps
track of the CPU's place in the ongoing program.
This instruction from memory is used to determine the next step for the CPU.
Decode
This step breaks an instruction into parts that have significance to other
portions of the CPU. How the numerical instruction value is interpreted, is
defined by the CPU's instruction set architecture (ISA). Often, one group of
numbers in the instruction, called the op-code, indicates the operation
needed.
What is leftover of the number usually provides the information required for
that instruction, such as operands for an addition operation. Such operands
may be given as a constant value (called an immediate value), or indicate a
place to locate a value: a register or a memory address, as determined by some
addressing mode. In older designs, the portions of the CPU responsible for
instruction decoding were unchangeable hardware devices. However, in more
abstract and complicated CPUs and ISAs, a microprogram is often used to assist
in translating instructions into various configuration signals for the CPU.
Execute
During this step, various portions of the CPU are connected to perform the
desired operation. For example, if an addition operation is requested, ALU will
be connected to a set of inputs and a set of outputs. The inputs provide the
numbers to be added, and the outputs will contain the final sum. If the
addition operation produces a result too large for the CPU to handle, an
arithmetic overflow flag in a flags register may also be set.
Write back
The results of the execute step will be written to some form of memory.
Usually, the results are addressed to some internal CPU register for quick
access on subsequent instructions. In other cases, results may be written to the
slower, but cheaper and larger, main memory.
Many instructions will also change the state of digits in a "flags" register. These
flags can be used to influence how a program behaves since they often indicate
the outcome of various operations. For example, one type of "compare"
instruction considers two values and sets a number in the flags register
according to which one is greater. This flag could then be used by a later jump
instruction to determine the program flow.
Activity 3.1
Compare and contrast different types of processors. E.g. Intel, IBM and AMD processors.
Summary
Now we have completed the Lesson 3. In this lesson, we discussed about the
central processing unit of a computer system.
In the lesson 4, you will learn about different types of storage systems. Before you
go to the next lesson, complete the self-assessment Quiz 3 to check what you
have learnt in the Lesson 3.