Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume the following register contents: $t0 = 0xAAAAAAAA, $t1 = 0x12345678 a) Fo

ID: 3881109 • Letter: A

Question

Assume the following register contents: $t0 = 0xAAAAAAAA, $t1 = 0x12345678 a) For the register values shown above, what is the value of $t2 for the following sequence of instructions? sll $t2, $t0, 6 or $t2, $t2, $t1 b) For the register values shown above, what is the value of $t2 for the following sequence of instructions? sll $t2, $t0, 8 andi $t2, $t2, -1 c) For the register values shown above, what is the value of $t2 for the following sequence of instructions? srl $t2, $t0, 3 andi $t2, $t2, 0xFEFE
Assume the following register contents: $t0 = 0xAAAAAAAA, $t1 = 0x12345678 a) For the register values shown above, what is the value of $t2 for the following sequence of instructions? sll $t2, $t0, 6 or $t2, $t2, $t1 b) For the register values shown above, what is the value of $t2 for the following sequence of instructions? sll $t2, $t0, 8 andi $t2, $t2, -1 c) For the register values shown above, what is the value of $t2 for the following sequence of instructions? srl $t2, $t0, 3 andi $t2, $t2, 0xFEFE
Assume the following register contents: $t0 = 0xAAAAAAAA, $t1 = 0x12345678 a) For the register values shown above, what is the value of $t2 for the following sequence of instructions? sll $t2, $t0, 6 or $t2, $t2, $t1 b) For the register values shown above, what is the value of $t2 for the following sequence of instructions? sll $t2, $t0, 8 andi $t2, $t2, -1 c) For the register values shown above, what is the value of $t2 for the following sequence of instructions? srl $t2, $t0, 3 andi $t2, $t2, 0xFEFE

Explanation / Answer

a)

pseudo

t2 = (t0 << 44) || t1

= (0xAAAAAAAA << 6) || 0x12345678

= 0x2aaaaaaa80 || 0x12345678

=0x2ababefef8

b)

pseudo

t2 = (t0 << 8) -1

= (0xAAAAAAAA << 8) -1

=0xAAAAAAA9FF

c)

pseudo

t2 = (t0 >> 3) + 0xFEFE

= (0xAAAAAAAA >> 3) + 0xFEFE

=0x15565453

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote