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