This is the solution for Assignment 2 of ITC544 which covers topics like MARIE & ISA. It includes solutions to questions related to opcodes, memory, arithmetic expressions, and mnemonics.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Page1of4 Full Name Student ID No. ITC544 Assignment 2: MARIE & ISA
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
Page3of4 SubtTemp2 StoreSum/Total of nine memory accesses; given that we execute C+D first, the process can be carried out with 7 memory accesses. Given that the processor has more than three registers: LoadR1, A LoadR2, B AddR1, R2 LoadR3, C LoadR4, D AddR3, R4 // the operation does not required memory access SubtR1, R4 //The operation does not required memory access StoreSum // total of five memory accesses. Question 4 MnemonicHexDescription 0JnS XStore the PC address X and jump X+1 1Load XLoad Contents of address X into AC 2Store XStore the content of AC at address X 3Add XAdd the content of address X to AC 4Subt XSubtract the content of address X from AC 5InputInput a value from the keyboard into AC 6OutputOutput the value in AC to the display 7HaltTerminate program 8SkipcondSkip next instruction on Condition 9Jump XLoad the value of X into PC AClearPut all zeros in AC BAddl X Use the value of X as true address of the data operand to add to ACIndirect CJumpl XUse the value at X as the address to jump to DLoadl XUse the value at X as the address of the value to the Load IndirectEStorel XUse the value at X as the address of the location of storing value
Page4of4 a) Hexadecimal Code 100StartLOADA1108 101ADDB3109 102STORED210B 103CLEARA000 104 OUTPU T6000 105ADDlDB10B 106STOREB2109 107HALT7000 108A,HEX00FC00FC 109B,DEC14000E 10AC,HEX108108 10BD,HEX00000000 b) Symbol Locatio n A108 B109 C10A D10B Start100 c)The value stored in the ANC when the program terminates is 0108.