Hardware Reference
In-Depth Information
some computation. The data path is important in all machines and we will discuss
it at great length throughout this topic.
A+B
A
Registers
B
ALU input register
A
B
ALU input bus
ALU
ALU output register
A+B
Figure 2-2. The data path of a typical von Neumann machine.
The ALU itself performs addition, subtraction, and other simple operations on
its inputs, thus yielding a result in the output register. This output register can be
stored back into a register. Later on, the register can be written (i.e., stored) into
memory, if desired. Not all designs have the A , B , and output registers. In the ex-
ample, addition is illustrated, but ALUs can also perform other operations.
Most instructions can be divided into one of two categories: register-memory
or register-register. Register-memory instructions allow memory words to be
fetched into registers, where, for example, they can be used as ALU inputs in sub-
sequent instructions. (''Words'' are the units of data moved between memory and
registers. A word might be an integer. We will discuss memory organization later
in this chapter.) Other register-memory instructions allow registers to be stored
back into memory.
The other kind of instruction is register-register. A typical register-register in-
struction fetches two operands from the registers, brings them to the ALU input
registers, performs some operation on them (such as addition or Boolean AND),
 
Search WWH ::




Custom Search