Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

COA Assignment Task -

Q1. (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.

(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.

Q2. 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 5 2-address instructions and 45 1-address instructions. How many 0-address instructions still you can fit? Justify your answer.

Q3. Write codes 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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93115930
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Question whether in a scholarly or practitioner setting

Question: Whether in a scholarly or practitioner setting, good research and data analysis should have the benefit of peer feedback. For this Discussion, you will post your response to the hypothesis test, along with the ...

Question suppose you have created a program that creates

Question : Suppose you have created a program that creates instances of different types of cars. Now you are creating a program that keeps track of different types of cars. Choose the abstract classes and concrete classe ...

What is vsftpd name two other server packages that may be

What is vsftpd? Name two other server packages that may be used for the same purpose

A chemistry student needsnbsp150 ml of acetone for an

A chemistry student needs 15.0 mL of acetone for an experiment. By consulting the  CRC Handbook of Chemistry and Physics , the student discovers that the density of acetone is 0.790 g.cm^-3. Calculate the mass of acetone ...

1 potassium metal is very reactive with liquid bromine the

1. Potassium metal is very reactive with liquid bromine. The result of the reaction is the formation of a white ionic solid. Explain what happens to these elements when they form an ionic compound and write the formula f ...

Relational algebrawrite a relational algebra expression

[Relational Algebra] Write a relational algebra expression that will output first name and last name of computer science major male students who have borrowed books from "University of Iowa Main Library". Relational Sche ...

Question suppose we have virtual memory containing 32 pages

Question : Suppose we have virtual memory containing 32 pages with 512 bytes per page and physical memory with 16 page frames. How long is a virtual address? How long is a physical address?

Question part 1 conflict within teamsthink of a conflict

Question: Part 1: Conflict within Teams Think of a conflict that occurred in a team you were a part of and analyze it. What were the main sources of the conflict? What interventions can be used to improve the quality of ...

In the course of producing its output this firm causes

In the course of producing its output, this firm causes pollution. The government passes a law that requires the firm to stop polluting, and the firm discovers that it can prevent the pollution by hiring 0.2 workers for ...

Construct a frequency distribution for the number of

Construct a frequency distribution for the number of different residences occu-pied by graduating seniors during their college career, namely 1, 4, 2, 3, 3, 1, 6, 7, 4, 3, 3, 9, 2, 4, 2, 2, 3, 2, 3, 4, 4, 2, 3, 3, 5

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As