必须 CPU 有累加器吗?
Must CPU have an accumulator?
在你笑我之前:我想问算术运算是在ALU单元还是累加器中完成的。我看过一本书说累加器是做算术的寄存器。
这个Accumulator说
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.
这是否意味着没有累加器操作本身仍然可以完成?
我来自高级语言,我需要理解它。
是的,CPU 不需要累加器。例如,基于堆栈的处理器通常只有一个或两个堆栈指针而没有累加器。正如文章所说,这些处理器在操作之前从内存中加载要操作的值。
在你笑我之前:我想问算术运算是在ALU单元还是累加器中完成的。我看过一本书说累加器是做算术的寄存器。
这个Accumulator说
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.
这是否意味着没有累加器操作本身仍然可以完成?
我来自高级语言,我需要理解它。
是的,CPU 不需要累加器。例如,基于堆栈的处理器通常只有一个或两个堆栈指针而没有累加器。正如文章所说,这些处理器在操作之前从内存中加载要操作的值。