Page 71 - Computer_Science_F5
P. 71
Computer Science Step 4: Run the program and that operate on data (such as ALU, and
adders) and buses for transferring data
observe the following:
between elements. The Control part
(a) The values loaded into
(brain) of the processor commands the
registers $t0 and $t1.
datapath regarding when and how to route
FOR ONLINE READING ONLY
(b) The result of the addition
stored in register $s0. and operate on data.
(c) The result of the Instruction execution cycles
subtraction stored in The instruction cycle represents a series of
register $s1 steps that a CPU goes through to execute
a single machine instruction. As shown
Questions in Figure 1.60 in an instruction cycle,
1. Identify which registers were used the processor (1) fetches an instruction
as temporary registers and which from instruction memory, (2) decodes the
were used for storing results. instruction, (3) reads the addresses from
2. Explain how the li instruction (load memory, (4) executes the instruction, and
immediate) is used to load values (5) writes the result back to memory or
into registers. register.
3. Discuss the role of the add and sub Initiate
instructions in manipulating data
within registers.
4. Discuss how specific ISA Fetch
instructions (add, li, load, etc)
interact with registers.
5. Explain how registers contribute to Write
the overall efficiency of program Back INSTRUCTION Decode
execution. CYCLE
Instruction execution cycles Read
Datapath and control Executive Address
As you may recall, the CPU is the active
part of the computer that processes data Figure 1.60: Instruction cycle
and makes decisions. The CPU is made up
of datapath and control. Datapath consists Figure 1.60 shows which datapath
of the functional units of the processor. functional units are utilized at each
Datapath includes; elements that hold phase. An arithmetic instruction add r1,
data (such as Program counter, register r2, r3 (r1= r2+r3) has been used as an
file, and instruction memory), elements example to explain the concepts at each
62
for Advanced Secondary Schools
Computer Science Form 5.indd 62 23/07/2024 12:32