question archive Be the Computer The first part of your challenge is to be the computer, and to follow the instructions to cakulate the result
Subject:Computer SciencePrice: Bought3
Be the Computer The first part of your challenge is to be the computer, and to follow the instructions to cakulate the result. You must use the "Matrix simulation" block above to simulate the results. (We suggest you use a pencil) Let's step through the first two instructions together Start at location (0:0). This tells us the length of the first instruction is 6, so the Instruction is "609023". This instruction means The command is "Assign the instruction value to the result address." The result address is (9:0:2) o The instruction value is J. So we should write "3" at (9:1) and "0" at (9:0/ -or "03" at (9:0:2). Move to the next instruction, which begins at location (0:6). The length of the instruction is 7, so the instruction is "7290212". This means: O The commend is "Multiply the instruction value by the result address." O The result address is (9:0 2). The instruction value is 12. . We multiply 12 by 3- calculating 36. o So we should write "6" at (9:1/ and "]" at (9:0) - or "36" at (9:0:2) Note that the previous values at (9:0:2) have been over-written! There you go - just keep on doing that until you find the STOP instruction, . What result is displayed on screen by the program? Be the Programmer Now you need to fix the program to remove the bugs from the logic. Use the "Fixed Matrix" below to "debug" the program with your fixes. Finally, simulate your results in the "Fixed Simulation" below. Fixed Matrix Fixed Simulation 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 9 36 7 1 49 What result is displayed on screen by YOUR program? 1490 HIP Programming An