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
What is an information technology? ​
vivado [14]

Answer:

PLEASE BRAINLIEST

Explanation:

Information Technology means the use of hardware, software, services, and supporting infrastructure to manage and deliver information using voice, data, and video.

7 0
2 years ago
Read 2 more answers
What is required for real-time surveillance of a suspects computer activity?/p Group of answer choices a. Blocking data transmis
Hitman42 [59]

Answer:

c  Preventing data transmissions between a suspect’s computer and a network server

Explanation:

3 0
3 years ago
What kind of security features does Microsoft Security Analyzer promise?
Margaret [11]

Answer:

  • Microsoft security analyzer easily update the software system and it a free standalone component which basically provide security to many systems. We can easily update pure system once in a week.
  • Basically, it is a free independent segment which provide the security to many other frameworks. It is used to protect various number of windows against weak passwords by using security scanning.
  • It also check errors in the operating system and provide the security to the file system.
  • It is used to determine the state of security and other specific guidance.

8 0
2 years ago
In terms of big data what is variety? Multiple Choice Includes different forms of structured and unstructured data. Includes the
nlexa [21]

Answer:

includes different forms of structured and unstructured data.

Explanation:

In terms of big data variety is to include different forms of structured and unstructured data.

6 0
3 years ago
The rules on the Internet for how messages are addressed and passed on are called ____ .
olganol [36]
Answer: Internet Protocal (IP)
7 0
3 years ago
Other questions:
  • To use files in a c++ program you must include the ________ header file.
    15·1 answer
  • What is the purpose of the chart feature in word?
    15·1 answer
  • Insert a function in cell g5 to calculate the first student's monthly payment, using appropriate relative and absolute cell refe
    13·1 answer
  • as the new hr manager hired by a company to clean up some of the company's problems,analyse the system requirements for the comp
    14·1 answer
  • "Which of the following is not an example of a project? Select one: a. Creating a website for a company b. Raising money for a d
    5·1 answer
  • The browser on which you are viewing web pages is called the
    13·1 answer
  • landon starts his computer and gets message, hard drive is not found. He was watching a movie the previous night, what might the
    6·1 answer
  • Which shortcut key combination will move the cursor to the beginning of the line?
    13·1 answer
  • Write any two disadvantage of First generations computers​
    14·1 answer
  • Identify and explain five areas where computers are used to process <br> data
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!