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.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.