Why is the value for the instruction register 1106 for the load One instruction?

40 Views Asked by At

For this question:

Trace the fetch-decode-execute cycle for the following program:

1 .org 100

2              Load One

3              JnS IncRoutine

4              Halt

5 IncRoutine , HEX 0

6              Add One

7              JumpI IncRoutine

8 One ,        DEC 1

For the load One instruction:

  Step           RTL              PC  IR   MAR  MBR  AC  M[103]
Load One   (initial values)       100  -    -    -   -    -
Fetch       MAR←PC                100  -   100   -   -    -
            IR←M[MAR]             100 1106 100   -   -    -
            PC←PC+1               101 1106 100   -   -    -
Decode      MAR←IR[11-0]          101 1106 106   -   -    -
            (Decode IR[15-12])
Get operand MBR←M[MAR]            101 1106 106 0001  -
Execute     AC←MBR                101 1106 106 0001 0001  -

I do not understand where the 1106 came about for the instruction register as shown above. If someone could explain that would be great

1

There are 1 best solutions below

0
Tim Roberts On

1106 is the opcode for the Load One instruction. When it starts your trace, it hasn't even fetched the instruction yet. It loads the program counter into the memory register, then fetches the contents into IR. So, IR has "the instruction to be executed". The next step has to decode the instruction (1) and the address field (106).

By the way, it would have been somewhat easier if you had given us even the slightest clue where this came from. This is a fictional instruction set for some fictional computer, but without the details, we're just guessing.