Instruction opcode and operand

The instruction set is a collection of pre-defined machine codes, which the CPU is designed to expect and be able to act upon when detected. Different processors have different instruction sets, to allow for greater features, easier coding, and to cope with changes in the actual architecture of the processor itself. Each machine code of an instruction set consists of two separate fields:
opcode




operand

























































Opcode
The opcode is a short code which indicates what operation is expected to be performed. Each operation has a unique opcode. Uually mhemonics are used as a operand because it is easy to understand.
The opcode to do the work store the data from

         An instruction is an command to the processor to perfrom some the task on the specified data.


Operand
The operand, or operands, indicate where the data required for the operation can be found and how it can be accessed. The length of a machine code can vary - common lengths vary from one to twelve bytes in size.An operand may be the register,data or address of the data.Some instruction do not contain the operand field.
Opcode is the predefined work definition of the task to be performed by the microprocessor.


For example
lets consider an example of instruction
MOV A,B
here MOV is an opcode whose work is defined in the microprocessor to move the data
here A, B is the operand wto register A,B  are the operand.

No comments:

Post a Comment

its cool