Assemble the following assembly-language code by writing out the corresponding m
ID: 3876750 • Letter: A
Question
Assemble the following assembly-language code by writing out the corresponding machine language instructions. The hex address of each instruction is given to the left of each instruction. Print this page and fill in the decimal values for each field, convert to binary, and then convert the whole instruction to hexadecimal. The first one is done for you as an example. For longer fields, such as the immediate data in I-type instructions, draw a line connecting the fields, such as -17 1. 2000 It $s1, $s2, $s3 Instruction breakdown by binary bit 5 bits 5 bits 0 6 bits 5 bits 6 bits 4 2 5 bits Dec Bin lo10 010101011101011|011101011|1|1|01011 01010 01011|011101110 Hex 0 0 2 3 8 8 2 2004and St0, $s3, $t4 Instruction breakdown by binary bit 5 bits 6 bits 5 bits 5 bits 5 bits 6 bits Dec Bin HexExplanation / Answer
2)
and t0 s3 t4
Binary : 00000010011011000100000000100100
Hex : 0x026C4024
dec:-
31-26 - 0
25-21 - 19
20-16 - 12
15-11 - 8
10-6 - 0
5-0 - 36
3)
add t0 t4 s0
Binary : 00000001100100000100000000100000
Hex : 0x01904020
dec:-
31-26 - 0
25-21 - 19
20-16 - 16
15-11 - 8
10-6 - 0
5-0 - 32
4)
addi t1 t2 1234
Binary : 00100001010010010000010011010010
Hex : 0x214904D2
dec:-
31-26 - 8
25-21 - 10
20-16 - 9
15-0 - 1234
5)
lw s4 200(t2)
Binary : 10001101010101000000000011001000
Hex : 0x8D5400C8
dec:-
31-26 - 35
25-21 - 10
20-16 - 20
15-0 - 200
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.