The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
40 views

Consider an instruction for a hypothetical machine which supports all types of addressing modes, as shown below, with a blank space which might be filled to complete the instruction:
$ADD\: -\: \#2019$
Assuming the machine always seeks for the smallest possible instruction, which of the following statements about the instruction above is true in order to make it complete:

  1. A register-name must be placed to complete the instruction
  2. The instruction is complete and adds zero to $2019$ and store it in accumulator.
  3. The instruction is complete and conforms zero address mode and the value $2019$ is added to the value at top of the stack and the result is pushed onto the stack.
  4. The instruction is complete and conforms one address mode and the value $2019$ is added to the value inside accumulator and the result is stored back in accumulator.
asked in CO & Architecture by Boss (17.2k points)
edited by | 40 views

1 Answer

0 votes
For this instruction the smallest possible instruction can be obtained by not adding anything to the instruction. Since Zero addressing mode is not possible as the instruction already has one address in it, we need to use accumulator register which implements one address mode. Thus the instruction is complete and the value 2019 is added to the value inside accumulator and the result is stored back in accumulator.
answered by Boss (17.2k points)
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,117 questions
53,218 answers
184,618 comments
70,454 users