ADD and SUB require the use of an Arithmetic Unit (often generically known as an Arithmetic & Logic Unit - ALU). To minimise the number of connections to the ACC, we also use the ALU for LDA and STO. Each of these 4 operations can be performed by a series of steps, which turn out to be very similar from one operation to the next, and can be summarised by the following table, listing the steps in the order they are obeyed:
| ADD | SUB | LDA | STO | |
| send operand-location
|
||||
| read memory | ||||
| copy operand from memory
|
||||
| copy ACC contents
|
||||
| + | - |
|
|
perform action in ALU |
| (
|
||||
| ALU result
|
||||
| send operand-location
|
||||
| ALU result
|
||||
| write memory |
This is not needed for the 4 operations described above, but for JGE and JNE
we need to be able to test the current value in the ACC against the
appropriate condition (
0 or
0) and let the control unit know if the
result is true or false - maybe we could do this in the ALU as well, or maybe
there is some extra hardware directly attached to the ACC.