asked 24.7k views
3 votes
assume that $s0 is initialized to 11 and $s1 is initialized to 22. suppose you executed the code below on a version of the pipeline described in the class that does not handle data hazards. what would the final values of registers $s2 and $s3 be? addi $s0, $s1, 5 add $s2, $s0, $s1 addi $s3, $s0, 15

1 Answer

5 votes

Answer:

$s0 = 27

$s2 = 49

$s3 = 42

Step-by-step explanation:

$s0 = 11

$s1 = 22

the format for addi instruction is,

addi $destination register's address, $ source register's address, immediate data

thus following the format the final values of registers would be,

addi $s0, $s1, 5

$s0 = 27

add $s2, $s0, $s1

$s2 = 49

addi $s3, $s0, 15

$s3 = 42

answered
User NiCk CAMel
by
7.8k points