Figure 8-2, B.An example of instructions for a typical microcomputer.
normally defines the location that contains the operand
Instruction formats vary between microprocessors
and minicomputers and mainframe computers. As the
machine instructions are generally longer in larger
computers with their larger memory words, the
instruction format or how the instruction is translated
differs. Each instruction is composed of fields. The
lengths of instructions and the lengths and positions of
the fields differ depending on the instruction and the
computer. An operation (function) code is part of all
instructions. How the remainder of the instruction is
translated and the names assigned to the parts vary.
Lets take a look at two examples of computer
instruction formats, one for a microcomputer and one
for a mainframe. We begin with the op (function) code,
which is common to both; only the length differs.
A typical machine instruction begins with the
specification of an operation to be performed, the
operation (op) code. Refer back to figure 8-1. The op
code tells the computer/processor what basic operation
to perform. The op code, a part of every instruction, is
usually located at the beginning of each instruction
format. Following the op code is information, if
needed, to define the location of the data or the operand
on which the operation is to be performed. This
location in memory, called the operand address,
at the start of the operation (the source), or that will
contain the modified operand upon completion of the
operation (the destination).
The remainder of the instruction and how it is
structured differs from one computer or computer type
to another. The designators in each field and the
positions of the fields within the instruction determine
how the instruction will affect the operand, registers,
memory, and general flow of data in and out of the
computer. We discuss the fields and the designators as
we discuss the two instruction formats.
Microcomputer Instruction Formats
A basic 16-bit microinstruction is divided into a
number of separate fields. Refer to figure 8-3 as a
reference. Youll notice the lengths of the fields vary.
The op code is located in the most significant bits
(215 through 213). B (bit 212) tells the computer to use
all 16 bits as a word or divide the 16 bits into 8-bit bytes.
Figure 8-3.Example of microinstruction format.