Program using a loop that multiplies two non-negative number

Assignment Help Basic Computer Science
Reference no: EM131048748

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.

Reference no: EM131048748

Questions Cloud

Number of warehouses closer to the end customer : Consider a firm redesigning its logistics network. What are the advantages to having a small number of centrally located warehouses. What are the advantages to having a larger number of warehouses closer to the end customer?
Which ones are equivalent : Are there any states that could be collapsed withoutchanging the result of any game? If so, which ones are equivalent?
Improve organizational performance : How do enterprise applications, collaboration and communication systems, and intranets improve organizational performance? Give examples to illustrate your answer.
A tropical rain forest affect the forest : Logging in the rain forest: contrasts. Figure 29.2 (page 29-5) gives basic ANOVA output for the study of the effects of logging described in Example 29.1. We might describe the overall effect of logging by comparing the mean species count for unlo..
Program using a loop that multiplies two non-negative number : 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.
Analyse house prices against all other variables : Analyse house prices against all other variables included in the dataset. Use appropriate descriptive techniques such as cross-tabulations, comparative summary measures, scatter diagrams to identify key relationships
Program that asks the user for the month and a positive n : Write a program that asks the user for the month (April, May, or June) and a positive integer n. Your program should then print two types of results. The first should report the title of the first movie that has first been rented (scanned) n times..
Learn test through short logical assessment : James and Jennifer Stolpa and their five-month old kid, Clayton, were stranded outside in a snowstorm for right around 8 days. These types of individuals were spared after James left Jennifer and Clayton in a natural hollow and climbed 31 mills in..
Accused of using non-job-related criteria : Many employers are accused of using non-job-related criteria in hiring decisions. The best management practice for an employer to use in refuting this type of allegation would mos likely be:

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Search the internet for owasp

Define the acronym and locate the most current top 10 Web-application security risks

  An alien species use 14-based numbering system.

An alien species use 14-based numbering system. Their ten digits, 0 through 9, are the same as our decimal system. They use A, J, Q and K to represent decimal 10, 11, 12 and 13, respectively. They hire you to write a program to do the summation of th..

  How does policy impact the discussion to disclose a breach

What does the current law say about companies having to release information / statements on a security breach?

  Force p that will cause impending motion

Determine the smallest force P that will cause impending motion.

  Code adds two numbers

Study the following Python code. This code adds two numbers. Then increments each number by 1 and displays the result: (input("Enter the value for x:"))

  Apply the tools and techniques in research and analysis

Project objective: 1.Apply the tools and techniques in research and analysis required to evaluate computer and information science products. 2.Describe how pipelining and superscalar processing improve the speed at which a computer program is execute..

  To increase productivity and information flow

To increase productivity and information flow, the organization for which you work decided to introduce Internet connectivity to its network. There are 500 people working for the organization, but the ISP from which they acquire Internet connec..

  Provide a separate bibliography

Provide a separate bibliography for each question

  Half sales office and half business office users

Create a 1-page network diagram showing the components and devices needed to build a simple office network based on the following scenario: 50 employees, half Sales office and half Business office users

  Patient care applications

Patient care applications

  Purchase a pre-built personal computer

Purchase a pre-built personal computer

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