...
Database-Management-System
August 17, 2023
NIC-NIELIT Scientist-B 2020
August 18, 2023
Database-Management-System
August 17, 2023
NIC-NIELIT Scientist-B 2020
August 18, 2023

ISRO CS 2020

Question 2
A non-pipelined CPU has 12 general purpose registers(R0, R1, R2,……..R12). Following operations are supported

ADD Ra, Rb, Rr Add Ra to Rb and store the result in Rr

MUL Ra, Rb, Rr Multiply Ra to Rb and store the result in Rr

MUL operations takes two clock cycles, ADD takes one clock cycle.

Calculate the minimum number of clock cycles required to compute the value of the expression XY+XYZ+YZ. The variables X, Y, Z are initially available in registers R0, R1 and R2 contents of these registers must not be modified.
A
5
B
6
C
7
D
8
Question 2 Explanation: 
In a non-pipelined processor, each instruction will take its full number of cycles to complete before the next instruction can begin.
1. Compute XY:
– MUL R0, R1, R3 (result stored in R3)
2. Compute XYZ:
– MUL R3, R2, R4 (result stored in R4)
3. Compute YZ:
– MUL R1, R2, R5 (result stored in R5)
4. Add the results:
– ADD R3, R4, R6 (add XY and XYZ, store result in R6)
– ADD R6, R5, R7 (add result of step 4 with YZ, store result in R7)
So, we have used a total of 3 MUL operations and 2 ADD operations. Each MUL operation takes 2 cycles, and each ADD operation takes 1 cycle.
Total cycles = (3 MUL operations * 2 cycles per MUL) + (2 ADD operations * 1 cycle per ADD) = 6 cycles.
Therefore, the correct answer is indeed B) 6 cycles.
Correct Answer: B
Question 2 Explanation: 
In a non-pipelined processor, each instruction will take its full number of cycles to complete before the next instruction can begin.
1. Compute XY:
– MUL R0, R1, R3 (result stored in R3)
2. Compute XYZ:
– MUL R3, R2, R4 (result stored in R4)
3. Compute YZ:
– MUL R1, R2, R5 (result stored in R5)
4. Add the results:
– ADD R3, R4, R6 (add XY and XYZ, store result in R6)
– ADD R6, R5, R7 (add result of step 4 with YZ, store result in R7)
So, we have used a total of 3 MUL operations and 2 ADD operations. Each MUL operation takes 2 cycles, and each ADD operation takes 1 cycle.
Total cycles = (3 MUL operations * 2 cycles per MUL) + (2 ADD operations * 1 cycle per ADD) = 6 cycles.
Therefore, the correct answer is indeed B) 6 cycles.
0 0 votes
Article Rating
Subscribe
Notify of
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

What is the correct answer since in the video explanation it’s different. And option is option B) 6 in the video

Yes. The correct answer is 6 only. Please follow video explanation.

2
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!