Thanks, chemist.
I am making much more progress on this since you (all) have been pitching in.

Quote Originally Posted by chemist View Post
calculations are only performed on the contents of the accumulators
Ah. Yes, I see that. The calculations must happen on values, which must be stored in registers. As I said, the register's location makes a big difference in operation time. It makes sense that all operands would be within the chip at the time of operation.

Quote Originally Posted by chemist View Post
the accumulators have to be loaded with the values, either directly, indirectly or relatively to a register from values held in memory or pulled from a temporary stack.
I think I understand what you're saying here.

There are a few ways the accumulators can be set.
As I understand it, they basically boil down to one of 2 things:
1) They can be connected to another register, copying that data.
2) They can be connected to an input device, allowing a user to enter data.

Is that right?
Quote Originally Posted by chemist View Post
btw your temporary storage place is usually the stack which uses regular memory.
Your CPU will need a Stack Pointer.
And a Program Counter (which points to the next instructions memory location).
I know what a stack is, and there are FIFO and LIFO stacks.

I have gathered that using stack memory is common but not ubiquitous.
I.e. some processors use stacks and some don't.
Am I wrong there?


I am aware of pointers. I just don't think I have enough understanding of registers and accumulators to try to explain pointers. I have even deleted a couple of posts on pointers because I didn't like the way they read. Meaning, to me, that I don't understand them.

My basic understanding is to liken a register to a PO Box.
Both have an address, which is the way the post office (CU) refers to the location of the box.
Both have contents, neither the post office nor the CU are too interested in the contents.
Both have a name. The name is who uses the PO Box, or a user-assigned variable name to identify the register.

E.g.
int x = 5;
This command uses a register to store the number 5. Since I (the user) didn't tell it exactly which memory register to store it in, it picked an unused register for me. Now, I don't know the register's address, but when I tell the computer to operate on x, it treats 'x' like the register's address.

Does it use another register to hold the name of the variable? Then another register to hold the pointer to the data register's address?
I.e. If I say x = x + 3
It loads 3 into Accumulator B.
It selects addition.
It searches for x in a register.
It finds x, which is linked to a pointer to the location of 5.
It loads 5 into Accumulator A.
The result 8 is in Accumulator C.
It searches for x in a register.
It finds x, which is linked to a pointer to the location of 5.
It replaces 5 with the contents of Accumulator C, 8.


Can anyone critique this? Something seems wrong in the process of using a variable name to find a register's value.