3.2 Register

A register operand is one that refers to the value of a register. Most processors, such as the 386, has a small number of registers to store values to be accessed frequently in the near future (the next few instructions).

The reason why there are few registers is two folded. First, a modern processor uses general purpose registers, which means all registers can be used as the source and/or destination operands of an instruction. This means that a switch must be implemented in silicon gates to let an instruction select any one register. This kind of switch is expensive in silicon.

Second, a register must keep up with the speed of the ALUs (arithmetic and logic units) of a processor. ALUs use combinatorial logic to implement operations like add, subtract, divide and etc. ALUs of a modern processor can perform one operation per CPU clock, which is extremely fast.

In order for registers to keep up with this speed, they must be physically close to the ALUs. However, only so many registers can be placed “close enough” to the ALUs to keep up with the speed of the ALUs. As a result, the number of registers is restricted.

A register operand can be a source operand (to use the value of a register as a source) or a destination operand (to update the value of a register).