Calculate the number of cars you have

Assignment Help Computer Engineering
Reference no: EM133694400

Question: The CPU control unit determines the address in the memory to drive the value. Therefore, both variables num1 and num2 are stored in the Memory. To calculate the sum of num1 and num2 (line 3 in the program) would require four instructions:

Read num1 from Memory and put it in the register Input-1
Read num2 from Memory and put it in the register Input-2
Use the ALU to add the two values in Input-1 and Input-2 and write the sum to the register Output
Write the data from the register Output to the variable sum in Memory
We can express these operations using the following syntax:

READ [Source] [Destination]: Read the data from the source to the destination
WRITE [Source] [Destination]: Write the data from the source to the destination
ADD [Operand 1] [Operand 2]: Add the values in two operands and put the sum in the register Output
SUB [Operand 1] [Operand 2]: Subtract the value of Operand 2 from the value of Operand 1 and put the difference in the register Output
MUL [Operand 1] [Operand 2]: Multiply the values in two operands and put the product in the register Output
Using the notation above, sum the two numbers in num1 and num2 and put the total in the variable sum can be written as:

READ num1 Input-1
READ num2 Input-2
ADD Input-1 Input-2
Write Output sum
This notation is a type of programming language known as assembly language, in which the programmer specifies the sequence of instructions using only the fundamental operations of the computer. This is how early programmers had to write their programs.

Problem 1 (0.5 point)

Suppose you have a program that calculates the inventory for a dealership. The current number of cars you have by yesterday is stored in variable X, the number of cars you sold is stored in variable Y, and the number of new cars you get today is stored in variable Z. To calculate the number of cars you have by the end of today, you can subtract Y from X, then add Z, and store the result in variable R. Please Fill in the blanks with the necessary instructions for this calculation.

Reference no: EM133694400

Questions Cloud

Define application attacks, explain how threat actors : Define application attacks, Explain how threat actors use application attacks. Identify the different types of attacks
Find the ids of all students who were taught : Find the IDs of all students who were taught by an instructor named Einstein; make sure there are no duplicates in the result.
Write a java main method that does : Write a Java main method that does the following: 1) Ask the user for the name of a folder to be searched. 2) Validate the input. If the folder name
Explain the role of system and network architecture : Explain the role of system and network architecture in cybersecurity and their impact on an organization's security strategy. Discuss the process and importance
Calculate the number of cars you have : Calculate the number of cars you have by the end of today, you can subtract Y from X, then add Z, and store the result in variable R
Key truths god intends to communicate from these passages : What are the key truths God intends to communicate from these passages? Ask God to help you understand what this passage means to you.
Discuss the consequences of the breach : Analysis of Each Case Study: For each case study, students will: Describe the Incident: Provide a summary of what happened, including the type of application
Write an algorithm using pseudocode to convert the input : Write an algorithm using pseudocode to convert the input items into output items.4. Test the program by using 40 for hours_worked and $20 for the hourly_rate
What you would have done to mitigate or prevent the attack : Why are politicians, VIPs, and/or executives targeted. Research and write about three (3) attacks, and what you would have done to mitigate or prevent

Reviews

Write a Review

Computer Engineering Questions & Answers

  How do data mining and predictive analytics work

Should secondary use of consumer provided data be available without notice to the consumer? How do data mining and predictive analytics work?

  Explain briefly and provide valid references

what happened, how much information was taken, the steps to remedy it, and the fallout. Please explain briefly and provide valid references

  Difference between a hardware and a software version

Research on what is a forensic read/write blocker and what is the difference between a hardware and a software version? Research on what tools are available.

  How would your life beyond the program look like

Outcomes Anticipated from Completing the Degree Program-How Would Your Life Beyond the Program Look Like?How Prepared are You for the PhD Program?

  What type of cable would you recommend

What type of cable would you recommend? Use the media selection criteria introduced in this chapter to arrive at your answer.

  Create a small animation with a sprite sheet in netbeans

How to use Javascript to create a small animation with a sprite sheet in NetBeans .

  How you could benefit from using the network management tool

Wireshark is one of the most widely-used network protocol analyzers. It lets you see what's happening on your network at a microscopic level.

  What are the factors management

Based upon personal experience, describe some of the ways that a technology change has benefited a company that you work or worked for such as United Parcel Service? (List three technology changes).

  The combat identification server cids technology

the combat identification server cids technology demonstrator project tdp has been delivered on time with quality and

  Describe emerging enterprise network applications

Select a topic from the following list on which you would like to conduct an in-depth investigation. Emerging enterprise network applications.

  Describe an efficient filing system to store large word doc

Describe an efficient filing system to store a large number of Word documents on your personal PC.

  Create a stockio class that is used to write to a text file

Create a StockIO class that is used to read from and write to a text file using an ArrayList. Make sure to use a delimiter between the fields; it does not have to be the # character.

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