Which of the following instructions subtracts the value in x5 from the value in x6 and saves the result in x20?

A. sub x20, x6, x5
B. sub x6, x20, x5
C. sub x6, x5, x20
D. sub x20, x5, x6

Answer :

Final answer:

The instruction that subtracts the value in x5 from the value in x6 and saves the result in x20 is sub x20, x6, x5.

Explanation:

To find the instruction that subtracts the value in x5 from the value in x6 and saves the result in x20, we need to analyze the given options:

  1. sub x20, x6, x5: This instruction subtracts the value in x5 from the value in x6 and saves the result in x20. This is the correct instruction.
  2. sub x6, x20, x5: This instruction subtracts the value in x5 from the value in x20 and saves the result in x6. This is not the required instruction.
  3. sub x6, x5, x20: This instruction subtracts the value in x20 from the value in x5 and saves the result in x6. This is not the required instruction.
  4. sub x20, x5, x6: This instruction subtracts the value in x6 from the value in x5 and saves the result in x20. This is not the required instruction.

Therefore, the correct instruction that subtracts the value in x5 from the value in x6 and saves the result in x20 is:

sub x20, x6, x5

Learn more about subtracting values and saving the result in a register here:

https://brainly.com/question/34428148

#SPJ14

Other Questions