Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

CSC 105 – ARCHITECTURE AND ORGANIZATION

Final Exam Test Questionnaire

2 nd Semester, 2020-2021

Name: CHRISTINE L. BACLAY

I. Problem Solving.

1. Tag =2

2. Block =9

3. Word = 7

4 128 mod 23 =0

5. 144 mod 23 =0

6. 2176 mod 23 =0

7. 2180 mod 23 = 4

8. 1280 mod 23 =0

9. 2176 mod 23 =0

10. What is the harmonic mean for Machine A?

6
1/100+1/200+1/300+1/400+1/2000+1/300
=243.243

11. What is the harmonic mean for Machine B?


6
1/1000+ 1/2000+ 1/3000+ 1/4000+1/200+1/30
=148.454

12. What is the harmonic mean for Machine C? = 110.092

13. What is the arithmetic mean for Machine A? = 550

14. What is the arithmetic mean for Machine B? =1705

Items 15-20 (2 points each)

15. What is the geometric mean for Machine A (Machine C as reference machine)?
336.042145371266

16. What is the geometric mean for Machine B (Machine A as reference machine)?
723.980855300594

17. What is the geometric mean for Machine C (Machine B as reference machine)?
669.432950082170
18. What is the weighted arithmetic mean for Machine A (Machine C as reference machine)?
304.239

19. What is the weighted arithmetic mean for Machine B (Machine A as reference machine)?
1033.03

20. What is the weighted arithmetic mean for Machine C (Machine B as reference machine)?
1475.46

Assume: 0000($0) Binary Hex


= 5, 0004($0) = 5

00 LW $1,0000($0) 100011 00000 00001 8C010000


0000000000000000
04 LW $2, 0004($0) 100011 00000 00010 8C020004
0000000000000100

08 SLT $3, $1, $2 000000 00001 00010 00011 00000 0022182A


101010
12 BNE $2, $3, L1 000101 00010 00011 00000 00000 14430014
010100

16 ADDU $4, $1, $2 000000 00001 00010 00100 00000 00222021


100001
14 SUBU $5, $1, $2 000000 00001 00010 00101 00000 00222823
100011

18 SLLV $6, $1, $2 000000 00010 00001 00110 00000 00413004


000100
1c J L2 000010 11000 00001 10000 00000 B018002
000010
20 L1: ADDIU $4, $0, 001001 00000 00100 00000 00000 24040014
20 010100

24 ANDI $5, $1, 10 001100 00001 00101 00000 00000 3025000A


001010
28 OR $6, $1, $2 000000 00001 00010 00110 00000 00223025
100101

2c L2: SW $6, 101011 00000 00110 0000000000001000 AC060008


0008($0)
21. What is the OPCODE (Binary) and OPCODE (Hex) for address 00?
(Binary)= 100011 00000 00001 0000000000000000 (Hex)= 8C010000
22. What is the OPCODE (Binary) and OPCODE (Hex) for address 08?
(Binary)= 000000 00001 00010 00011 00000 101010 (Hex)= 0022182A
23. What is the OPCODE (Binary) and OPCODE (Hex) for address 14?
(Binary)= 000000 00001 00010 00101 00000 100011 (Hex)= 00222823
24. What is the OPCODE (Binary) and OPCODE (Hex) for address 1C?

(Binary)= 000010 11000 00001 10000 00000 000010 (Hex)= B018002


25. What is the OPCODE (Binary) and OPCODE (Hex) for address 0C?
(Binary)= 000101 00010 00011 00000 00000 010100 (Hex)= 14430014
26. What is the OPCODE (Binary) and OPCODE (Hex) for address 20?
(Binary)= 001001 00000 00100 00000 00000 010100 (Hex)= 24040014
27. What is the OPCODE (Binary) and OPCODE (Hex) for address 2C?
(Binary)= 101011 00000 00110 0000000000001000 (Hex)= AC060008
28. What is the OPCODE (Binary) for address 04?
(Binary)= 100011 00000 00010 0000000000000100
29. What is the OPCODE (Binary) for address 28?
(Binary)= 000000 00001 00010 00110 00000 100101

30. What is the OPCODE (Binary) for address 24?


(Binary)= 001100 00001 00101 00000 00000 001010

31. What is the OPCODE (Binary) for memory address 10?


(Binary)= 000000 00001 00010 00100 00000 100001
32. What is the corresponding value of memory address 8 (recent execution)?
The result is 1 (True)
33. What is the corresponding value of $4 in address 20?
34. Assume C Header files & main body: int a=2, b, c=1; for(b=a; b>0; b--) {c *= a;} int d=0; d = c; (8
points)

35. Assume C Header files & main body: int a=2, b=1, c=3, d=1; a = a – (b – c) + d; (4 points)

Addiu $1,$0,2 #a

Addiiu $2,$0,1 #b

$3, $0,3 #c

$4, $0,1 #d

Subu $5,$2,$3 #b-c

Addu $6,$5,$4 #(b-c)+d

Subu $1,$1,$6 #a-(b-c)+d

36. Assume C Header files & main body: int a=127, b=2, c=3, d=4, e=2; a = a – b (c + d) ^ e; (5 points)

You might also like