Q1(a). Please refer to Figure 4 of Unit 1 of Block 1 on page 11 of the Instruction execution example. Assuming a similar machine is to be used for the execution of the following three consecutive instructions: LOAD A; Load the content of Memory location A into the Accumulator Register. SUBT B; Subtract the content of memory location B from the Accumulator Register. STOR C; Stores the content of the Accumulator register to memory location C. However, this machine is different from the example in Figure 4 in the following ways: Each memory word of this new machine is 16 bits long. Each instruction is of length 16 bits with 4 bits for the operation code (opcode) and 12 bits for specifying one direct operand. The size of an operand is 16 bits. The Main Memory of the machine is of size 212 words. The three consecutive instructions are placed starting from memory location (10F)h ; operand A is at location (2FF)h and contains a value (2AC5)h, Operand B is at location (300)h and contains a value (1AEE)h and operand C is at location (301)h and contains a value (00000)h. The AC, IR, MAR and MBR registers are of size 16 bits, whereas the PC register is of size 12 bits. The initial content of the PC register is (10E)h.
- (i)) Draw a diagram showing the Initial State of the machine with the addresses and content of memory locations in hexadecimal. Show only those address locations of the memory that store instructions and data. Also, show the content of all the stated registers. (120 words)
- (ii)) Draw three more diagrams, each showing the state of the machine after execution of every instruction, viz. LOAD, SUBT and STOR. Show the changes in the values of Registers and memory locations, if any, due to the execution of the instruction. Show all the addresses and values in hexadecimal notation. (180 words)
- Machine architecture: 16-bit words, 4-bit opcode, 12-bit direct operand address.
- Instruction cycle: Fetch (MAR←PC, PC←PC+1, MBR←M[MAR], IR←MBR) and Execute phases.
- Register functions: PC for next instruction, AC for arithmetic, IR for current instruction, MAR for memory address, MBR for memory data.
- Hexadecimal arithmetic is vital for accurate data manipulation (e.g., subtraction).
Answer: The execution of instructions in a computer system involves a series of micro-operations that update the state of various registers and memory locations. This process is governed by the instruction cycle, which typically consists of fetch, decode, and execute phases. The provided scenario describes a custom machine, requiring the simulation of this cycle for three consecutive instructions: LOAD, SUBT, and STOR. Understanding the machine's architecture, including word size, instruction format, an...