IAE Academy

GATE 2025 CS2 Q.61: solution and answer

GATE 2025 · CS2Q.61 · 2 marks · NAT

An application executes number of instructions in 6.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 type | Clock cycles required per instruction (CPI) | Number of instructions executed |
|---|---|---|
| Branch | 2 | |
| Load | 5 | |
| Store | 4 | |
| Arithmetic | 3 | |

GATE 2025 CS2 question 61: A 4-row × 3-column table.Tap to open full size
Figure from the GATE 2025 CS2 paper. It is part of the question.
Figure description

A 4-row × 3-column table. Header row: 'Instruction type', 'Clock cycles required per instruction (CPI)', 'Number of instructions executed'. Data rows: Branch/2/2.25×10^8; Load/5/1.20×10^8; Store/4/1.65×10^8; Arithmetic/3/1.30×10^8.

Answer and solution

ANSWER

The duration of a clock cycle is 3.0 nanoseconds.

Official answer: 3.0Source: Official answer key, GATE 2025 CS2 (IIT Roorkee)

  1. Total clock cycles = Σ(CPI_i × instructions_i) over the four instruction types.

  2. Branch: cycles.

  3. Load: cycles.

  4. Store: cycles.

  5. Arithmetic: cycles.

  6. Total cycles cycles.

  7. Total execution time .

  8. Clock cycle time .

KEY IDEA

Total clock cycles = Σ(CPI_i × count_i) for each instruction class; total execution time = total cycles × clock cycle time, so clock cycle time = total execution time / total clock cycles.

WATCH OUT FOR

Dividing the given total time (6.3 s) by the given total instruction count (6.4×10^8) to get an "average time per instruction" instead of first computing total clock cycles from the CPI table and dividing time by cycles — this conflates cycles with instructions and ignores the CPI values entirely.

From the GATE 2025 CS2 paper. Every question of this paper · Download the full paper · All 12 Pipelining questions, with notes

More Pipelining questions