Accumulator (computer)

from Wikipedia, the free encyclopedia

An accumulator is a register within a CPU in which the results of the arithmetic unit ( ALU ) are stored. Usually the accumulator register is permanently connected to the second input of the ALU. Today, individual accumulators only play a role in smaller microprocessors. Most 16- or 32-bit (or wider) processors use a larger number of accumulators, called data registers . See also: accumulator calculator

Without an accumulator, it would be necessary to save every result of a calculation ( addition , multiplication , logic operation , etc.) in the main memory and later reload it from there into the CPU. Access to the accumulator register is much faster than access to the main memory, since this register is integrated with the ALU in the CPU.

In particular in digital signal processing with a DSP , accumulators are used to calculate scalar products. For this purpose, the output of the multiplication unit is applied to an input of the adding unit . The output of the adder is connected to a register, which in turn is fed to the second input of the adder. The sum of products (the scalar product) is determined with this accumulator circuit. This operation is also called multiply accumulate .

In programming , too , a variable that contains intermediate results (e.g. in loops ) is sometimes referred to as an accumulator.