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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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