Accumulator (computing)
Encyclopedia : A : AC : ACC : Accumulator (computing)
- The article is about a computer processor register. For other uses of accumulator, please see accumulator.
The canonical example for accumulator use is summing a list of numbers. The accumulator is initially set to zero, then each number in turn is added to the value in the accumulator. Only when all numbers have been added is the result held in the accumulator written to main memory or to another, non-accumulator, CPU register.
Modern CPUs usually have many registers, all or many of which may be capable of being used for calculations. The characteristic which distinguishes one register as being the accumulator of a computer architecture is that the accumulator (if the architecture were to have one) would be used as an implicit operand for arithmetic instructions. For instance, a computer might have an instruction like:
ADD memaddressThis instruction would add the value read from the memory location at memaddress to the value from the accumulator, placing the result in the accumulator. The accumulator is not identified in the instruction by a register number; it is implicit in the instruction and no other register can be specified in the instruction.
Some architectures use a particular register as an accumulator in some instructions, but in other instructions use register numbers for explicit operand specification. The common x86 microprocessor architecture is like this: the AX register is an accumulator (implicit operand) in some arithmetic instructions, but in other arithmetic instructions AX is one of several registers which can be specified.
References
- This article was originally based on material from the Free On-line Dictionary of Computing, which is [Foldoc licenselicensed] under the GFDL.
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
