Zmidterm 201 OISP
Zmidterm 201 OISP
Semester/AY 1 2020-2021
MIDTERM
Date October 2020
Course name Computer Architecture
Ho Chi Minh City University of Technology Course ID CO2007
Faculty of Computer Science and Engineering Duration 60 minutes Code 201m1
Notes:
Student’s ID: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Answer: Embedded computers, personal computers, server computers, and super computers
2. Is “throughput” or “response time” affected when the current processor is replaced by a faster one?
Answer: Both
Answer: A, B, and C
Answer: 1.95
7. What is speed-up of the above program if CPI of load/store instructions is reduced by a factor of 2?
Answer: ≈1.24
8. According to the Moore’s Law, how long does it take for the number of transistors integrated into a chip
to get double?
Answer: 18 - 24 months
9. A clock signal becomes logic 0 in total 2×109 times per second, what is the rate of the clock?
Answer: 2 GHz
Answer: Yes
Assume that the $s3 register stores a base address of an integer array. What will we get in $s1 after the
sequence gets executed?
13. To assign value 12345678 to the $t0 register, which standard MIPS instructions should be executed?
Answer:
lui $t0, 0x00BC
ori $t0, $t0, 0x614E
address: 8 9 10 11
0x12 0x34 0x56 0x78
0x9A 0xBC 0xDE 0xF0
address: 12 13 14 15
Answer: 0xFFFFDEF0
15. What is the value of the $t0 register after the instruction lw $t0, 6($s0) is executed?
16. What will be changed after the instruction sw $t1, 4($s0) is executed? Assume that the $t1 register
stores value of 0x00000000.
17. What is (are) NOT (an) operand(s) for standard MIPS instructions among: Integer numbers, Real num-
bers, Memory cells, and Registers
18. What is the value of the $s2 register after the following instruction is executed?
andi $s2, $s0, 2020
Answer: 0x00000144
19. What is the value of the $s2 register after the following MIPS instructions are executed?
srl $s2, $s0, 4
or $s2, $s1, $s0
Answer: 0xFAFEEBFE
20. Which is the machine instruction of the add $t0, $s1, 2020 MIPS instruction?
21. Which is the MIPS instruction according to the following machine instruction?
0000_0000_0001_0000_0101_0000_1100_00002
22. Which is the machine instruction of the lw $t0, -32($s1) MIPS instruction (written in hexadeci-
mal)?
Answer: 0x8E28FFE0
23. What is stored in the Program counter (PC) register in the context of the MIPS architecture:
Answer: 0x000007E4
Answer: 0x00000014
Answer: 0xFFFFFFEC
The following sequence of MIPS instructions is used for questions from 27 to 28:
addi $t1, $zero, 10
add $t2, $zero, $zero
FindMean: addi $t1, $t1, -1
addi $t2, $t2, 1
bne $t1, $t2, FindMean
27. What is value of the $t1 register after the above sequence is executed?
Answer: $t1 = 5
28. Assume that the above sequence is executed by a 10 MHz MIPS processor. The processor can process 1
instruction per cycle. What is the execution time of the above sequence?
The following sequence of MIPS instructions is used for questions from 29 to 30:
label: addi $t0, $t0, -1
addi $t1, $t1, 1
bne $t0, $t1, exit
j label
exit:
29. What is the offset (16 bit) of the bne $t0,$t1,exit instruction:
Answer: 0x0001
30. Given that the bne $t0, $t1, exit instruction is stored at memory location 0xCAFECOOC. Which
is the offset field (26 bit) of MIPS instruction j label?
Answer: 0x2BFB001