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

Provide the type and assembly language instruction for the following machine cod

ID: 3719788 • Letter: P

Question

Provide the type and assembly language instruction for the following machine codes. 1.1 0000 0010 0001 0000 1000 0000 0010 00002 1. Answer: Rearrange the value: 000000 10000 10000 10000 00000 1000002-0x02108020 add $s0, $50, $s0 # R-type 1.2 0000 0000 1010 0100 0001 0000 0010 00112 Answer: Rearrange the value: 000000 00101 00100 00010 00000 1000112 = 0x00A41023 subu?v0, ?al, ?a0 # R-type 1.3 0011 1001 1110 0011 1010 1011 1100 11012 Answer: Rearrange the value: 001110 01111 00011 101010111100110120x39E3ABCD xori Sv1, ?t7, 0xABCD#I-type 1.4 0000 0001 0010 1010 0100 0000 0010 01012 Answer: Rearrange the value: 000000 01001 01010 01000 00000 1001012 = 0x012A4025 or $t0, $t1, $t2 # R-type

Explanation / Answer

Every assembly language instruction is translated into a machine code instruction in of the three formats:

Now we can explain easily answers.

Answer 1:

Values are rearranged according to the format (i.e. according to the specified number of bits).

Given answer is: add $s0, $s0, $s0 # R-type instruction

Explanation:

opcode: 000000 (add)

rs: 10000 ($s0)

rt: 10000 ($s0)

rd: 10000 ($s0)

shamt: 00000

funct: 100000 (add)

Similarly, we can explain all of these.  

6 bits 5 bits 5 bits 5bits 5 bits 6 bits total=32 bits Register-type 000000 rs rt rd shamt funct Immediate-type op rs rt address/immediate Jump-type op target address
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