Electronic – Which register holds the final arithmetic and logic results

alucpuregister

This Wikipedia page says

an accumulator is a register in which intermediate arithmetic and
logic results are stored.

So which register holds the final result?

Best Answer

That quote you put up refers to the perspectve of a complex calculation that uses various variables and constants. The final result will end up where the specification (for instance a high-level language statement) specifies that it should. Take for instance

A = ( 3 * B ) + C

It is clear that the final result must end up in A, because the statement says so. But most CPU's can't do this calculation without first calculating ( 3 * B ). So where should that value end up? That depends on the type of CPU architecture. In an accumulator architecture the statement would be translated to something like

LOAD B   ; accu == B
MULT 3   ; accu == ( B * 3 )
ADD C    ; accu == ( B * 3 ) + C
STORE A  ; A := accu

The accumulator (which is not explicitly mentioned in the instructions, because in an accumulator architecture it is the only option) is used to hold the intermidiate (and final!) result of the calculation.

These days acculmulator architectures are out of fashion because the speed difference between CPU and RAM would make them very slow. The dominant architectures are now register-register, where the destination of each calculation can be choosen from a set of registers. Typically these are also load-store architectures, where an operation can either access RAM data, or do a calculation, but not both. For such an architecture the statement could translate to

LOAD R0, [ B ]
LOAD R1, 3
MULT R0, R0, R1
LOAD R1, [ C ]
ADD R0, R0, R1
STORE [ A ], R0