Write code to implement the expression a b c d - e on 3-


1. Write a MARIE program using a loop that multiplies two non-negative numbers by using repeated addition. For example, to multiply 3 x 6, the program would add 3 six times (e.g. 3 + 3 + 3 + 3 + 3 + 3) or add 6 three times (e.g. 6+6+6). You should write and run the program using MARIE simulator. Also write the code with Address, Instruction, and Comments .

2. You are designing an instruction set for your computer. All the instructions are of same size (11 bits long). The size of an address field is 4 bits. You have already designed five 2-address instructions and 40 1-address instructions. How many 0-address instructions can still you can fit? Justify your answer.

3. Write code to implement the expression: A= (B + C) * (D - E) on 3-, 2-, 1- and 0-address machines. In accordance with programming language practice, computing the expression should not change the values of its operands.

Marking Criteria:

Code meets specification, is well documented with comments, and produces correct results for any inpout. Deals with wrong inputs and exhibits proper messages in case of inappropriate inputs.

Answers are correct and clearly show the calculations.
You need to Use MARIE Simulator to implement the code. Test the program using different combination of inputs, such as 3 and

6, 5 and 9, 2 and 18 etc. The output should have 18, 45, and 36 respectively. Also check using any or both 0s, such as 3 and 0, 0 and 8, 0 and 0 etc. In all case the output should be 0.
I need to see the screen shots of all these tests. You also need to place the code of work in the word document.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write code to implement the expression a b c d - e on 3-
Reference No:- TGS01398493

Expected delivery within 24 Hours