Re: Program 1976 Message #3 Posted by Kiyoshi Akima on 5 July 2006, 2:49 p.m., in response to message #1 by mountain
No, you get R9=((R3+R4)*R2)+R1
A stack diagram may make this clearer (top of stack to the right, X to the left):
Op X Y Z T
RCL 1 R1
RCL 2 R2 R1
RCL 3 R3 R2 R1
RCL 4 R4 R3 R2 R1
+ (R3+R4) R2 R1
* R2*(R3+R4) R1
+ R1+(R2*(R3+R4))
Each RCL puts a new item on the stack, pushing up the old contents. The operators work on the bottom one or two items.
Hope this didn't confuse you even more...
|