GATE 2016 (Session 2) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2016 (Session 2)

65 questions

MCQ 38 · NAT 271-mark 30 · 2-mark 35

Questions 41–45 of 65

Q41Machine Instruction2 marksNAT
Consider a processor with 64 registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register identifiers, one destination register identifier, and a twelve-bit immediate value. Each instruction must be stored in memory in byte-aligned fashion. If a program has 100 instructions, the amount of memory(in bytes) consumed by the program text is _____ .

Q42Cache Memory2 marksNAT
The width of the physical address on a machine is 40 bits. The width of the tag field in a 512KB 8-way set associative cache is ________ bits.

Q43Pipeline Processor2 marksNAT
Consider a 3GHz (gigahertz) processor with a three-stage pipeline and stage latencies τ1\tau _{1}, τ2\tau _{2}, and τ3\tau _{3} such that τ1=3τ2/4=2τ3\tau _{1}=3\tau _{2}/4=2\tau _{3}. If the longest pipeline stage is split into two pipeline stages of equal latency, the new frequency is _____GHz, ignoring delays in the pipeline registers.

Q44Heap Tree2 marksNAT
A complete binary min-heap is made by including each integer in [1,1023] exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth 0. The maximum depth at which integer 9 can appear is_____. .

Q45Loop2 marksMCQ−0.67 if wrong
The following function computes XYX^{Y} for positive integers X and Y.

int exp(int X,int Y){
    int res=1, a=X, b=Y;
    while (b!=0){
    if(b%2==0){a=a*a;  b=b/2;}
    else {res=res*a;  b=b-1;}
   }
   return res;
}
Which one of the following conditions is TRUE before every iteration of the loop?