On an accumulator (one-address) machine, how many instructions are needed to compute X = (A + B) × C, counting the final store?
Correct answer C. 4
Explanation
The sequence is LOAD A, ADD B, MUL C, STORE X: one instruction per operand plus the store, because the accumulator is the implicit second operand and destination. A three-address machine needs only 2 (ADD T, A, B; MUL X, T, C). Fewer addresses per instruction mean shorter instructions but more of them, which is the central trade-off among zero-, one-, two- and three-address formats.
Answer checked How we write and check questions
Discussion