Unit (CPU) (continued)
A brief introduction
to machine instructions and their representation.
Machine instructions are
the building blocks of all computer programs.
Each instruction does
only one very simple step in a computation.
Typical processors have
from a few dozen to a few hundred different machine instructions.
Each instruction is representated
by a unique binary string made up of fields:
opcode field: a few bits
representing what type of instructions it is; e.g., ADD, SUBTRACT, COMPARE,
operand fields: bits representing
one or more register numbers or a memory address where operands are to
be found and/or results are to be stored.
- As in a simple expression, an opcode is the designator of the operation to be executed, and the operands are the designators of the values to be used. Some machine architectures only permit one specific operand and assume that the other is contained in a special register (usually called the accumulator). Other machines permit multiple operands, including the possibility of one operand designating the next instruction to be executed.
Last Updated 01/05/2000