Question
Please Download MARIE and Datapath Simulators package from the following link: http://computerscience.jbpub.com/ecoa/3e/simulators.aspx In the package, there are four examples provided. Use the simulator to write
Please Download MARIE and Datapath Simulators package from the following link: http://computerscience.jbpub.com/ecoa/3e/simulators.aspx In the package, there are four examples provided. Use the simulator to write the MARIE assembly code and show the running results. In the submission, please provide both source code
(1) Find the seventh value of the Fibonacci number sequence. The following formula describes the sequence: Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n-1) + Fib(n-2). The program calculates Fib(7).
(2) Create a subroutine to implement the following statement in C language: int num = condition ? First number : Second number That is, if condition is 0, num gets the value of Second number; otherwise, it gets the value of First number. Consider two cases: a) condition = 1; b) condition = 0. Assume First number is 10, and Second number is 20.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started