Please show step-by-step solutions, comments and explain in details. Thanks a lo
ID: 2291878 • Letter: P
Question
Please show step-by-step solutions, comments and explain in details. Thanks a lot!
2. An instruction stored in memory location xECEB is executed. Below you will see the contents of the registers before and after executing such an instruction a. Name the instruction that is being executed. (ADD, LD, ST, etc.) Hint a: the answer is unique b. Indicate all 16 bits stored in memory location XECEB Hint b: after you figure out the name of the instruction, you may find useful the LC-3 simulator to determine all 16 bits in the instruction. The correct answer cannot be found by checking the textbook Register RO R1 R2 R3 R4 R5 R6 R7 PC Before instruction is executedAfter instruction is executed x01FF x7BCD x8956 XAAAC x8BDE x8435 x47BD x3C3B XECEB X01 FF X7BCD x8956 XAAAC x8BDE x8435 x47BD XECEC X048EExplanation / Answer
Answer :- a) Here we can see that, R7 is changing from 0x3CEB to 0xECEC i.e. R7 is keeping the value of PC just after the 0xECEB. Hence it is an TRAP instruction.
Answer :- b) Thus out of 16-bit, MSB 8-bits are 1111 0000 XXXX XXXX . To find the LSB 8-bits, we need to use LC-3 simulator.