Question: A warehouse is controlled by an electronic lock having an n - digit combination. The electronic lock has ten buttons labeled 0 to 9 on

A warehouse is controlled by an electronic lock having an n-digit combination. The electronic lock has ten buttons labeled 0 to 9 on its face. To open the lock, a user presses a sequence of n buttons. The corresponding ASCII characters get loaded into sequential locations of memory, starting at location x3150. After n buttons have been pressed, the null character x00 is loaded into the next sequential memory location. The following program determines whether or not the lock should open, depending on whether the combination entered agrees with the combination stored in the n memory locations starting at x3100. If the lock should open, the program stores a 1 in location x3050. If the lock should not open, the program stores a 0 in location x3050. Note that some of the instructions are missing. Complete the program by filling in the missing instructions. Please enter your instructions as unspaced, 16 bit binary numbers.
HINT: It may be easier to solve this in a non-linear way. i.e. determine the instruction in x3008 before x3004, etc. Some missing instructions are easier to determine with the added context of other missing instructions being added
\begin{tabular}{|l|l|l|}\hline x3000 & 0101101101100000 & ;R5<x0000\\\hline x3001 & 0010000000001111 & ;R0<M[x3011]\\\hline x3002 & 0010001000001101 & ;R1<M[x3010]\\\hline x3003 & 0110010000000000 & ;R2<M[R0]\\\hline x3004 & & \\\hline x3005 & 0110011001000000 & ;R3<M[R1]\\\hline x3006 & 100101101111111 & ;NOTR3\\\hline x3007 & 0001011011100001 & ;R3<R3+1\\\hline x3008 & & \\\hline x3009 & 0000101000000100 & ; Branch to x300E if N or P is set \\\hline x300A & & \\\hline x300B & & \\\hline x300C & 000011111110110 & ; Branch always to x3003\\\hline x300D & & \\\hline x300E & 0011101001000001 & ; Store R5 in x3050\\\hline x300F & 1111000000100101 & ; HALT \\\hline x3010 & 0011000100000000 & ; x3100\\\hline x3011 & 0011000101010000 & ; x3150\\\hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!