What is a micro-instruction?
A micro-instruction is a simple command that makes the hardware operate
properly. The format is unique to each computer, but our example has a 24
bit micro-instruction. Our instruction is broken down into nine parts:
-
Bits 0-6: ADDR This part of the micro-instruction is used
to specify a point in the code to jump to next. Whether or not the jump
is made depends upon the result of the ALU operation (see bits 21-23) and
the COND field (see bits 7-8). It is just the number of another
micro-instruction in the
control store.
-
Bits 7&8: COND This part of the micro-instruction
determines whether a jump in the code should be made, or if simply the
next instruction is to be executed. It can have the following values:
- 00: Never jump.
-
01: Jump if the ALU's N bit is 1.
- 10: Jump if the ALU's Z bit is 1.
- 11: Always jump.
-
Bits 9-11: A This part of the micro-instruction is used
to determine what register will be the
first input to the ALU. It is simply a
number from zero to seven.
-
Bits 12-14: B This part of the micro-instruction is used
to determine what register will be the
second input to the ALU. If the second input
is not used, this field's value does not matter.
-
Bits 15-17: C This part of the micro-instruction is used
to determine where the output from the ALU
is stored, and again is just the number of a
register.
-
Bit 18: ENC This part of the micro-instruction is used to
determine whether or not the ALU's output is
stored in the register specified by the
C field (see bits 15-17). If the instruction were just testing to see if
a number was zero, for example, the result would not need to be stored
anywhere, only the Z flag from the ALU would be important.
-
Bit 19: WR This part of the micro-instruction is used to
determine whether or not the contents of the MBR
register are written to
RAM. It also uses the MAR register to
determine which address to write to.
Every write takes two cycles (in our
example), so a write started in one instruction must be continued in the
next.
-
Bit 20: RD This part of the micro-instruction is used to
determine if the MBR register is filled
with a word from
RAM. It uese the MAR register to determine
which address to read from. Like a
write, a read also requires two
cycles.
-
Bits 21-23: ALU This part of the micro-instruction is
used to determine what operation the ALU
performs on its inputs.
[Next topic: How does a program run?||
Return to questions list||
See the Applet||
Home||
Index and Glossary]
For comments or suggestions,
write to us.