Qustion 1:Eamise this sample program earefully and answer the questions [20 mark
ID: 2292604 • Letter: Q
Question
Qustion 1:Eamise this sample program earefully and answer the questions [20 marks) LDAN ADD 7 ADD 4 HALT a Darisg the first fetch phase, what hinary number is loaded into the data During the first esecute phase the number is loadel into the alarctisfe Dariag the second fetch phase, what binary number is loaded into the data f e first late of the program is placed in the address 0000 0000, what is the address of the Int ADD Iastruction.. e) Hoe asy bytrs of memury are taken up ty tlhe programia What xmber i in the accamulator during the third fetch phase 4 2 Wiea the program is fiaished ranning, what is in the accumulator 14 b) Wkat is the final number in the program counter i What are the final contents of the address register D Wlat are the final contents of the data registerExplanation / Answer
a. LDA 8: ?LDA instruction copies or loads data into the accumulator via data register. So, after the execution of this instruction, data register will be loaded with binary equivalent of 8 i.e. 1000.
?b. ADD 7: ?ADD instruction adds the data i.e. 7 in this case with the data already loaded in to accumulator. So, during the first execute phase, the data 7 is loaded into the data register.
c. ADD 4: Content of the data register is the addition of 8 and 7 (in the previous step) which is 15. So, the binary equivalent of 15 i.e. 1111 will be loaded to the data register and it will be added with 4 i.e. 0100.
d. LDA 8 will consume 3 bytes and ADD 7 will consume 1 byte i.e. total 4 bytes are consumes.
?So, if the starting byte is 0000 0000, then after LDA 8, the byte address will be 0000 0011 and after ADD 7, it will be 0000 0100.
?According to the guidelines, first 4 parts have been solved.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.