Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

ITE 1922 - ICT Applications Week 02

3.0 Central Processing Unit

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.

2.1 What is a CPU?

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

Central processing unit 1/7


ITE 1922 - ICT Applications Week 02

an advanced level, the CPU is several interconnected processing units each


responsible for one aspect of the CPU function.

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.

Modern microprocessors appear in everything from automobiles to smartphones to


children's toys. Chipmakers such as Intel, IBM, AMD, and others keep improving the
performance of microprocessors.

We will discuss the main components, operations, and functions of the CPU in detail
in the sections that follow.

3.2 Components of the Central Processing Unit

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).

Let us get to know them more.

Central processing unit 2/7


ITE 1922 - ICT Applications Week 02

Figure 3.1: Von Neumann architecture

(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.

Arithmetic logic unit (ALU)

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.

Central processing unit 3/7


ITE 1922 - ICT Applications Week 02

3.3 Operation of the Central Processing Unit

The fundamental operation of most CPUs is to execute a sequence of stored


instructions called a program. The program is represented by a series of numbers that
are kept in computer memory.

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).

Figure 3.2: Block diagram of a simple CPU


(Courtesy: http://en.wikipedia.org/wiki/Central_processing_unit)

Let us consider them one by one.

 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

Central processing unit 4/7


ITE 1922 - ICT Applications Week 02

its current position in the program. In other words, the program counter keeps
track of the CPU's place in the ongoing program.

After an instruction is completed, the PC is incremented by the length of the


instruction word in terms of memory units. Often the instruction to be fetched
need to be retrieved from relatively slow memory, causing the CPU to pause
while awaiting instruction to be returned.

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.

This microprogram is sometimes rewritable so that it can be modified to


change the way the CPU decodes instructions even after manufacture.

Central processing unit 5/7


ITE 1922 - ICT Applications Week 02

 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.

In loops, conditional program execution (through the use of a conditional


jump), and functions in programs manipulate the program counter rather than
producing result data directly. These are called "jumps".

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 is to find additional details about different types of processors.

Activity 3.1

Compare and contrast different types of processors. E.g. Intel, IBM and AMD processors.

Central processing unit 6/7


ITE 1922 - ICT Applications Week 02

Summary
Now we have completed the Lesson 3. In this lesson, we discussed about the
central processing unit of a computer system.

CPU or the processor is the component in a digital computer that interprets


instructions and processes data contained in computer programs. The fundamental
operation of most CPUs is to execute a sequence of stored instructions called a
program. There are four steps that nearly all von Neumann CPUs use in their
operation called fetch, decode, execute, and write back.

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.

Central processing unit 7/7

You might also like