Write a marie program to calculate fibonacci

Assignment Help Other Subject
Reference no: EM132293723

Assignment: Computers, data and programming

Answer the following Questions

Question 1.

a) Determine the value of base b if (152)b = 0x6A. Please show all steps.

b) Convert the followings: (Please show all steps; no marks will be awarded if no steps are shown)

i) 0xBAD into 3-base representation

ii) 3217 into 2-base (binary) representation

iii) 1235 into octal representation

iv) 21.218 into decimal representation

c) Given a (very) tiny computer that has a word size of 3 bits, what are the lowest value (negative number) and the highest value (positive number) that this computer can represent in each of the following representations?

i) One's complement

ii) Two's complement

iii) Signed Magnitude

Question 2.

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 and so on. 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.

Question 3.

a) What are the 'interrupts' in a computer system? Describe the approaches to deal with multiple interrupts in a system.

b) Analyse the benefits of using a multiple-bus architecture compared to a single-bus architecture for a computer system.

This assessment task will assess the following learning outcome/s:

be able to investigate and describe the essential elements of a computer and their functionalities.
be able to apply an understanding of data representations and calculations to practical situations.
be able to develop an elementary computer program.

Verified Expert

The assignment is about Computers, data and programming, where different questions have been answered related to the values and integer numbers, binary representation and Marie program have been developed. All the question have been attempted and codes are provided in .mas format.

Reference no: EM132293723

Questions Cloud

How will you evaluate the bidders : Define for the web development company what you want them to do, so that they can provide a good estimate for what you want delivered on your website.
List the ways in which an RTOS handles ISRs : List the three ways in which an RTOS handles ISRs in a multitasking environment
Analyze the company financial performance : Analyze the company’s financial performance. Do trends suggest that Fitbit’s strategy is working?
Most important elements of fitbit competitive strategy : What are the most important elements of Fitbit’s competitive strategy?
Write a marie program to calculate fibonacci : Analyse the benefits of using a multiple-bus architecture compared to a single-bus architecture for a computer system - Write a MARIE program to calculate
Calculate or use worksheet 4 to determine their net worth : Calculate or use Worksheet 4 to determine their net worth, and explain what it means. How would the Lees' ages affect your assessment of their net worth?
What is sustainable business strategy : What is a sustainable business strategy? how does it relates to operations and supply chain management?
How much did her employer pay toward fica : jazmin earned $51,250 this year. Calculate her total fica contribution for the year. How much did her employer pay toward fica?
Product features-benefits and perceptions of value for money : What is the relationship between product features/benefits and perceptions of value for money?

Reviews

Write a Review

Other Subject Questions & Answers

  Policy implications of modern biological theories of crime

Describe the policy implications of modern biological theories of crime. What are the social policy implications of biological and biosocial theories of crime

  How can more innovation from suppliers be achieved

What are the four enablers of purchasing and supply chain excellence? Which is the most important according to you? Why? How can more innovation from suppliers be achieved

  Effective treatment for depression

Cognitive behavioural therapy is the most effective treatment for depression. Critically evaluate this assertion using research evidence to support your answer.

  Discuss the social studies curriculum

Which of the following activities represents the civic ideals and practices theme withing the Social Studies curriculum

  What learning strategies would you use to accomplish

You are a manager in a company, and you want to increase company morale. What learning strategies would you use to accomplish that increase? What would you reward, and how?

  Define the various types of business entities

Considering the various types of business entities and their features, respond to the following questions

  Describing the use of spc tool

Describe the use of SPC tools used at D2D? How could these tools be applied to good effect in your company or another you know well? Give examples to support your answer.

  Examining the psychological assessment report

A psychological assessment report is created by psychology professionals to inform groups or individuals of the assessments appropriate for their current needs.

  Written report of your observations and analysis

The assignment will consist of two parts: 1) a redaction critical analysis of this passage using the provided synopsis (also available on Sakai; 5% of your final grade) and 2) the written report of your observations and analysis

  Creating an at-risk program

Imagine that you have been asked to serve on the advisory board for a new, alternative school program in your school district. The advisory board must specify the factors that will be considered in determining which students qualify for the program a..

  Discuss about the nervous system

Differentiate between the two major parts of the nervous system (Central versus Peripheral) in terms of their structures, substructures and functions.

  Research about the ethics for your city and state

Determine at least two (2) aspects in which ethics, morality, and law differ in regards to affecting the decisions of your local law enforcement officers.

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