Designing an instruction set for your computer

Assignment Help Basic Computer Science
Reference no: EM131052638

1. Write a MARIE program using a loop that multiplies two non-negative numbers by using repeated addition. For example, to multiply 3 x 6, the program would add 3 six times (e.g. 3 + 3 + 3 + 3 + 3 + 3) or add 6 three times (e.g. 6+6+6). You should write and run the program using MARIE simulator. Also write the code with Address, Instruction, and Comments .

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

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

Marking Criteria:

Code meets specification, is well documented with comments, and produces correct results for any inpout. Deals with wrong inputs and exhibits proper messages in case of inappropriate inputs.

Answers are correct and clearly show the calculations.
You need to Use MARIE Simulator to implement the code. Test the program using different combination of inputs, such as 3 and

6, 5 and 9, 2 and 18 etc. The output should have 18, 45, and 36 respectively. Also check using any or both 0s, such as 3 and 0, 0 and 8, 0 and 0 etc. In all case the output should be 0.
I need to see the screen shots of all these tests. You also need to place the code of work in the word document.
</pstyle="margin-bottom:>

Reference no: EM131052638

Questions Cloud

Direction of the catholic reformation : During the 1540s the turning point in the direction of the Catholic Reformation was exemplified by a. the Council of Trent, which invited Protestants to discuss their doctrines.
Considering two mutually exclusive projects : Lithium, Inc is considering two mutually exclusive projects A and B. Project A cost $95,000 and is expected to generate $65,000 in year one and $75,000 in year two. Project B COST $120,000 and it is expected to generate $64,000 in year one , $67,000 ..
Describe the modified internal rate of return : Describe the Modified Internal Rate of Return (MIRR) method for determining a capital budgeting project's desirability. What are MIRR's strengths and weaknesses?
Meaning of the terms beta and capital asset pricing model : In your own words, what is the meaning of the terms beta and capital asset pricing model? Select three stocks from the listing of the Dow Jones Industrial Average Stock Betas from Table 10.2 of the textbook. List these three stocks, along with their ..
Designing an instruction set for your computer : Write code 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.
Wars of independence in latin america : In 1825, as the Wars of Independence in Latin America ended, what were the most significant challenges that new nations-states faced as they struggled to establish stable governments?
Critic of the corporate liberal system in : Steinbeck gained national fame in the 1930s as a critic of the corporate liberal systemin his book about Dust Bowl refugees, The Grapes of Wrath. This point of view carries over into this World War II propaganda novel.
Find the expected rate of inflation during the next year : Given the following data, find the expected rate of inflation during the next year. r*, the real risk-free rate= 3% maturity risk premium on 10-year Treasury bonds=2%, but zero on 1-year bonds default risk premium on 10-year, A-rated bonds=1.5% liqui..
Cash flows shown in the chart if appropriate cost of capital : Proficient-level: Compute the NPV statistic for Project Y and tell [advise] whether the firm should accept or reject the project with the cash flows shown in the chart if the appropriate cost of capital is 12 percent.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Two packets over a medium at the same time

Which of the following condition is used to transmit two packets over a medium at the same time?

  Ethical debate on our information privacy

One lives in a world where the internet plays a pinnacle role in our day to day lives. Discuss how the internet has caused an ethical debate on our information privacy

  Description of what the computer considers

For your initial post, provide your own description of what the computer considers "TRUE" and what the computer considers "FALSE." Then, provide at least two code examples (original examples) that would return TRUE, and provide a description of what ..

  Construct and describe a tree

Construct and describe a tree that indicates the following: A college president has 2 employees who answer directly to him or her, namely a vice president and provost. The vice president and provost each have an administrative assistant.

  Scenario-holliman veterinary hospital

Holliman Veterinary Hospital has considered advertising on the radio and in newspapers in their community, but now has contacted you about the possibility of developing a better Web presence.

  The following reflect passing scores in a class versus time

the following reflect passing scores in a class versus time spent weekly preparing for that coursepassc011011011011time

  All pos- sible divisions of v into three substrings

Suppose Σ = {a, b, c} and v = v1, ..., vn, n = 3, v = abbc. Give all pos- sible divisions of v into three substrings, v = v1v2v3

  Network management specialist

You are an outsourced Network Management Specialist working for an intellectual property rights law firm that has just merged another law firm that specializes in filing and defending patents.

  Explaining notifier sends e-mail to system administrator

Suppose a notifier sends e-mail to the system administrator when a successful compromise of that system is detected. What are the drawbacks of this approach?

  Query decomposition

Query Decomposition

  Components of a warehouse management system

components of a warehouse management system

  Compute expected payback percentage of machine

Compute the expected "payback" percentage of the machine. In other words, for each coin played, what is the expected coin return?

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