logo

Question detail

Assume an accumulator and memory location 50 initially contain 0. Trace the following mnemonic instructions and state the final contents of the accumulator and memory location 50. Explain where immediate and direct addressing are used. LOAD #6 ADD #4 STORE 50 LOAD 50 SUBTRACT #3 HALT

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

Question

Type

practice

Style

Topic

Structure and role of the processor and its components

Exam-style question

Try this first

Assume an accumulator and memory location 50 initially contain 0. Trace the following mnemonic instructions and state the final contents of the accumulator and memory location 50. Explain where immediate and direct addressing are used. LOAD #6 ADD #4 STORE 50 LOAD 50 SUBTRACT #3 HALT.

Model answer

What a good answer should say

  • After LOAD #6, the accumulator contains 6.
  • ADD #4 changes it to 10.
  • STORE 50 copies 10 into memory location 50, so memory location 50 contains 10 and the accumulator remains 10.
  • LOAD 50 loads the value stored at memory location 50, so the accumulator is still 10.

Explanation

Why this works

The trace must distinguish an operand that is a value from an operand that identifies a memory address. STORE changes memory as well as leaving the accumulator unchanged; LOAD 50 then retrieves the stored value.

HALT ends the sequence and does not alter the values.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.