Question: Use Marie simulator to solve this. You MUST include ALL the items stated below to receive an upvote. If they are not all present, I
Use Marie simulator to solve this. You MUST include ALL the items stated below to receive an upvote. If they are not all present, I cannot upvote, as they all solve the problem:
For Q2, please submit the following items.
- Write the algorithm in a flow chart as you saw in the screen. The arithmetic operations are limited to only addition and subtraction. You can use chart software such as Lucidchart, powerpoint, or Visio. Please export it to a pdf file (e.g., Q2.pdf)
- Implement the algorithm in C. The arithmetic operations are limited to only addition and subtraction. (e.g., Q2.c)
- A screenshot of the final execution states for a test case of your C code. Note your program needs to be general to take any input values using input instructions. However, a test input is used just to create a screenshot. (e.g., Q2.PNG)
- Implement the algorithm for MARIE architecture (e.g., Q2_MARIE.mas)
- A screenshot of the final execution states for a test case of your MARIE assembly code. Note your program needs to be general to take any input values using input instructions. However, a test input is used just to create a screenshot. (e.g., Q2_MARIE.PNG)
- The numbers of instructions in Q2_INSTRS.docx (Word document)
Q2. Logarithm (Iterative algorithm)
- Get a user input of two positive integer numbers: A and B where A is a base and B is an exponent of A
- Calculate C= Log base A of B
- Print C
Test case: A=2, B=16
Output should be 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
