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

Assemble the following assembly-language code by writing out the corresponding m

ID: 3782805 • 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 4000 slt $s1, $s2, $s3 Instruction breakdown by binary bit 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits Dec 0 1 8 19 1 7 0 4 2 Bin 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 Hex 0 2 5 3 8 8 2 A 4004 or $s1, $s2, Ss3 Instruction breakdown by binary bit 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits Dec Bin Hex

Explanation / Answer

4000: slt $s1, $s2, $s3:

4004: or $s1, $s2, $s3:

Dec: 0 18 19 17 0 37

Bin: 000000 10010 10011 10001 00000 100101

Hex: 0x02538825

4008: addi $t0, $t4, 17

Dec: 8 12 8 17

Bin: 001000 01100 01000 0000000000010001

Hex: 0x21880011

400C: add $s1, $s1, $s3

Dec: 0 17 19 17 0 32

Bin: 000000 10001 10011 10001 00000 100000

Hex: 0x02338820

4010: sw $s0, 100($t2)

Dec: 43 10 16 100

Bin: 101011 01010 10000 0000000001100100

Hex: 0xAD500064

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