Documente Academic
Documente Profesional
Documente Cultură
CHAPTER 4:
THE CENTRAL PROCESSING UNIT
Lesson outcome:
1) Select appropriate hardware technical specification and software for maximum
performance in computer system.
2) Identify the current trends in computer architecture such as multiprocessor, vector,
stack and RISC.
– The part of computer that performs the bulk of data processing operations is called the
central processing unit (CPU).
– The CPU is made up of three major parts; Control, Register set and Arithmetic Logic Unit
(ALU) as shown in Figure 1.
Register set – stores intermediate data used using execution of the instructions
Arithmetic Logic Unit (ALU) – performs the required microoperations for executing
the instructions
Control – supervises the transfer of information among the registers and instruct the
ALU as to which operation to perform.
Register set
Control
Arithmetic Logic
Unit (ALU)
1|Page
DFC 2053 (COMPUTER SYSTEM ARCHITECTURE)
In computing, the two-phase cycle used by the computer's central processing unit to process
the instructions in a program is a fetch and execute cycle.
Fetch Cycle
2|Page
DFC 2053 (COMPUTER SYSTEM ARCHITECTURE)
Execute Cycle
1. Processor-memory
data transfer between CPU and main memory
2. Processor I/O
Data transfer between CPU and I/O module
3. Data processing
Some arithmetic or logical operation on data
4. Control
Alteration of sequence of operations (e.g. jump)
Instruction execution may involve a combination of these
– The stack in digital computers is a group of memory locations with a register that holds
the address of top of element. This register that holds the address of top of element of the
stack is called Stack Pointer.
– Stack Operations
The two operations of a stack are:
– Implementation of Stack
In digital computers, stack can be implemented in two ways:
1. Register Stack
2. Memory Stack
3|Page
DFC 2053 (COMPUTER SYSTEM ARCHITECTURE)
Register Stack
A stack can be organized as a collection of finite number of registers that are used
to store temporary information during the execution of a program. The stack
pointer (SP) is a register that holds the address of top of element of the stack.
– Memory Stack
A stack can be implemented in a random access memory (RAM) attached to a
CPU. The implementation of a stack in the CPU is done by assigning a portion of
memory to a stack operation and using a processor register as a stack pointer. The
starting memory location of the stack is specified by the processor register
as stack pointer.
– Reverse polish notation :is a postfix notation (places operators after operands)
– (Example)
Infix notation A+B
Reverse Polish notation AB+ also called postfix.
– A stack organization is very effective for evaluating arithmetic expressions
A * B + C * D (AB *)+(CD *) AB * CD * +
( 3 * 4 ) + ( 5 * 6 ) 34 * 56 * +
– Evaluation procedure:
1. Scan the expression from left to right.
2. When an operator is reached, perform the operation with the two operands found on
the left side of the operator.
Replace the two operands and the operator by the result obtained from the operation.
3. (Example)
infix 3 * 4 + 5 * 6 = 42
postfix 34*56*+
12 5 6 * +
12 30 +
42
– Reverse Polish notation evaluation with a stack. Stack is the most efficient way for
evaluating arithmetic expressions.
Stack evaluation:
Get value
If value is data: push data
Else if value is operation: pop, pop evaluate and push.
4|Page
DFC 2053 (COMPUTER SYSTEM ARCHITECTURE)
Complex Instruction Set Computers (CISC) has a large instruction set, with hardware
support for a wide variety of operations. In scientific, engineering, and mathematical
operations with hand coded assembly language (and some business applications with hand
coded assembly language), CISC processors usually perform the most work in the shortest
time.
Reduced Instruction Set Computers (RISC) has a small, compact instruction set. In most
business applications and in programs created by compilers from high level language source,
RISC processors usually perform the most work in the shortest time.
RISC architecture
The first prototype computer to use reduced instruction set computer (RISC) architecture was
designed by IBM researcher John Cocke and his team in the late 1970s. For his efforts, Cocke
received the Turing Award in 1987, the US National Medal of Science in 1994, and the US
National Medal of Technology in 1991.
5|Page
DFC 2053 (COMPUTER SYSTEM ARCHITECTURE)
IBM RT PC
The RISC Technology Personal Computer (RT PC) was introduced in 1986, and featured the
32-bit RISC architecture.
IBM RS/6000
The IBM RS/6000 was released in 1990. It was the first machine to feature the IBM POWER
architecture. The RS/6000 has gone through several name changes throughout the years,
including IBM eServer™ pSeries®, IBM System p® and IBM Power Systems™.
6|Page
DFC 2053 (COMPUTER SYSTEM ARCHITECTURE)
Concept of Pipelining
A technique used in advanced microprocessors where the microprocessor
begins executing a second instruction before the first has been completed (instruction pre-
fetch). That is, several instructions are in the pipeline simultaneously, each at a different
processing stage.
The pipeline is divided into segments and each segment can execute its operation
concurrently with the other segments. When a segment completes an operation, it passes the
result to the next segment in the pipeline and fetches the next operation from the preceding
segment. The final results of each instruction emerge at the end of the pipeline in rapid
succession.
7|Page