Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, Need Computer Organization Help What is the shortest sequence of MIPS instructions that extracts three fields; bits 21-25, 16-20, and 11-15 (inclusive) from register

Hello, Need

Computer Organization Help

image text in transcribedimage text in transcribed

What is the shortest sequence of MIPS instructions that extracts three fields; bits 21-25, 16-20, and 11-15 (inclusive) from register $a0. The results should be placed it in the lower order portion of register $50 (for x bits), $s1 (for y bits), and $s2 (for z bits) registers (zero filled otherwise). For example, the highlighted bits from $ao: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ? ? ? ? ? ? X X X X X y y y y y Z Z Z Z Z ? ? ? ? ? ? ? ? ? ? ? Should be placed in the following locations of $s0 and the rest set to 0: ?!?!?? ** 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 10 000000000000000000000000000 x x x x x Describe what the following MIPS code computes. Assume the $v0 is used for the output. $a0, lw a lw $al, b li $to, o lp: beq $al, 0, finish add $t0, $t0, $a0 sub $al, $al, 1 b finish: addi $t0,$t0, 10 add $v0, $t0, $zero lp What is the shortest sequence of MIPS instructions that extracts three fields; bits 21-25, 16-20, and 11-15 (inclusive) from register $a0. The results should be placed it in the lower order portion of register $50 (for x bits), $s1 (for y bits), and $s2 (for z bits) registers (zero filled otherwise). For example, the highlighted bits from $ao: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ? ? ? ? ? ? X X X X X y y y y y Z Z Z Z Z ? ? ? ? ? ? ? ? ? ? ? Should be placed in the following locations of $s0 and the rest set to 0: ?!?!?? ** 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 10 000000000000000000000000000 x x x x x Describe what the following MIPS code computes. Assume the $v0 is used for the output. $a0, lw a lw $al, b li $to, o lp: beq $al, 0, finish add $t0, $t0, $a0 sub $al, $al, 1 b finish: addi $t0,$t0, 10 add $v0, $t0, $zero lp

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions