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

GATE 2024 (Session 2)

65 questions

MCQ 32 · MSQ 18 · NAT 151-mark 30 · 2-mark 35

Questions 61–65 of 65

Q61Machine Instruction2 marksNAT
A processor uses a 32-bit instruction format and supports byte-addressable memory access. The ISA of the processor has 150 distinct instructions. The instructions are equally divided into two types, namely R-type and I-type, whose formats are shown below.
R-type Instruction Format: I-type Instruction Format: OPCODEUNUSEDDST RegisterSRC Register1SRC Register 2 OPCODEDST RegisterSRC Register# Immediate value/address
In the OPCODE, 1 bit is used to distinguish between I-type and R-type instructions and the remaining bits indicate the operation. The processor has 50 architectural registers, and all register fields in the instructions are of equal size.
Let X be the number of bits used to encode the UNUSED field, Y be the number of bits used to encode the OPCODE field, and Z be the number of bits used to encode the immediate value/address field. The value of X + 2Y + Z is ______

Q62Regular Language2 marksNAT
Let L1L_1 be the language represented by the regular expression b∗ab∗(ab∗ab∗)∗b^* a b^*\left(a b^* a b^*\right)^* and L2={w∈(a+b)∗∣∣w∣≤4}L_2=\left\{w \in(a+b)^* \mid |w| \leq 4\right\}, where ∣w∣|w| denotes the length of string ww. The number of strings in L2L_2 which are also in L1L_1 is ___

Q63Group Theory2 marksNAT
Let ZnZ_n be the group of integers {0,1,2,…,n−1}\{0,1,2, \ldots, n-1\} with addition modulo nn as the group operation. The number of elements in the group Z2×Z3×Z4Z_2 \times Z_3 \times Z_4 that are their own inverses is

Q64Memory Management2 marksNAT
Consider a 32-bit system with 4 KB4 \mathrm{~KB} page size and page table entries of size 4 bytes each. Assume 1 KB=2101 \mathrm{~KB}=2^{10} bytes. The OS uses a 2-level page table for memory management, with the page table containing an outer page directory and an inner page table. The OS allocates a page for the outer page directory upon process creation. The OS uses demand paging when allocating memory for the inner page table, i.e., a page of the inner page table is allocated only if it contains at least one valid page table entry.
An active process in this system accesses 2000 unique pages during its execution, and none of the pages are swapped out to disk. After it completes the page accesses, let XX denote the minimum and YY denote the maximum number of pages across the two levels of the page table of the process.
The value of X+YX+Y is _____

Q65Context Free Grammar2 marksNAT
Consider the following augmented grammar, which is to be parsed with a SLR parser. The set of terminals is {a,b,c,d,#,@}\{a, b, c, d, \#, @\}
S′→SS→SS∣Aa∣bAc∣Bc∣bBaA→d#B→@\begin{aligned} & S^{\prime} \rightarrow S \\ & S \rightarrow S S|A a| b A c|B c| b B a \\ & A \rightarrow d \# \\ & B \rightarrow @ \end{aligned}
Let I0=CLOSURE⁡({S′→∙S})I_0=\operatorname{CLOSURE}\left(\left\{S^{\prime} \rightarrow \bullet S\right\}\right). The number of items in the set GOTO⁡(I0,S)\operatorname{GOTO}\left(I_0, S\right) is ____