subject

Consider the following MARIE Code: 100 If, Load X /Load the first value 101 Subt Y /Subtract the value of Y, store result in AC 102 Skipcond 400 /If AC=0 (X=Y), skip the next instruction 103 Jump Else /Jump to Else part if AC is not equal to 0 104 Then, Load X /Reload X so it can be doubled 105 Add X /Double X Store X /Store the new value 107 Jump Endif /Skip over the false, or else, part to the end of if 108 Else, Load Y /Start the else part by loading Y 109 Subt X /Subtract X from Y 10A Store Y /Store Y-X in Y 10B Endif, Halt /Terminate program (it doesn't do much!) 10C X, Dec 12 /Assume these values for X and Y 10D Y, Dec 20 Find the values stored in the following registers after the execution of "Skipcond 400" instruction: [5 marks] (i) PC (ii) IR (iii) MAR (iv) MBR (v) AC

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:00
Need ! will choose brainliest! discuss the role of abstraction in the history of computer software.
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
Computer security/cybersecurity1) each of the following code fragments contains a number of security vulnerabilities. for each fragment, identify these security vulnerabilities and, for each vulnerability, discuss at least one way that it could be improved. note that in your discussion of how each vulnerability could be improved, you do not need to re-write a new version of the program in c; simply discuss your solution, either in pseudocode or in 1-2 sentences.a) /* file descriptor leak */#include #include int main(int argc, char *argv[]){ char *filepath = argv[0]; char *shellpath = argv[1]; file *passwords; passwords = fopen(filepath, "r"); /* read the password and do something with it */ /* . . */ /* fork and execute alternative shell */ execl(shellpath, "shell", null); }b)#include /* assume the following function is written for an electronic storefront. the user will enter the id of the item to be ordered, as well as the quantity of units that they would like to purchase. the program will then lookup the price for the price for the item using a predefined function, and return the total cost of the order.*/int gettotalcost(){ char itemid[9]; int price, unitsordered, cost; printf(" enter the 9-digit id of the item to be ordered: "); scanf("%s", & itemid); /* lookup the price according to the itemid */ price = getpricebyid(itemid); printf(" enter the quantity of units to be ordered: "); scanf("%d", & unitsordered); cost = price * unitsordered; return cost; }c)#include /* the following function is intended to return a user's full name by concatenating the user's first and last name into a single string and then returning that string. */char *getfullname(char *firstname, char *lastname, int max_len){ char fullname[max_len]; strcpy(fullname, firstname); strcat(fullname, " "); strcat(fullname, lastname); return fullname; }d)#include /* the following code snippet runs through the list of cli arguments entered and displays them to the console. */int main(int argc, char *argv[]){ int i; printf("you've entered the following arguments: "); for(i = 0; i < argc; i++){ print(argv[i]); printf("\n"); } /* */}
Answers: 2
question
Computers and Technology, 25.06.2019 01:30
What was the advantage of using transistors instead of vacuum tubes in the second-generation computers? a. computers were drastically reduced in size. b. computers no longer produced errors. c. computers became affordable. d. computers could run on electricity.
Answers: 1
question
Computers and Technology, 25.06.2019 15:00
Most lo/to hazards occur under the following circumstances, except: a) regular operation b) maintenance c) cleaning d) repair
Answers: 2
You know the right answer?
Consider the following MARIE Code: 100 If, Load X /Load the first value 101 Subt Y /Subtract the val...
Questions
question
Mathematics, 17.10.2019 05:00
question
History, 17.10.2019 05:00
question
English, 17.10.2019 05:00
question
History, 17.10.2019 05:00
question
Mathematics, 17.10.2019 05:00
Questions on the website: 13722360