Exam-style question
Try this first
An instruction must use a value of 12. Describe how the instruction would be interpreted if it used immediate addressing, and contrast this with the interpretation if it used direct addressing and its operand were 12. State what additional location would be needed in the direct-addressing case.
Model answer
What a good answer should say
- With immediate addressing, the operand 12 is the datum, so the instruction uses the value 12 directly.
- With direct addressing, the operand 12 is an address, not necessarily the value to use.
- The processor must access the datum stored at address 12, where that address refers to a location in main memory or to a register.
Explanation
Why this works
The same written operand can have different meanings depending on the addressing mode. Immediate addressing treats 12 as the value itself.
Direct addressing treats 12 as a location identifier, so the datum must be obtained from the main-memory location or register associated with that address.
Common mistake
No common mistake is linked to this question yet.
