Accumulator (computing)
- Accumulator (computing)
In a
computer 's central processing unit (CPU), an accumulator is a register in which intermediate arithmetic and logic results are stored. Without a register like an accumulator, it would be necessary to write the result of each calculation (addition, multiplication, shift, etc.) to main memory, perhaps only to be read right back again for use in the next operation. Access to main memory is slower than access to a register like the accumulator because the technology used for the large main memory is slower (but cheaper) than that used for a register.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.
An accumulator machine, also called a 1-operand machine, or a CPU with
accumulator-based architecture , is a kind of CPU in which -- although it may have several registers -- the CPU always stores the results of most calculations in one special register -- typically called "the" accumulator of that CPU.Historically almost all early computers were accumulator machines; and manymicrocontroller s still popular as of 2008 (such as theFreescale 68HC12 and thePICmicro ) are accumulator machines.Modern CPUs are typically 2-operand or 3-operand machines -- the additional operands specify which one of many
general purpose register s (also called "general purpose accumulators" [cite web|url=http://www.freescale.com/webapp/sps/site/overview.jsp?code=DRMCRHC16OV&srch=1 |title=HC16 Overview |publisher=Freescale.com |date= |accessdate=2008-09-22] ) are used as the source and destination for calculations. These CPUs are not considered "accumulator machines".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 CPU might have an instruction like:ADD "memaddress"
This 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 other instructions use register numbers for explicit operand specification.
In the common
x86 microprocessor architecture, the 32-bit EAX register (or one of its subcomponents AX or AL, or part or all of the separate 32-bit EDX register for multiplication of large numbers) is an accumulator in some arithmetic instructions, such as MUL and DIV, but in other arithmetic instructions EAX is one of several registers that can be specified. For instance,MUL ecxwill multiply the contents of 32-bit register ECX by those of EAX and split the result between EAX and EDX (for 64 bits total, avoiding overflow).ADD, however, accepts two arguments:ADD ecx, edxwill add ECX and EDX and place the result in ECX, and likewise for most registers. [cite book |last= Irvine |first= Kip R. |title= Assembly Language for Intel-Based Computers |year= 2007 |edition= 5th edition |publisher=Pearson Prentice Hall |id=ISBN 0-13-238310-1 |pages=pp. 633, 622]History of the computer accumulator
Historical convention dedicates a register to "the accumulator", an "arithmetic organ" that literally accumulates its number during a sequence of arithmetic operations:
:"The first part of our arithmetic organ ... should be a parallel storage organ which can receive a number and add it to the one already in it, which is also able to clear its contents and which can store what it contains. We will call such an organ an Accumulator. It is quite conventional in principle in past and present computing machines of the most varied types, e.g. desk multipliers, standard IBM counters, more modern relay machines, the ENIAC" (Goldstine and von Neumann, 1946; p. 98 in Bell and Newell 1971).
Just a few of the instructions are, for example (with some modern interpretation):
* Clear accumulator and add number from memory location x
* Clear accumulator and subtract number from memory location x
* Add number copied from memory location x to the contents of the accumulator
* Subtract number copied from memory location x from the contents of the accumulator
* Clear accumulator and shift contents of register into accumulatorNo convention exists regarding the names for operations from registers to accumulator and from accumulator to registers. Tradition (e.g.
Knuth 's (1973) imaginaryMIX computer), for example, uses two instructions called LOAD ACCUMULATOR from memory/register (e.g. "LDA r") and STORE ACCUMULATOR in register/memory (e.g. "STA r"). Knuth's model has many other instructions as well.References
*Goldstine, Herman H., and von Neumann, John, "Planning and Coding of the Problems for an Electronic Computing Instrument", Rep. 1947, Institute of Advanced Study, Princeton. Reprinted on pp. 92-119 in Bell, C. Gordon and Newell, Allen (1971), "Computer Structures: Readings and Examples", McGraw-Hill Book Company, New York. ISBN 0070043574}. A veritable treasure-trove of detailed descriptions of ancient machines including photos.
Wikimedia Foundation. 2010.
Look at other dictionaries:
Accumulator — may refer to:* Accumulator (computing), in a CPU, a processor register for storing intermediate results * Accumulator (energy), an apparatus for storing energy or power ** Capacitor, in electrical engineering, also known by the obsolete term… … Wikipedia
Timeline of computing hardware 2400 BC–1949 — History of computing Hardware before 1960 Hardware 1960s to present Hardware in Soviet Bloc countries Artificia … Wikipedia
Mechanical calculator — An old Russian mechanical calculator. A mechanical calculator is a device used to perform the basic operations of arithmetic. Mechanical calculators are comparable in size to small desktop computers and have been rendered obsolete by the advent… … Wikipedia
Mechanical Concrete — A Mechanical Concrete tire derived cylinder … Wikipedia
Random access machine — In computer science, random access machine (RAM) is an abstract machine in the general class of register machines. The RAM is very similar to the counter machine but with the added capability of indirect addressing of its registers. Like the… … Wikipedia
ENIAC — [ Betty Jean Jennings (left) and Fran Bilas (right) operate the ENIAC s main control panel at the Moore School of Electrical Engineering. (U.S. Army photo from the archives of the ARL Technical Library)] ENIAC, short for Electronic Numerical… … Wikipedia
Register machine — This article s lead section may not adequately summarize its contents. Please consider expanding the lead to provide an accessible overview of the article s key points. (August 2011) … Wikipedia
Full moon cycle — The full moon cycle is a cycle of about 14 lunations over which full moons vary in apparent size and age (time since new moon). The sequence is *Full moon big (perigee at full moon) *Full moon young (perigee at first quarter) *Full moon small… … Wikipedia
Manchester Mark 1 — This article is about the early British computer. For the aircraft, see Avro Manchester and Avro 533 Manchester. The Manchester Mark 1 was one of the world s first stored program computers. The Manchester Mark 1 was one of the earliest … Wikipedia
Manchester Small-Scale Experimental Machine — Replica of the Small Scale Experimental Machine (SSEM) at the Museum of Science and Industry in Castlefield, Manchester … Wikipedia
