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 ndigit combination. The electronic lock has ten buttons labeled to 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 x After n buttons have been pressed, the null character x 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 x If the lock should open, the program stores a in location x If the lock should not open, the program stores a in location x Note that some of the instructions are missing. Complete the program by filling in the missing instructions. Please enter your instructions as unspaced, bit binary numbers.
HINT: It may be easier to solve this in a nonlinear way. ie determine the instruction in x before x etc. Some missing instructions are easier to determine with the added context of other missing instructions being added
begintabularlllhline x & & ;Rxhline x & & ;RMxhline x & & ;RMxhline x & & ;RMRhline x & & hline x & & ;RMRhline x & & ;NOTRhline x & & ;RRhline x & & hline x & & ; Branch to xE if N or P is set hline xA & & hline xB & & hline xC & & ; Branch always to xhline xD & & hline xE & & ; Store R in xhline xF & & ; HALT hline x & & ; xhline x & & ; xhline endtabular
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
