1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nostrana [21]
3 years ago
5

For the LEGv8 assembly instructions below, what is the corresponding C statement? Assume that the variables f, g, h, i, and j ar

e assigned to registers X0, X1, X2, X3, and X4, respectively. Assume that the base address of the arrays A and B are in registers X6 and X 7, respectively. LSL X9. XO. #3//X9 = f*8 ADD X9. X6. X9//X9 = &A[f] LSL X10. X1. #3//X10 = g*8 ADD X10. X7. X10//X10 = &B[g] LDUR X0. [X9.#0]//f = A[f] ADDI X11. X9. #8 LDUR X9. [X11. #0] ADD X9. X9. X0 STUR X9. [X10. #0]
Computers and Technology
1 answer:
lana66690 [7]3 years ago
7 0

Answer:

Response:<em> B[g]= A[f]+ A[f + 1]; </em>

<em>Explanation: </em>

• The very first command "LSL, X9, X0, #3" was to multiply the factor "f" by "8" use the shift function, this really is essential to get 8-byte words from the arrays.  

• The next command was to enter the array element "A" with index "f," the index of A[f] would be in' X9' from the first instruction implementation.

• The third and fourth instructions are the same as first and second statements however the array will be "B" and the index will be "g"

• The fifth statement "LDUR X0,[ X9, #0]" will assign the array value in "A[f]" to the variable "f" located in X0.

• The sixth command "ADDI X11, X9, #8" should lead in the next array value being stored after the "X11" address "A[f]," which is the value of the item A[f+1].  

• The next command "LDUR X9,[ X11,#0]" would be to load the command to "X9."  

• The next "ADD X9, X9, X0" instruction results in the addition of X0 with X9 contents, i.e. A[f] and A[f+1] array contents, resulting in X9 register.  

• During the last request, the value stored in X9 is stored in X10, assigned to the address of B[ g] • Therefore, the overall operation performed by the instructions given is: B[g]= A[f]+ A[f + 1]

Therefore, the related C statement is B[g]= A[f]+ A[f + 1].

You might be interested in
How has the shift to locally grown produce decreased greenhouse emissions?
Katen [24]

Answer:

How has the shift to locally grown produce decreased greenhouse emissions? 1 Large farms often create greenhouse emissions by poor farming practices. 2 Locally grown produce allows fewer dangerous toxins to seep into the soil and the atmosphere.

3 0
2 years ago
____ involves taking data from your database and putting it into an electronic file in a format that another external applicatio
steposvetlana [31]

Answer:

The answer is "Option c".

Explanation:

In the database dumping a folder for configuration, which information in the file is called a document spill.  In Plesk, exporting a database dump is a file that can be used for storage or delivery, and then preserves a source database is known as Exporting, and other choices are not correct, that are described as follows:

  • Importing, It is a dump in a database, that includes retrieving data from the data in a database location, that's why it's wrong.
  • Enhancing, It automatically improves data, that's why it's wrong.
  • Extracting, It is used in data analyzing and trapped to obtain necessary data from sources, that's why it is wrong.
3 0
3 years ago
Can someone tell me how this is a SyntaxError! (Python3)
Basile [38]

Answer:

The expression on line 9 required 2 brackets

Explanation:

Given

The attached code

Required

Why syntax error.

The error points to line 10, but the error is actually from line 9

To get an integer input, the syntax is:

variable-name = int(input("Prompt"))

From the attached code, the line 9 is:

amount = int(input("Enter cheese order weight: ")

By comparing the syntax to the actual code on line 9, only 1 of the brackets is closed.

<em>This, in Python 3 is a sytax error</em>

6 0
3 years ago
Which of the following is NOT a major type of crime reported to the IC3.
mezya [45]
I believe malware fraud, c. 


5 0
3 years ago
It is not necessary to develop strategies to separate good information and bad information on the internet. True or False
Reptile [31]

The answer is False. You should always try to separate the information that could do harm, or isn't true.

6 0
3 years ago
Other questions:
  • Which of the following accurately completes this sentence? The Internet is ____.
    6·2 answers
  • What is the output after the following code executes?
    14·1 answer
  • manufacturers are making an effort to build energy-efficient computers and use recyclable cases and packaging true or false
    10·1 answer
  • The underwriters laboratories (ul) requirement for ? ground-fault circuit interrupters (gfcis) is that tripping shall occur when
    5·1 answer
  • A typical analog cell phone has a frequency of 850 mhz; a digital phone a frequency of 1950 mhz. compared to the signal from an
    7·1 answer
  • A network consists of 10 computers, all running windows 7 professional. one computer acts as a file server and serves up data to
    6·1 answer
  • How does voting help in a social news site?
    10·1 answer
  • What does aperture control? A)amount of light the image sensor captures when taking a photo. B)how sensitive the camera is to in
    10·2 answers
  • Write a function called count_occurrences that takes two strings. The second string should only be one character long. The funct
    13·1 answer
  • Binary Search:<br><br><br> 2 6 15 42 55 89 111 256
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!