First, in several places, Figure 4.1 shows data going to a particular unit as coming
from two different sources. For example, the value written into the PC can come
from one of two adders, the data written into the register file can come from either
the ALU or the data memory, and the second input to the ALU can come from
a register or the immediate field of the instruction. In practice, these data lines
cannot simply be wired together; we must add a logic element that chooses from
among the multiple sources and steers one of those sources to its destination. Th is
selection is commonly done with a device called a multiplexor, although this device
might better be called a data selector. Appendix B describes the multiplexor, which
selects from among several inputs based on the setting of its control lines. The
control lines are set based primarily on information taken from the instruction
being executed.