Question: Problem Statement: A quick look at the mnemonics available in the MARIE instruction set indicate that MARIE does not support a division operation. We know

 Problem Statement: A quick look at the mnemonics available in the

Problem Statement: A quick look at the mnemonics available in the MARIE instruction set indicate that MARIE does not support a "division" operation. We know that division is really "iterative subtraction" (right...?), and a look at MARIE's mnemonics confirms that a subtraction operation is supported. You might want to code a solution in Java to get a sense of the mechanics for how iterative subrtraction can substitute for integer division. The divisor and dividend should be coded in as initialized values in the source program. The program should produce and display the quotient and the remainder (after all, your algorithm will produce both values). Be sure to use names (labels) that identify clearly the function of the data item. So that I may evaluate your work and give appropriate credit, please place the following in the drop:

  1. The source list -- this is the .mas (or .lst) file.
  2. Output from the test run -- this is a snapshot of the MARIE CPU/memory with the results in the output window after you have completed the division operation and displayed the result.
  3. The Test Plan -- this can be a text based file that shows the input data and anticipated output.

Problem Statement: A quick look at the mnemonics available in the MARIE instruction set indicate that MARIE does not support a "division' operation. We know that division is really "iterative subtraction' (right...?) and a look at MARIE's mne monics confirms that a subtraction operation is supported. You might want to code a solution in Java to get a sense of the mechanics for how iterative subrtraction can substitute for integer division. The divisor and dividend should be coded in as initialized values in the source program. The program should produce and display the quotient and the remainder (after all, your algorithm will produce both values). Be sure to use names (labels) that identify clearly the function of the data item. So that I may evaluate your work and give appropriate credit, please place the following in the drop: 1. The source list this is the .mas (or .Ist) file 2. output from the test run this is a snapshot of the MARIE CPU/memory with the results in the output window after you have completed the division operation and displayed the result. 3. The Test Plan this can be a text based file that shows the input data and anticipated output

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 Databases Questions!