Given that general purpose register $1 has the value 10 in it, and $2 has the value 6, whichone of the following lines results in the value 26 being stored in $2?a. addi $1, $2, 10b. addi $1, $2, 0x10c. addi $2, $1, 10d. addi $2, $1, 0x10
Question
Given that general purpose register 2 has the value 6, whichone of the following lines results in the value 26 being stored in 1, 1, 2, 2, $1, 0x10
Solution
The correct answer is c. addi 1, 10.
Here's the step by step explanation:
The addi instruction in MIPS assembly language adds a register and a constant. The format is addi source, constant. The result is stored in the destination register.
a. addi 2, 10: This adds the value in 1. This is not the correct answer because we want the result in $2.
b. addi 2, 0x10: This adds the value in 1. Again, this is not the correct answer because we want the result in $2.
c. addi 1, 10: This adds the value in 2. This gives us the desired result of 26 in $2.
d. addi 1, 0x10: This adds the value in 2. This would result in a value of 26 in 1 was 10, but the value in $1 is not 10, so this is not the correct answer.
Similar Questions
If the following registers have the specified values,R0 = 0x00000000R1 = 0x00000005R2 = 0x00000002Then the result of MULL R0, R1, R2 will be ___________ and the result is stored in _______.a.0x00000010 & R0b.0x00000010 & R1c.0x0000000A & R1d.0x0000000A & R0
2. The state of a 12-bit register is 100010010111. What is its content if it represents (a) Three decimal digits in BCD? [1 mark] (b) Three decimal digits in the excess-3 code? [1 mark] (c) Three decimal digits in the 84-2-1 code? [1 mark] (d) A binary number?
Expressed in hexadecimal, what are the values of the registers $1, $2, $3, and $4 after thefollowing lines of WRAMP assembly code have been executed?(2 marks)main:lw $1, val($0)lw $2, val($0)lw $3, val($0)lw $4, val($0)subui $1, $1, 1addi $2, $2, 1srli $3, $3, 1srai $4, $4, 1syscall.dataval:.word 0xFFFFFFFF$1 = ____0xFFFFFFFE________________$2 = ____0x00000000________________$3 = ____0x7FFFFFFF________________$4 = ____0xFFFFFFFF________________
For the following excerpt of WRAMP assembly code, what are the final values stored in $2and $3?(2 marks)addi $2, $0, 0x42addi $3, $0, 0x42andi $2, $2, 0xF0andi $2, $2, 0xF0xori $3, $3, 0xF0xori $3, $3, 0xF0
The current contents of a general purpose register (X) are: X = 10111010 The currents of X represent an unsigned binary integer. Convert the value X into hexadecimal
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.