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

What would be the encoding of this instruction: and $t3, $s0, $s7? Write your an

ID: 3674767 • Letter: W

Question

What would be the encoding of this instruction: and $t3, $s0, $s7? Write your answer as an 8-hexdigit integer, e.g., 0x1234_5678, and for full credit show/explain how your answer was obtained.

What would be the encoding of this instruction: sw $v0, -4($sp)? Write your answer as an 8-hexdigit integer, e.g., 0x1234_5678, and for full credit show/explain how your answer was obtained.

Decode this instruction: 0x0003_3343. If the assembly language instruction contains any numbers, write them in decimal and for full credit show/explain how your answer was obtained. Hint: Tables A.2 and A.3 in the MIPS Architecture for Programmers Vol II-A reference manual may be helpful

Explanation / Answer

$t3 = $11 = 01011

$s0 = $16 = 10000

$s7 = $23 = 10111

and $t3, $s0, $s7 => 0000 00 $s0 $s7 $t3 000 0010 0100

and $t3, $s0, $s7 => 0000 00 10000 10111 01011 000 0010 0100

and $t3, $s0, $s7 => 0000 0010 0001 0111 0101 1000 0010 0100 = 0x02175824

___________________________________________________________________________________

$v0 = $2 = 00010

$sp = $29 = 11101

-4 = 1111 1111 1111 1100

sw $v0, -4($sp) => 1010 11 $sp $v0 (-4) => 101011 11101 00010 1111111111111100

sw $v0, -4($sp) => 101011 11101 00010 1111111111111100 => 1010 1111 1010 0010 1111 1111 1111 1100

sw $v0, -4($sp) => 0xAFA2FFFC

__________________________________________________________________________________________

0x0003_3343 => 0000 0000 0000 0011 0011 0011 0100 0011 => 000000 (00000) (00011) (00110) (01101) 000011

This is an SRA Instruction

00011 = $3 = $v1

00110 = $6 = $a2

01101 = $13 = $t5

sra $a2, $v1, $t5

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