Skip to content

GATE CS question library

Practise GATE CS Computer Science previous year questions free. Browse by subject, syllabus topic, year and question type, with answers and available solutions.

Subject, topic, year and type filter the full library. Match any choice within a filter, and all selected filter categories. Search, source and sort apply to this page.

20 on this page
Official PYQ2006Computer Organization and ArchitectureMachine Instructions and Addressing ModesMCQ · 1 mark
Consider a new instruction named branch-on-bit-set (mnemonic bbs). The instruction “bbs reg, pos, label” jumps to label if bit in position pos of register operand reg is one. A register is 3232 -bits wide and the bits are numbered 00 to 31,31, bit in position 00 being the least significant. Consider the following emulation of this instruction on a …
Official PYQ2006Computer Organization and ArchitectureInstruction PipeliningMCQ · 1 mark
A CPU has a five-stage pipeline and runs at 11 GHz frequency. Instruction fetch happens in the first stage of the pipeline. A conditional branch instruction computes the target address and evaluates the condition in the third stage of the pipeline. The processor stops fetching new instructions following a conditional branch until the branch outcome is …
Official PYQ2006Computer Organization and ArchitectureMemory Hierarchy: Cache, Main Memory and Secondary StorageMCQ · 1 mark
A CPU has a cache with block size 6464 bytes. The main memory has kk banks, each bank being cc bytes wide. Consecutive cc − byte chunks are mapped on consecutive banks with wrap-around. All the kk banks can be accessed in parallel, but two accesses to the same bank must be serialized. A cache block access may involve multiple iterations of …
Official PYQ2006Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
Consider numbers represented in 4-bit Gray code. Let h3h2h1h0h_{3}h_{2}h_{1}h_{0} be the Gray code representation of a number nn and let g3g2g1g0g_{3}g_{2}g_{1}g_{0} be the Gray code of (n+1)(modulo16)(n+1)(modulo 16) value of the number. Which one of the following functions is correct?
Official PYQ2006Digital LogicNumber Representations (Fixed and Floating Point)MCQ · 1 mark
We consider the addition of two 2′s2's complement numbers bn−1bn−2…b0b_{n-1}b_{n-2}\dots b_{0} and an−1an−2…a0a_{n-1}a_{n-2}\dots a_{0}. A binary adder for adding unsigned binary numbers is used to add the two numbers. The sum is denoted by cn−1cn−2…c0c_{n-1}c_{n-2}\dots c_{0} and the carry-out by coutc_{out}. Which one of the following options correctly identifies the overflow …
Official PYQ2006Digital LogicMinimization (K-Maps etc.)MCQ · 1 mark
Consider a Boolean function f(w,x,y,z)f(w,x,y,z). Suppose that exactly one of its inputs is allowed to change at a time. If the function happens to be true for two input vectors i1=⟨w1,x1,y1,z1⟩i_{1}=\left \langle w_{1}, x_{1}, y_{1},z_{1}\right \rangle and i2=⟨w2,x2,y2,z2⟩i_{2}=\left \langle w_{2}, x_{2}, y_{2},z_{2}\right \rangle , we would like the function to remain true as the input …
Official PYQ2006Digital LogicCombinational CircuitsMCQ · 1 mark
Consider the circuit in the diagram. The ⊕\oplus operator represents Ex-OR. The D flip-flops are initialized to zeroes (cleared). The following data: 100110000100110000 is supplied to the “data” terminal in nine clock cycles. After that the values of q2q1q0q_{2}q_{1}q_{0} are:
Official PYQ2006Digital LogicComputer ArithmeticMCQ · 1 mark
Given two three bit numbers a2a1a0a_{2}a_{1}a_{0} and b2b1b0b_{2}b_{1}b_{0} and cc the carry in, the function that represents the carry generate function when these two numbers are added is:
Official PYQ2006Digital LogicCombinational CircuitsMCQ · 1 mark
Consider the circuit above. Which one of the following options correctly represents f(x,y,z)f\left(x,y,z\right)
Official PYQ2006Theory of ComputationRegular Expressions and Finite AutomataMCQ · 1 mark
Consider the regular language L=(111+11111)∗.L=(111+11111)^{*}. The minimum number of states in any DFA accepting this languages is:
Official PYQ2006Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Let L1L_1 be a regular language, L2L_2 be a deterministic context-free language and L3L_3 a recursively enumerable, but not recursive, language. Which one of the following statements is false?
Official PYQ2006Compiler DesignParsing (LL, LR)MCQ · 1 mark
Consider the following statements about the context free grammar G={S→SS,S→ab,S→ba,S→ϵ}G = \left \{ S \rightarrow SS, S \rightarrow ab, S \rightarrow ba, S \rightarrow \epsilon \right \} GG is ambiguous GG produces all strings with equal number of aa’s and bb’s GG can be accepted by a deterministic PDA. Which combination below expresses all the true statements …
Official PYQ2006Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
Let SHAM3_3 be the problem of finding a Hamiltonian cycle in a graph G=(V,E)G=(V,E) with ∣V∣|V| divisible by 33 and DHAM3_3 be the problem of determining if a Hamiltonian cycle exists in such graphs. Which one of the following is true?
Official PYQ2006Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
For s∈(0+1)∗s\in (0+1)^{*} let d(s)d(s) denote the decimal value of s(s (e.g. d(101)=5).d (101) = 5 ). Let L={s∈(0+1)∗∣d(s) mod 5=2 and d(s) mod 7≠4}L=\left \{ s\in (0+1)^*\mid d(s) \text{ mod } 5=2 \text{ and }d(s) \text{ mod } 7\neq 4 \right \}Which one of the following statements is true?
Official PYQ2006Theory of ComputationRegular and Context-free LanguagesMCQ · 1 mark
If ss is a string over (0+1)∗(0+1)^* then let n0(s)n_0(s) denote the number of 00’s in ss and n1(s)n_1(s) the number of 11’s in ss. Which one of the following languages is not regular?
Official PYQ2006Engineering MathematicsPropositional and First Order LogicMCQ · 1 mark
A logical binary relation ⊙\odot, is defined as follows: …
Official PYQ2006Engineering MathematicsPropositional and First Order LogicMCQ · 1 mark
Consider the following propositional statements: P1:((A∧B)→C))≡((A→C)∧(B→C))P_1: ((A ∧ B) → C)) ≡ ((A → C) ∧ (B → C)) P2:((A∨B)→C))≡((A→C)∨(B→C))P_2: ((A ∨ B) → C)) ≡ ((A → C) ∨ (B → C)) Which one of the following is true?
Official PYQ2006Engineering MathematicsPropositional and First Order LogicMCQ · 1 mark
Which one of the first order predicate calculus statements given below correctly expresses the following English statement? Tigers and lions attack if they are hungry or threatened.
Official PYQ2006Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
Let S={1,2,3,…,m},m>3.S = \{1, 2, 3,\ldots, m\}, m >3. Let X1,…,XnX_1,\ldots,X_n be subsets of SS each of size 3.3. Define a function ff from SS to the set of natural numbers as, f(i)f(i) is the number of sets XjX_j that contain the element i.i. That is f(i)=∣{j∣i∈Xj}∣f(i)=\left | \left\{j \mid i\in X_j \right\} \right| then ∑i=1mf(i)\sum_{i=1}^{m} f(i) is:
Official PYQ2006Engineering MathematicsSets, Relations and FunctionsMCQ · 1 mark
Given a set of elements N=1,2,...,nN = {1, 2, ..., n} and two arbitrary subsets A⊆NA⊆N and B⊆NB⊆N, how many of the n! permutations π\pi from NN to NN satisfy min⁡(π(A))=min⁡(π(B))\min(\pi(A)) = \min(\pi(B)), where min⁡(S)\min(S) is the smallest integer in the set of integers SS, and π\pi(S) is the set of integers obtained by applying permutation π\pi to each …