Skip to content
Official PYQ · 2025

GATE CS 2025 Set 2 Q51 — Machine Instructions and Addressing Modes

Explain with AI
An application executes 6.4×1086.4 \times 10^{8} number of instructions in 6.36.3 seconds. There are four types of instructions, the details of which are given in the table. The duration of a clock cycle in nanoseconds is __________. (rounded off to one decimal place)

Instruction typeClock cycles required perinstruction (CPI)Number of instructions executedBranch22.25×108Load51.20×108Store41.65×108Arithmetic31.30×108\begin{array}{|c|c|c|} \hline \text{Instruction type} & \text{Clock cycles required per} \\& \text{instruction (CPI)} & \text{Number of instructions executed} \\ \hline \text{Branch} & \text{2} & \text{$2.25 \times 10^{8}$} \\ \hline \text{Load} & \text{5} & \text{$1.20 \times 10^{8}$} \\ \hline \text{Store} & \text{4} & \text{$1.65 \times 10^{8}$} \\ \hline \text{Arithmetic} & \text{3} & \text{$1.30 \times 10^{8}$} \\ \hline \end{array}
View worked solution

Answer: 3.0:3.0

To find the duration of a clock cycle, we first need to calculate the total number of clock cycles required to execute all the instructions.

1. Calculate Total Clock Cycles

The total number of clock cycles is the sum of the cycles required for each instruction type:

Total Cycles=∑(CPIi×Instruction Counti)\text{Total Cycles} = \sum (\text{CPI}_i \times \text{Instruction Count}_i)

Substituting the values from the table:

Total Cycles=(2×2.25×108)+(5×1.20×108)+(4×1.65×108)+(3×1.30×108)=(4.50+6.00+6.60+3.90)×108=21.0×108 cycles\begin{aligned} \text{Total Cycles} &= (2 \times 2.25 \times 10^{8}) + (5 \times 1.20 \times 10^{8}) + (4 \times 1.65 \times 10^{8}) + (3 \times 1.30 \times 10^{8}) \\ &= (4.50 + 6.00 + 6.60 + 3.90) \times 10^{8} \\ &= 21.0 \times 10^{8} \text{ cycles} \end{aligned}

2. Calculate Clock Cycle Duration (TcT_c)

The total execution time is given by:

Execution Time=Total Cycles×Tc\text{Execution Time} = \text{Total Cycles} \times T_c

Given that the execution time is 6.36.3 seconds:

6.3=21.0×108×Tc6.3 = 21.0 \times 10^{8} \times T_c Tc=6.321.0×108 secondsT_c = \frac{6.3}{21.0 \times 10^{8}} \text{ seconds} Tc=0.3×10−8 seconds=3.0×10−9 secondsT_c = 0.3 \times 10^{-8} \text{ seconds} = 3.0 \times 10^{-9} \text{ seconds}

Since 1 nanosecond (ns)=10−9 seconds1 \text{ nanosecond (ns)} = 10^{-9} \text{ seconds}:

Tc=3.0 nsT_c = 3.0 \text{ ns}

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Machine Instructions and Addressing Modes questions