Write codes to implement the expression

Assignment Help Assembly Language
Reference no: EM131487862

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.

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: EM131487862

Questions Cloud

Calculate the dealers maturity gap : Calculate the dealer’s maturity gap. Assume 360 days in a year. How can the dealer reduce the interest rate exposure of its portfolio? Be specific.
Define the ethical problems : There are a lot of great business majors. Check out the Careers in Business website at www.careers-in-business.com.
Nurse executive of a healthcare organization : You are the nurse executive of a healthcare organization. To ensure the organization's success, you must develop a strategic plan scenario to address.
What is the weighted average maturity of the assets : What is the weighted average maturity of the assets? What is the weighted average maturity of the liabilities?
Write codes to implement the expression : Write codes to implement the expression: A= (B + C * D - E) on 3-, 2-, 1- and 0-address machines. Write a MARIE program to calculate Fib(n)
Prepare balance sheet and retained earnings statement : Prepare in good form the condensed (1) balance sheet and (2) income statement and Retained Earnings Statement for the year ending December 31,2003.
A couple has child that will be entering kindergarten : A couple has child that will be entering Kindergarten, and their child care expenses will lessen.
Why are multinational corporations increasing : Assume you are an assistant financial analyst at an international corporation, Occulocorp, and you are interviewed by a radio broadcast journalist.
Identify the global societal problem : Identify the global societal problem within the introductory paragraph and conclude with a thesis statement that states your proposed solution.

Reviews

len1487862

5/8/2017 1:30:28 AM

Australian student, need it as per the guidelines. The code meets the specification. Code is well documented with comments. The program produces correct outputs in every input situations. Answers are corrects. All steps are correctly shown. All codes are accurately written. Please compose the answers in a document file (doc or docx format). Please do not submit in pdf formats. Please upload the document in the Turnitin within deadline. The first page (cover page) of the document file should have the following information clearly mentioned: Your full name, Your Student ID and Subject Code (ITC544). Assessment item number and name (Assignment 2: MARIE & ISA). Each page should have page numbers in “page x of y” format (including the cover page). You DO NOT need to provide any references for any of the questions.

Write a Review

Assembly Language Questions & Answers

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

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