![]() |
VOOZH | about |
In a single accumulator-based CPU, all arithmetic and logic operations use the Accumulator (AC) as the main register to hold intermediate results. This design is called a “One Address Machine” because instructions contain only one explicit address while the accumulator is used implicitly.
In a single accumulator CPU, the basic instruction format is:
The first operand is always taken from the Accumulator, and the second operand is fetched from the memory location specified by the address field. The result of the operation is then stored back into the Accumulator.
Single accumulator-based CPUs support two main categories of instructions:
These instructions move data between memory and the accumulator.
AC ← M[X]
M[Y] ← AC
Note: The accumulator is always the default destination or source for data movement.
These instructions perform arithmetic or logical operations using the accumulator and a memory operand.
For example:
MULT X: Multiplies the content of the Accumulator with the operand stored at memory location X.
AC ← AC * M[X]
Similarly, other operations can include ADD X, SUB X, AND X, OR X, etc.
The execution of an instruction in a single accumulator-based CPU typically involves the following steps:
Because the accumulator is used implicitly, the instruction length is shorter and execution is faster compared to architectures that must specify multiple operands explicitly.
Suppose we want to compute:
Z = (A + B) * C
Using a single accumulator-based architecture:
LOAD A ; AC ← M[A]
ADD B ; AC ← AC + M[B]
MULT C ; AC ← AC * M[C]
STORE Z ; M[Z] ← AC
This program uses the accumulator to hold intermediate results after each step. Notice that every operation involves AC, making the instruction sequence simple and compact.