The operation of a CPU is determine by the instruction it executes, referred to as machine instructions or computer
instructions. The collection of different instructions is referred as the instruction set of the CPU.
Each instruction must contain the information required by the CPU for execution. The elements of an instruction are
as follows:
Operation Code: Specifies the operation to be performed (e.g., add, move etc.). The operation is specified by a binary code, know as the operation code or opcode.
Source operand reference: The operation may involve one or more source operands; that is, operands that are inputs for the operation.
Result operand reference:
The operation may produce a result.
Next instruction reference:
This tells the CPU where to fetch the next instruction after the execution of this instruction is complete
Instruction Types
The instruction set of a CPU can be categorized as follows:
Data Processing:
Arithmatic and Logic instructions Arithmatic instructions provide computational capabilities for processing numeric
data. Logic (Boolean) instructions operate on the bits of a word as bits rather than as numbers. Logic instructions
thus provide capabilities for processing any other type of data. There operations are performed primarily on data in
CPU registers.
Data Storage:
Memory instructions Memory instructions are used for moving data between memory and CPU registers.
Data Movement:
I/O instructions I/O instructions are needed to transfer program and data into memory from storage device or input
device and the results of computation back to the user.
Control:
Test and branch instructions
Test instructions are used to test the value of a data word or the status of a computation. Branch instructions are then
used to branch to a different set of instructions depending on the decision made.
No comments
Post a Comment