Write a MARIE program to calculate Fib

Assignment Help Applied Statistics
Reference no: EM132375128

Question 1 - MARIE Assembly

(a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the two preceding ones: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 114, ... etc.

By definition, the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two. We define Fib(0) = 0, Fib(1) = 1, Fib(2) = 1, Fib(3) = 2, Fib(4) = 3, etc. The first 22 Fibonacci numbers given below:

Fib(0)

Fib(1)

Fib(2)

Fib(3)

Fib(4)

Fib(5)

Fib(6)

Fib(7)

Fib(8)

Fib(9)

Fib(10)

0

1

1

2

3

5

8

13

21

34

55

 

Fib(11)

Fib(12)

Fib(13)

Fib(14)

Fib(15)

Fib(16)

Fib(17)

Fib(18)

Fib(19)

Fib(20)

Fib(21)

89

144

233

377

610

987

1597

2584

4181

6765

10946

Write a MARIE program to calculate Fib(n), where the user inputs n. For example, if the user inputs 7, the program outputs the value 13; if the user inputs 15, the program outputs the value 610; if the user inputs 20, the program outputs the value 6765 etc. You need to write and run the program using MARIE simulator. Please include appropriate comments to make your code readable.

Important: Please run the mas file in the MARIE simulator to check if it works correctly. Try inputting numbers like 0, 1, 5, 10, 22 etc.

(b) For some values of n, your program will not produce correct results. You can check this by gradually increasing the values of n and checking for the correct outputs. What is the maximum value of n for which your program produces a correct result? Why? Please comment on this.

Question 2 - Instruction Set Architectures

In a computer instruction format, the instruction length is 12 bits and the size of an address field is 5 bits. The system architect has already designed three 2-address instructions and thirty one 1-address instructions. How many 0-address instructions can still be possibly accommodated?

Rationale - This assessment task will work towards assessing the following learning outcome/s:

  • be able to define and appropriately use computer systems terminologies.
  • be able to describe the essential elements of computer organisation and discuss how the elements function.
  • be able to describe the basic instruction set architecture of a simple computer.
  • be able to discuss various programming tools available and their relationship to the computer architecture.

Reference no: EM132375128

Questions Cloud

Discuss the key factors for future competitive success : Discuss the key factors for future competitive success. List the common types of key success factors and answer the following questions:
What are the factors in steiner team performance equation : Explain how this equation can be applied when assessing team performance.
Examine health care delivery in the united states : The overall goal of the Session Long Project in this course is to examine health care delivery in the United States from a personal perspective, and provide.
Write report on special probation and parole client : Write a report on a special probation and parole client and the programs that have been established to address this problem client.
Write a MARIE program to calculate Fib : Question 1 - MARIE Assembly. Write a MARIE program to calculate Fib(n), where the user inputs n. Please run the mas file in the MARIE simulator
Why is it important to evaluate a team effectiveness : Why is it important to evaluate a team's effectiveness by other performance criteria besides team productivity?
What is the overall reason for marietta perceived : What is the overall reason for Marietta's perceived lack of enthusiasm and positive attitude? What are the primary causes for Marietta's perceived lack.
Differences that exist between nations affect tribunal : Why are tribunals very important among two or more countries? How can the cultural and political differences that exist between nations affect a tribunal?
Confidence interval estimation : Please provide one or more real world examples for use of confidence interval estimation (include sample size determination)

Reviews

Write a Review

Applied Statistics Questions & Answers

  Provide an explanation on the fields

Provide an explanation on the fields that you will use and the fields that you eliminated. What was your reasoning?

  Western clothing company produces denim jeans

1) Western Clothing Company produces denim jeans. Each month the company incurs a fixed cost of $10,000 and variable cost of $8 per pair of jeans. Demand for the jeans depends on the price (P) according to the following relationship: Demand = 1,500 -..

  Modeling the starbucks effect on sales prices

CQMS442 COURSE PROJECT - Modeling the Starbucks Effect on Sales Prices of Condominiums in Downtown Toronto. Starbucks brand now has much impact on many products including Yogurt. In this project, you are asked to collect the real estate data and mod..

  Find the z-score for eachof the following x values. x= 5

1. For a population with m = 50 and a standard deviation of s = 10,

  Right for the wife to refuse to have children

1) The 1996 GSS asked, "If the husband in a family wants children, but the wife decides that she does not want any children, is it all right for the wife to refuse to have children?" Of 708 respondents, 576 said yes.A) Find a 99% confidence interval ..

  The center on budget and policy priorities article

According to the Center on Budget and Policy Priorities article "Curbing Flexible Spending Accounts Could Help Pay for Health Care Reform" (revised June 10, 2009), flexible spending accounts encourage the over-consumption of health care; people buy t..

  Calculate the variance-covariance matrix

Calculate the variance-covariance matrix of the OLS estimator of β1.β2 and β3 and verify that:

  Find point estimates of confidence intervals

Find point estimates of and 95 percent confidence intervals for the true total number, t, and the true proportion, p, of overstated accounts among all of the investment firm's accounts.

  Approximate the probability that three cards of the same

Cards in a well shuffled deck will be turned over one at a time until the entire deck has been revealed. Approximate the probability that two cards of the same rank (e.g. two sevens or two queens) will be turned over sequentially (e.g. the jack of he..

  What is the perfomance statistics p value and is there suffi

Two orchestra's are auditioning for a spot in the finals.  Their performances were rated and received the following scores:  Orchestra 1:   n1 = 31, x1= 78, s1 =10..........Orchestra 2:  n2 = 30, x2 = 72, S2 = 14.   What is the perfomance statistics,..

  Prerequisites for using bayesian statistics

What does this theorem allow that traditional statistics do not? What are some prerequisites for using Bayesian statistics?

  Describe the importance of sampling

Describe the Importance of sampling,Probability and Non-probability Sampling,Strengths and weaknesses of each strategy,Sampling techniques for each strategy.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd