Write codes to implement the expression

Assignment Help Computer Engineering
Reference no: EM132038489

Task

1. (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.[10 marks]

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

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

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

Rationale

This assessment task covers topics on CPU operation and Instruction Set Architecture, and has been designed to ensure that you are engaging with the subject content on a regular basis. More specifically it seeks to assess your ability to:
- be able to investigate the internal operation of the Central Processing Unit (CPU) and describe how it is used to execute instructions;
- be able to investigate and describe in detail the essential elements of computer organisation including internal bus, memory, Input/Output ( I/O) organisations and interfacing standards and discuss how these elements function;

Reference no: EM132038489

Questions Cloud

What is the expected price of the stock three years : What is the expected price of the stock three years from now?
Characterized as the market for corporate governance : The M&A environment as often been characterized as the market for corporate governance.
How do you think gtr long run of meeting or beating earnings : How do you think GTR's long run of meeting or beating earnings forecasts affected its cost of capital?
Trump steps up threats against harley-davidson : Is this just the first of many companies to ramp up overseas production, or do you think the US will dial back the tariffs to dissuade companies
Write codes to implement the expression : Computing the expression should not change the values of its operands - You are designing an instruction set for your computer
Describe what each category tells the user : Describe what each category tells the user about the financial health of a company. Choose three ratios in each category and describe what the ratios.
How much will be in your account after 10 years : How much will be in your account after 10 years? Round your answer to the nearest cent.
Investment and the cash flows to be realized in future : What are the differences between the dollars used for Investment and the cash flows to be realized in the future.
Discuss the intent of the study : Purpose of the Study - Discuss the intent of the study and list any research questions or hypotheses that were used.

Reviews

len2038489

7/3/2018 3:38:49 AM

1. For Q1(a) you need to submit a *.mas file. 2. Please compose the answers of 1(b), 2 and 3 in a document file (doc or docx format). Please do not submit in pdf formats. Please upload the document in the TURNITIN within deadline. 3. You may put the mas file and document file in a folder, compress the folder and upload the compressed file to the TURNITIN. You may also upload the two files separately. 4. The first page (cover page) of the document file should have the following information clearly mentioned: a. Your full name b. Your Student ID c. Subject Code (ITC544) d. Assessment item number and name (Assignment 2: MARIE & ISA) 4. Each page should have page numbers in “page x of y” format (including the cover page). 5. You DO NOT need to provide any references for any of the questions.

len2038489

7/3/2018 3:38:37 AM

Comprehension of internal elements of computer organisation Answers are corrects. All steps are correctly shown. All codes are accurately written. All answers are correct with a minor error. All codes are correct except a minor error. Few minor errors in calculating the address spaces. The steps show the clear understanding of the address space calculation. All codes written correctly however the order were not maintained correctly. The final result is not correct, however the calculations show the basic understanding of the instruction set architecture. More than half of the codes are correct. No attempt or incorrect calculations showing no or minimum understanding of the topic. Codes do not meet the specification.

len2038489

7/3/2018 3:38:33 AM

Criteria HD (85%-100%) DI (75%-84%) CR (65%-74%) PS (50%-64%) FL (0%-49%) Simulating and investigating of internal operations of CPU and it's instruction execution The code meets the specification. Code is well documented with comments. The program produces correct outputs in every input situations. Code meets specification and is well documented with comments. Minor errors in explanationse. Code meets specification. Most of the time produces correct results, however does not produce correct results for special inputs. Little documentation and comments. Code meets specification but has errors in operation. Little commenting. Basic idea is expressed by the codes and explanations. Code does not meet the specification.

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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