CO Processor Activities

In the previous lesson, you learned about hardware part of a system. If you leave I/O then only CPU and memory is left in the system. In this lesson, you learn the relationship of CPU (Processor) with memory by understanding activities of a CPU.

Advertisements

The main function of CPU is to execute a program which is nothing but a set of instructions and data. A CPU gets the instruction as part of the response from memory.

CPU-Memory Relation
CPU-Memory Relation

Every memory location has an address. At this address, the instruction is located which gets as a response from memory. Sometimes the response is a data or operand.

Two major instruction processing phase of CPU is

  1. FETCH
  2. EXECUTE
CPU Phases
CPU Phases

During the execute phase, the data is fetched and operation is carried out on the data or operand. This major phase is known as Instruction Cycle.

The whole cycle is FETCH – DECODE – EXECUTE.

Suppose there is an instruction that fetch 3 unit of information and 3 unit for execute phase. Fetching one unit of information from memory over bus (called bus activity) which will be completed called Machine Cycle.

Instruction Cycle and Machine Cycle
Instruction Cycle and Machine Cycle

It is also possible that each machine cycle is divided into steps of small activities called the state of the processor. This small activity is controlled by the Basic clock of the computer.

Advertisements
Basic Clock
Basic Clock

Because the programs and data are stored, you have a Stored Program Digital Computer. This is known as VON NEUMANN Architecture, named after mathematician and physicist John von Neumann.

Digital Computer Architecture Overview
Digital Computer Architecture Overview

It is logical to say that CPU registers, bus width, and memory should be of an n-bit word, but not necessary. If registers in CPU have instructions and data, it need not fetch from memory.

CPU always gets what it does not have. Once it has everything then the execute phase happens.

Instruction Format

There may be one operand, two operands in the instruction. Also, there is zero operand instructions

for example, ADD R1  R2  where R1 and R2 are two operands.

Finally, instructions always start with decoding the instructions.

Advertisements

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.