Question

3. What will be in $8 after execution? addi $8, $0,5 sil_$8, $8,2 // shifting $8 left twice (logical shift- assume no sign) 4

0 0
Add a comment Improve this question Transcribed image text
Answer #1

(3)

  • addi $8, $0,5 : This instruction will add 5 to $0 register and then store the result in $8.
    $8 $0 + 5
  • sll $8, $8,2 : This will shift the contents inside the register $8 to the left twice. At present the register is having 101, after the shift operation it will become 10100 (zeros are added to the LSB side after each shift operation). 10100 will be stored inside $8 which is equivalent to 20 in decimal.
    $8 $0 << 2

Therefore $8 will contain 20.

Add a comment
Know the answer?
Add Answer to:
3. What will be in $8 after execution? addi $8, $0,5 sil_$8, $8,2 // shifting $8...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 4. What will be in $8 after execution? Assume $9 contains a valid RAM address. .data...

    4. What will be in $8 after execution? Assume $9 contains a valid RAM address. .data A: 5 10 15 .text Main: la $9, A addi $10, $0,5 sw $10, 8($9) addi $9, $9,8 w_$8,0($9)

  • 4. What will be in $8 after execution? Assume $9 contains a valid RAM address. .data...

    4. What will be in $8 after execution? Assume $9 contains a valid RAM address. .data A: 5 10 15 .text Main: la $9, A addi $10, $0, 5 sw $10, 8($9) addi $9, $9, 8 lw $8, 0($9)

  • 1. Consider the following java code. int x 5 X++ Give equivalent MIPS ISA. Assume compiler...

    1. Consider the following java code. int x 5 X++ Give equivalent MIPS ISA. Assume compiler will keep x in $s0 ($16) 2. What will be in $8 after executing the following statements? addi $8, $0, 5 add $8, $8, $8 What will be in $8 after execution? 2. addi $8, $0, 5 sll $8, $8, 2 shifting $8 left twice (logical shift- assume no sign) 4. What will be in $8 after execution? Assume $9 contains a valid RAM...

  • can someone explain how you get the answer to this question? 1. Based on the following code segment what values are in the runtime stack immediately after the fourth time the instruction labeled...

    can someone explain how you get the answer to this question? 1. Based on the following code segment what values are in the runtime stack immediately after the fourth time the instruction labeled Rec is executed .text li Sa0, 7 jai Fact #assume the address of this instruction is 2000 fother code not shown Fact: addi Ssp, Ssp, -8 sw Sra, 4(Ssp) sw Sa0, 0(Ssp) slti St0, Sa0, 1 beq St0, Szero, Rec li SvO, 1 addi $sp, Ssp, 8...

  • After the execution of commands: Ifsr 0, FREQ recall Display V What does the user see...

    After the execution of commands: Ifsr 0, FREQ recall Display V What does the user see on the LCD screen below assuming that the screen hat been initialized in the normal way that we discussed in class using InitLCD subroutine. Your answer in the booklet should show the LCD screen below with what will appear on it. Please rewrite the assembly code below using the appropriate PIC structured assembly preprocessor constructs of chapter 6. a) 1.2 btfss INTCON, TMR01F bra...

  • The relative time ratings of exercises are shown in square brackets after each exercise number. On average, an exercise...

    The relative time ratings of exercises are shown in square brackets after each exercise number. On average, an exercise rated [10] will take you twice as long as one rated [5]. Sections of the text that should be read before attempting an exercise will be given in angled brackets; for example, <1.3> means you should have read Section 1.3, Under the Covers, to help you solve this exercise. 2.1 [5] For the following C statement, what is the corresponding MIPS...

  • Write a complete MIPS assembly language program that implements the following pseudocode. program h2 define global...

    Write a complete MIPS assembly language program that implements the following pseudocode. program h2 define global integer variables w, x, y, z -- in the .data section function main() SysPrintStr("Enter an integer >= 0 for w? ") w ← SysReadInt() SysPrintStr("Enter an integer >= 0 for x? ") x ← SysReadInt() SysPrintStr("Enter an integer < 0 for y? ") y ← SysReadInt() z ← 16(w + x) - (3 × -y mod 7) SysPrintStr("z = ") SysPrintInt(z) SysExit() end function...

  • Please comment the MIPS code to help me understand. Here is what the code accomplishes. Here...

    Please comment the MIPS code to help me understand. Here is what the code accomplishes. Here is the code, partially commented. .data Matrix: .word 41,45,5, 34,8, 15,16,23,44,48,12,32,18,47,22,8,22 .word 46,40,42,33,13,38,27,6, 29,25,18,40,47,22,26,14,3 .word 7, 48,35,9, 43,38,9, 49,28,25,42,5, 44,10,5, 38,14 .word 46,33,16,6, 13,20,31,1, 8, 17,1, 47,28,46,14,28,7 .word 32,2, 48,25,41,29,14,39,43,46,3, 39,32,49,41,28,46 .word 5, 43,2, 48,13,4, 33,41,32,19,9, 25,30,22,2, 9, 40 .word 14,47,22,18,47,3, 35,44,18,6, 33,22,11,6, 47,50,4 .word 28,34,20,30,18,27,38,5, 26,40,37,23,16,13,37,8,7 .word 48,38,39,12,10,39,23,20,21,20,33,16,24,21,25,3,46 .word 49,38,40,38,13,47,5, 13,4, 13,23,26,12,30,29,29, 3 .word 8, 20,10,13,31,7, 12,41,12,21,28,26,43,14,35,10,19 .word 49,33,25,26,24,29,46,22,7, 5, 15,41,10,31,19,41,27 .word 48,9,...

  • 8. What feature on a sign-in register would be a violation of HIPAA? a. Patient's name...

    8. What feature on a sign-in register would be a violation of HIPAA? a. Patient's name c. Arrival time d. Name of provider (appointment with e 9. What infection control supplies should be available in the reception area? a. Tissues b. Waste containens c. Hand sanitizer d. Masks All of the above e. 10. The healthcare provider is legally obligated to give each patient a copy of the a. HIPAA b. HITECH c. NPP d. OSHA 11. What information is...

  • After the accounts are closed on February 3, prior to liquidating the partnership, the capital accounts...

    After the accounts are closed on February 3, prior to liquidating the partnership, the capital accounts of William Gerloff, Joshua Chu, and Courtney Jewett are $19,140, $4,700, and $21,860, respectively. Cash and noncash assets total $5,660 and $54,780, respectively. Amounts owed to creditors total $14,740. The partners share income and losses in the ratio of 2:1:1. Between February 3 and February 28, the noncash assets are sold for $33,580, the partner with the capital deficiency pays the deficiency to the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT