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

Here is an assembled function in MIPS addi $sp, $sp, 4 Sw Li 1i L1 Li 0xe04800b8

ID: 3911537 • Letter: H

Question

Here is an assembled function in MIPS addi $sp, $sp, 4 Sw Li 1i L1 Li 0xe04800b8 ex23bdfffc addi $29, $29,exffff... 75: 0x084000bc exafb10000 sw $17,8x8000e000($29) 76: 0xe04000ce ex24020000 addiu $2,$0,0x00000000 78: 0x004000c4 0x24030000 addiu $3, $8,0x00000000 79: 0x004000c8 ex240a0020 addiu $18, s0,8xeeee... 80: 0x004000cc 8x240b000a addiu $11,s0,8x0000... 81: 0x884800de ex90910000 lbu $17,0x000e0000($4) 83: 0x004000d4 0x28840001 add1 $4,$4,0x80000001 84: 0x004008d8 8x122b0004 beq $17,$11,8x00000004 85: 0x004000dc 8x20420001 addi $2,$2,8x80000001 86: 0x804000e0 8x162afffb bne $17,$10,8xfffffffb 87: 0x004008e4 8x20630001 addi $3,$3,8x00000001 88: 0x004000e8 8x88100034j 0x804000de 0x004000ec 0x20630001 addi $3,$3,8x00000001 93: 0x804000fe ex8fb10000 tw $17,0x8000e00e ($29) 96: 0x804000f4 8x23bdee04 addi $29,$29,8x8000.. 97: 0x80400018 ex03e00e08 jr $31 ss1, (ssp) sve, e Svl, e st2, 32 # ascii space st3, 10 # ascii newline addi sao, sao, 1 #inc rement to next byte beq ss1, $t3, stats_exit addî sve, sve, 1 #inc renent character count bne $s1, $t2, stats lp addi Sv1, $v1, 1 # increment word count stats lp Sv1, Sv1,1 $51, (ssp) $sp, $sp,4 Sra 90: #addLast word addi tw addi jr 98: Break down instruction bne on line 87 into its format and describe each part. Break down the j instruction on line 90 into its format and describe each part. Break down instruction lbu on line 83 into its format and describe each part.

Explanation / Answer

Answer 1:

Instruction:

bne $s1,$t2,stats_lp

Instruction meaning:
BNE is a short form of "Branch if not Equal".

Terms:
s1, t2 are the registers and "stats_lp" is the label/address

Explaination:
if value at register $s2 and $t2 are not equal then program counter jump to label "stats_lp". if both the values are equal then execution continues to the next instruction.

Answer 2:

Instruction:
j starts_lp

Instruction meaning:
j stands for jump.

Terms:
"starts_lp" is the label or address

Explaination:
This instruction means jump to label/address "starts_lp".

Answer 3:

Instruction:
lbu $s1,($a0)

Instruction meaning:
lbu stands for "Load byte unsigned"

Terms:
a0 and s1 are registers.

Explaination:
Load the byte at memory address $a0 into register $s1 or we can say

Load byte unsigned (lbu) extracts a specified byte from $a0 and places it in the least significant byte position of the target register $s1.

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