Question: Confused as to what I got wrong Question 2 Assume that i , t , x , y , and z are C + +

Confused as to what I got wrong
Question 2
Assume that i,t,x,y, and z are C++ int variables. Refer to the table below for the variables being used and their associated registers.
Write the corresponding MIPS I instruction(s) to C++ code or write the instructions to perform the desired task.
i.y= the sign of x?? let y hold a pattern that numerically equals to the sign bit of x
If a constant/immediate is used, write type it in 2-digit hexadecimal representation. Don't forget to use prefix 0x.
Hint: Extract the far-left bit of variable x and put it in the far-right position of variable y. Refer to question 4 of 04?- Logical Operations.
In the comment box, write the corresponding logical expression such as x&01919,x,|,01818,x>>081,or x081.
1,#y=
ii. Preserve the bits of x at odd positions that are lower than 16(1,3,5,dots13,15) while masking off all other positions. Use variable t to hold the result.
If a constant/immediate is used, write type it in 4-digit hexadecimal representation. Don't forget to use prefix 0x.
In the comment box, write the corresponding logical expression such as x&01919,x,|,01818,x>>081,or x081.
1,#t=
iii. Follow the two-step negation in here to perform y=-z.
If a constant/immediate is used, write type it in 4-digit hexadecimal representation. Don't forget to use prefix 0x.
1
??# $2=z
2
iv. Review the following binary equivalents of multiples of 4.
Write the corresponding MIPS I instruction(s) to the following C++ code: y=z,8,4;
If a constant/immediate is used, write type it in 4-digit hexadecimal representation. Don't forget to use prefix 0x.
Hint: Mask off the higher 30 bits of variable z. Refer to question 4 of 04- Logical Operations
In the comment box, write the corresponding logical expression such as x&0x1919,x,|,01818,x>>081,or x081.
 Confused as to what I got wrong Question 2 Assume that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!