This is the first part in I hope a long series of short articles, which will explain some of the basics about the internal design of CPU's. In this first part we'll look at the registers, or more specific how the registers are used. A CPU usually contains a register file . Registers are needed because a CPU cannot directly work with data that is stored in the memory. So if the CPU wants to work with data it needs to copy this data to the registers and afterwards copy them back.
Question is now how the registers fit in here.
In general there are four ways to use the registers. The calculation would require three steps. Only one register is used. In this register first memory data A is placed. Then memory data B is added to the contents of the register.