3 The solution: registers

Registers solve both of the mentioned problems at once.

First, registers are next to the ALU in the processor. Furthermore, they are close enough physically to keep up with the speed of the ALU. This solves the problem about the latency of memory. Note that registers are not a part of memory. Instead, they are stand alone constructs in the processor.

Second, there are only few registers. This is due to physical limitations of the interconnections necessary to connect registers to the ALU. However, this apparent disadvantage solves our second problem. A processor that has 32 registers only needs 5 bits in each instruction to specify a value (10 bits for two values, and etc.). This significantly shortens instructions.

Of course, at some point, the ALU needs to get data from memory, or store results in memory. However, the use of registers greatly reduces such needs.