Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Meet ALL of the requirements:
using the logarithm provided below,
1. make a flowchart for it; provide flowchart
2. implement it in C code; provide code
3. implement it for MARIE structure (MARIE instructions); provide marie code
4. Provide number of instructions; provide text file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Systems For Physicians And Medical Professionals How To Use And Access Databases

Authors: Harley Bjelland

1st Edition

1878487442, 9781878487445

More Books

Students also viewed these Databases questions

Question

=+1 What are the major issues related to international T&D?

Answered: 1 week ago