0% found this document useful (0 votes)
8 views5 pages

ACOE201

Uploaded by

nechitabianca6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views5 pages

ACOE201

Uploaded by

nechitabianca6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Department: Computer Science and Engineering Date:

Subject: ACOE201- Computer Architecture I Test #: 1

Student’s Name: Sample Test

QUESTION 1:

Determine the content of register $s1 after the execution of each of the MIPS
instructions given below. Specify also whether the instruction will result in an overflow
error. (20 marks)
Register Values
$s1 $s2 $s3 $s4

Initial Values 0x00000000 0x48094c83 0x563c5932 0x833a2138

# Instruction Result Overflow Error (Y/N)

1 add $s1,$s2,$s3

2 sub $s1,$s2,$s3

3 addu $s1,$s2,$s4

4 subu $s1,$s2,$s4
QUESTION 2:
Determine the content of register $s1 after the execution of each of the MIPS
instructions given below. Specify also whether the instruction will result in an overflow
error. (20 marks)
Register Values
$s1 $s2 $s3 $s4

Initial Values 0x00000000 0x680a4325 0x423f5341 0x1c434583

# Instruction Result Overflow Error (Y/N)

1 addi $s1,$s2,0xc24a

2 addi $s1,$s4,0x53e3

3 addiu $s1,$s3, 0xa291

4 addiu $s1,$s4, 0x5c14


QUESTION 3:
Determine the content of register $s1 after the execution of each of the MIPS
instructions given below. (20 marks)
Register Values
# Instruction
$s1 $s2 $s3 $s4

0 Initial Values 0x00000000 0xf0ff00f5 0x0ff00f07 0x00fff0f3

1 and $s1,$s2,$s3

2 or $s1,$s2,$s3

3 nor $s1,$s2,$s4

4 xor $s1,$s2,$s4

5 ori $s1,$s2,0x4821
QUESTION 4:
Determine the content of register $s1 after the execution of each of the MIPS
instructions given below. (2 marks)
Register Values
# Instruction
$s1 $s2 $s3 $s4

0 Initial Values 0x00000000 0x680a4c95 0x56ca9823 0xc43f5983

1 sll $s1,$s2,8

2 srl $s1,$s3,4

3 sar $s1,$s2,4

4 sar $s1,$s4,12

5 slt $s1,$s4,$s3
QUESTION 5:
Determine the content of register $s1 after the execution of each of the MIPS
instructions given below. If the instruction will result in an exception error, write in
register $s1 the word “error”.
Register Values
# Instruction
$s1 $s2 Address Data

Initial Values 0x00000000 0x60201000 3 2 1 0

1 lw $s1,0x6($s2) 0x60201000 0x60201000 3c 56 52 21

2 lh $s1,0x12($s2) 0x60201000 0x60201004 56 9a 4b 6f

3 lhu $s1,0x10($s2) 0x60201000 0x60201008 8a e3 2e 63

4 lb $s1,0x14($s2) 0x60201000 0x6020100c 5f 41 d4 58

5 lbu $s1,0x9($s2) 0x60201000 0x60201010 f1 8c 5e 38

6 lh $s1,0x6($s2) 0x60201000 0x60201014 94 05 72 9e

7 lw $s1,0xc($s2) 0x60201000 0x60201018 4c 9f a2 80

8 lh $s1,0xd($s2) 0x60201000 0x6020101c e5 23 c5 65

You might also like