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