There are several types of instructions a microprocessor can execute. Essentially, the instructions instruct the processor to execute calculations (Arithmetic Instructions) or memory data transfers (Transfer Instructions). The entire group of instructions is usually unique for a specific microprocessor and is called the instruction set of the microprocessor. This expression is also used in relation with the total number of instructions the processor can execute, we might often hear the phrase, “the processor has an instruction set of 176 instructions”.

The instruction set can be divided according to different criteria. For example, the instructions may be divided according to the type of action of the instruction. Then can be subdivided according to the type of operand the instruction requires or the way the instruction refers to an address.

Reference to addresses is called addressing. It is very important how the processor does the addressing and what addressing modes are supported by an instruction set. Addressing is not only referencing memory addresses but also registers in the CPU, but since these registers do not have numeric addresses as every memory cell has, there are separate instructions addressing the internal registers of the CPU.

Every instruction has a size in bytes which includes the size of the operands that the instruction must contain. The CPU automatically 'knows' the size for every instruction loaded from memory and adjusts the Instruction Pointer properly so as to point to the next instruction.

The operands of an instruction accepting two operands must be of equal size. An example is the case where the (two) operands are registers. Every register has a size (1 byte, 2 bytes, 4 bytes). In the case of the two registers as operands of an instruction, these registers must be of equal size. This means that you cannot transfer value from a small (in size) register into a bigger one without doing some lengthy, and pain-in-the-asslike workaround.

See also: transfer instructions, arithmetic instructions

Log in or register to write something here or to contact authors.