92 processor
ple, “add the contents of register one to the contents of register two
and store the result in register zero.” The microcode must be able to
activate and deactivate various devices within the CPU so data appear
on the appropriate bus at the right time in order to achieve the objec-
tive. Normally, microcode steps must be executed over several clock
cycles in order to do a single job. For example, in one clock cycle the
contents of register one may be placed on the data bus, the next clock
cycle will load that data into the ALU register, and so forth until the
entire process is complete.
Microcode is usually stored in ROM that is built into the CPU. This
is typically called “firmware” since it is a string of ones and zeros,
like software, but it cannot be changed, like hardware.
It is important to keep in mind the difference between instructions
contained in a software program (like Word) and those contained in
microcode. A single instruction in software is interpreted and exe-
cuted by the CPU using, perhaps, dozens of microcode steps. As an
example, the software may want to move a single byte from RAM to
the video card. The CPU may process that instruction by first moving
the byte from RAM to register one and then moving it from there to
the video card’s input register and then activating the video card in-
put function. Those moves may require several clock cycles as various
multiplexers and other devices are activated in the correct sequence
to move the data to its destination.
A software program, like Word, is nothing more than a series of
ones and zeros, organized into groups, commonly 64 in modern com-
puters. Each group of bits forms a single “word” of information; or
a single instruction which would then be used by the CPU to trigger
a microcode sequence. When viewed at the level of ones and zeros,
a software program is said to be in “machine code,” and could look
something like the following (note, only the first 32 bits of each word
are shown).
10010100101100101001101011001010
01101001101011000111101011101011
00011011110010000111010111100101
If a programmer could master machine code, then those programs
would be as concise and efficient as possible since they would be
written in machine code the CPU can execute directly. Of course, as
it is easy to imagine, no one actually writes machine code due to its
complexity.
The next level higher than machine code is called “Assembly” code.
Assembly uses easy-to-remember abbreviations to represent the vari-
ous CPU instructions available; and it looks something like this: