Convert the following branch and jump instructions to Machin

Convert the following branch and jump instructions to Machine Code. Assume fact is byte address 16000 fact: addi $sp, $sp, -8 sw $a0, 0 ($sp) slti St0, $a0, 1 beq $to, $ zero, L1 # part a addi $v0, $zero, 1 addi $sp, $sp, 8 j fact #part b addi $a0 $a0, -1 beq $ao $zero fact #part c 1w $ao, 0 ($sp) 1w $ra, 4 ($sp) addi $sp, $sp, 8 mul $vo, $a0, $vo j fact #part d

Solution

Assembly code for the following branching instruction:

beq $t0, $zero, L1 = 0001 0001 0000 1001 0000 0000 0000 0010

                                 0x11090002

j fact = 0000 10    00 0000 0000 0000 0000 0010 1001

           0x08000029

 Convert the following branch and jump instructions to Machine Code. Assume fact is byte address 16000 fact: addi $sp, $sp, -8 sw $a0, 0 ($sp) slti St0, $a0, 1

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site