(ii) Draw three more diagrams, each showing the state of machine after execution of every instruction viz. LOAD, ADD and STOR. Show the changes in the values of Registers and memory locations, if any, due to execution of instruction. Show all the addresses and values in hexadecimal notations.

, , No Comments

 State After Execution of "LODA A" Instruction:


```

Memory:

+-----------+-----------+-----------+-----------+-----------+

| Address   |   Data    |           |           |           |

+-----------+-----------+-----------+-----------+-----------+

|  (11FE)h  | Instruction for "LODA A"                   |

|  (11FF)h  | Instruction for "ADD B"                    |

|  (2000)h  | Instruction for "STOR C"                   |

|  (1FFF)h  | Operand A (4321)h     | AC (4321)h         |

|  (1FFE)h  | Operand B (1FFE)h                         |

|  (0000)h  | Operand C (0000)h                         |

+-----------+-----------+-----------+-----------+-----------+


Registers:

- AC (Accumulator Register): 4321h

- PC (Program Counter): (11FF)h

- MAR (Memory Address Register): Not specified

- MBR (Memory Buffer Register): Not specified

- IR (Instruction Register): Instruction for "LODA A"

```


State After Execution of "ADD B" Instruction:


```

Memory:

+-----------+-----------+-----------+-----------+-----------+

| Address   |   Data    |           |           |           |

+-----------+-----------+-----------+-----------+-----------+

|  (11FE)h  | Instruction for "LODA A"                   |

|  (11FF)h  | Instruction for "ADD B"                    |

|  (2000)h  | Instruction for "STOR C"                   |

|  (1FFF)h  | Operand A (4321)h     | AC (4321+1FFE)h    |

|  (1FFE)h  | Operand B (1FFE)h                         |

|  (0000)h  | Operand C (0000)h                         |

+-----------+-----------+-----------+-----------+-----------+


Registers:

- AC (Accumulator Register): 6019h

- PC (Program Counter): (2000)h

- MAR (Memory Address Register): Not specified

- MBR (Memory Buffer Register): Not specified

- IR (Instruction Register): Instruction for "ADD B"

```


 State After Execution of "STOR C" Instruction:


```

Memory:

+-----------+-----------+-----------+-----------+-----------+

| Address   |   Data    |           |           |           |

+-----------+-----------+-----------+-----------+-----------+

|  (11FE)h  | Instruction for "LODA A"                   |

|  (11FF)h  | Instruction for "ADD B"                    |

|  (2000)h  | Instruction for "STOR C"                   |

|  (1FFF)h  | Operand A (4321)h     | AC (6019)h         |

|  (1FFE)h  | Operand B (1FFE)h                         |

|  (0000)h  | Operand C (6019)h                         |

+-----------+-----------+-----------+-----------+-----------+


Registers:

- AC (Accumulator Register): 6019h

- PC (Program Counter): (2001)h

- MAR (Memory Address Register): Not specified

- MBR (Memory Buffer Register): Not specified

- IR (Instruction Register): Instruction for "STOR C"

```


These diagrams represent the state of the machine after the execution of each instruction, showing changes in values of registers and memory locations in hexadecimal notations. The values in the Accumulator Register (AC), Program Counter (PC), and memory are updated based on the executed instructions.

0 टिप्पणियाँ:

Post a Comment