GATE 1992
Question 1 |
The Boolean function in sum of products form where K-map is given below (figure) is:___________

ABC + B'C' + A'C' |

⇒ ABC + B'C' + A'C'
Question 2 |
Consider a 3-bit error detection and 1-bit error correction hamming code for 4-bit date. The extra parity bits required would be ________ and the 3-bit error detection is possible because the code has a minimum distance of ________
Fill in the blanks |
Question 3 |
Many microprocessors have a specified lower limit on clock frequency (apart from the maximum clock frequency limit) because ______
clock frequency can't go below this value. |
Question 4 |
Many of the advanced microprocessors prefetch instructions and store it in an instruction buffer to speed up processing. This speed up is achieved because _________
prefetching the instructions to be executed can save considerable amount of waiting time. |
Question 5 |
A simple and reliable data transfer can be accomplished by using the ‘handshake protocol’. It accomplishes reliable data transfer because for every data item sent by the transmitter __________.
in this case receiver has to respond that receiver can be able to receive the data item. |
Question 6 |
In an 11-bit computer instruction format, the size of address field is 4-bits. The computer uses expanding OP code technique and has 5 two-address instructions and 32 two-address instructions and the number of zero-address instructions it can support is _________
256 |
The possibility of no. of encoding taken by two-address instructions = 5×24×24 = 1280
By one-address instructions = 32×24 = 512
So, the possibility of zero-address instructions = 2048 - (1280 + 512) = 256
Question 7 |
Macro expansion is done in pass one instead of pass two in a pass macro assembler because _________
all macro definitions are processed during the first pass only due to all macro expansions done during pass 1 only not in pass 2. |
Question 8 |
The purpose of instruction location counter in an assembler is _______
used to assign storage address to the program's statements. |
Question 9 |
Complexity of Kruskal’s algorithm for finding the minimum spanning tree of an undirected graph containing n vertices and m edges if the edges are sorted is __________
O(m log n) |
Question 10 |
Maximum number of edges in a planar graph with n vertices is ________
3n - 6 |
⇒ (3n - 2) = 3n - 6
Question 11 |
The operation which is commutative but not associative is:
AND | |
OR | |
EX-OR | |
NAND |
Question 12 |
All digital circuits can be realized using only
Ex-OR gates | |
Multiplexers | |
Half adders | |
OR gates | |
Both B and C |
Question 13 |
Bit-slice processors
Can be cascaded to get any desired word length processor | |
speed of operation is independent of the word length configured | |
don’t contain anything equivalent of program counter in a ‘normal’ microprocessor | |
contain only the data path of a ‘normal’ CPU ` |
Question 14 |
PCHL is an instruction in 8085 which transfers the contents of the register pair HL to PC. This is not a very commonly used instruction as it changes the flow of control in rather ‘unstructured’ fashion. This instruction can be useful in implementing.
if ……. then ….. else ….. construct | |
while …… construct | |
case …… construct | |
call …… construct |
Question 15 |
Start and stop bits do not contain an ‘information’ but are used in serial communication for
Error detection | |
Error correction | |
Synchronization | |
Slowing down the communications |
Question 16 |
Which of the following problems is not NP-hard?
Hamiltonian circuit problem | |
The 0/1 Knapsack problem | |
Finding bi-connected components of a graph | |
The graph colouring problem |
Question 17 |
A 2-3 tree is tree such that
- (a) all internal nodes have either 2 or 3 children
(b) all paths from root to the leaves have the same length
The number of internal nodes of a 2-3 tree having 9 leaves could be
4 | |
5 | |
6 | |
7 | |
Both A and D |

Where L is leaf node.
So, no. of internal node is 4.
Case 2:

Where L is leaf node.
So, no. of internal node is 7.
Question 18 |
A non-planar graph with minimum number of vertices has
9 edges, 6 vertices | |
6 edges, 4 vertices | |
10 edges, 5 vertices | |
9 edges, 5 vertices |

The above graph with 5 vertices and 10 edges is non-planar.
Question 19 |
Following algorithm(s) can be used to sort n integers in the range [1...n3] in O(n) time
Heapsort | |
Quicksort | |
Mergesort | |
Radixsort |
As Radix sort is not comparison based sort (it is counting sort), so can be done in linear time.
Question 20 |
At a particular time of computation the value of a counting semaphore is 7. Then 20 P operations and 15 V operations were completed on this semaphore. The resulting value of the semaphore is:
42 | |
2 | |
7 | |
12 |
Initial value of S is 7.
So after 20P operations and 15V operations the value of semaphore S will be,
S = 7 - 20 + 15 = 2
Question 21 |
A computer system has 6 tape drives, with n process completing for them. Each process may need 3 tape drives. The maximum value of n for which the system is guaranteed to be deadlock free is:
2 | |
3 | |
4 | |
1 |
Question 22 |
Which of the following is an example of a spooled device?
The terminal used to the input data for a program being executed. | |
The secondary memory device in a virtual memory system | |
A line printer used to print the output of a number of jobs. | |
None of the above |
Question 23 |
For a context-free grammar, FOLLOW(A) is the set of terminals that can appear immediately to the right of non-terminal A in some “sentential” form. We define two sets LFOLLOW(A) and RFOLLOW(A) by replacing the word “sentential” by “left sentential” and “right most sentential” respectively in the definition of FOLLOW(A).
Which of the following statements is/are true?
FOLLOW(A) and FOLLOW (A) may be different. | |
FOLLOW(A) and FOLLOW (A) are always the same. | |
All the three sets are identical. | |
All the three sets are different.
| |
Both A and B |
Question 24 |
Consider the SLR(1) and LALR (1) parsing tables for a context free grammar. Which of the following statements is/are true?
The go to part of both tables may be different. | |
The shift entries are identical in both the tables. | |
The reduce entries in the tables may be different. | |
The error entries in the tables may be different. | |
B, C and D. |
Reduce entry and error entry may be different due to conflicts.
Question 25 |
Which of the following predicate calculus statements is/are valid:
(∀x) P(x) ∨ (∀x)Q(x) → (∀x){P(x) ∨ Q(x)}
| |
(∃x)P(x) ∧ ∃(x)Q(x) → (∃x){P(x) ∧ Q(x)} | |
(∀x){P(x) ∨ Q(x)} → (∀x)P(x) ∨ (∀x)Q(x) | |
(∃x){P(x) ∨ Q(x)} → ~(∀x)P(x) ∨ (∃x)Q(x) |
(B) Invalid
(C) Invalid
(D) Invalid
Question 26 |
Which of the following is/are tautology
a ∨ b → b ∧ c | |
a ∧ b → b ∨ c | |
a ∨ b → (b → c) | |
a → b → (b → c) |

Question 27 |
Which of the following regular expression identifies are true?
r(*) = r* | |
(r*s*) = (r+s)* | |
(r+s)* = r* + s* | |
r*s* = r* + s* |
(B) RHS generates Σ* while LHS can't generate strings where r comes after s like sr, srr, etc.
LHS ⊂ RHS.
(C) LHS generates Σ* while RHS can't generate strings where r comes after an s.
RHS ⊂ LHS.
(D) LHS contains all strings where after an s, no r comes. RHS contains all strings of either r or s but no combination of them.
So, RHS ⊂ LHS.
Question 28 |
If G is a context-free grammar and w is a string of length l in L(G), how long is a derivation of w in G, if G is Chomsky normal form?
2l | |
2l + 1 | |
2l - 1 | |
l |
2l - 1
For GNF, it is
l
Question 29 |
Context-free languages are
closed under union | |
closed under complementation | |
closed under intersection | |
closed under Kleene closure | |
Both A and D |
Question 30 |
In which of the cases stated below is the following statement true?
“For every non-deterministic machine M1 there exists an equivalent deterministic machine M2 recognizing the same language“.
M1 is non-deterministic finite automaton | |
M1 is a non-deterministic PDA | |
M1 is a non-deterministic Turing machine | |
For no machine M1 use the above statement true | |
Both A and C |
For every NPDA there does not exist a deterministic PDA.
Every non-deterministic TM has an equivalent deterministic TM.
Question 31 |
Write short answers to the following:
(i) Which of the following macros can put a macro assembler into an infinite loop?
.MACRI M1,X .MACRO M2, X ..IF EQ,X .IF EQ, X M1 X+1 M2X .ENDC .ENDC .IF NE, X .IF NE, X WORD X .WORD X + 1 .ENDC .ENDC .ENDM .ENDM
Give an example of a call that does so.
Theory Explanation. |
Question 32 |
Mention the pass number for each of the following activities that occur in a two pass assembler
- (a) object code generation
(b) literals added literal table
(c) listing printed
(d) address resolution of local symbols
a-2, b-1, c-2, d-1 |
Pass 1:
→ Assign addresses to all statements.
→ Save the values assigned to all labels for use in pass 2.
→ Perform some processing of assembler directives.
Pass 2:
→ Assembler instructions by translating opcode and symbolic operands.
→ Generate data values defined by BYTE, WORD.
→ Perform processing of assembler directives not done in pass 1.
→ Write the object program and the assembly listing.
Question 33 |
How many edges are there in a forest with p components having n vertices in all?
n-p |
Now, '0' edges for p-1 vertices (p-1 components) and n-p edges for n-p+1 vertices (1 component).
So, total of n-p edges for p components.
Question 34 |
Assume that the last element of the set is used as partition element in Quicksort. If n distinct elements from the set [1…..n] are to be sorted, give an input for which Quicksort takes maximum time.
n |
→ The array is already sorted in ascending order.
→ The array is already sorted in descending order.
Question 35 |
Which page replacement policy sometimes leads to more page faults when size of memory is increased?
FIFO |
Question 36 |
(a) Consider addition in two’s complement arithmetic. A carry from the most significant but does not always correspond to an overflow. Explain what is the condition for overflow in two’s complement arithmetic.
(b) A priority encoder accepts three input signals (A, B and C) and produce a two-bit output (X1,X0) corresponding to the highest priority active input signal. Assume A has the highest priority followed by B and C has the lowest priority. If none of the inputs are active the output should be 00. design the priority encoder using 4:1 multiplexers as the main components.
(c) Design a 3-bit counter using D-flip flops such that not more than one flip-flop changes state between any two consecutive states.
Theory Explanation. |
Question 37 |
(a) The access times of the main memory and the Cache memory, in a computer system, are 500 n sec and 50 n sec, respectively. It is estimated that 80% of the main memory request are for read the rest for write. The hit ratio for the read access only is 0.9 and a write-through policy (where both main and cache memories are updated simultaneously) is used. Determine the average time of the main memory.
(b) Three devices A, B and C are corrected to the bus of a computer, input/output transfers for all three devices use interrupt control. Three interrupt request lines INTR1, INTR2 and INTR3 are available with priority of INTR1 > priority of INTR2 > priority of INTR3.
Draw a schematic of the priority logic, using an interrupt mask register, in which Priority of A > Priority of B > Priority of C.
Theory Explanation. |
Question 38 |
A microprocessor is capable of addressing 1 megabyte of memory with a 20-bit address bus. The system to be designed requires 256 K bytes of RAM, 256 K bytes of EPROM, 16 I/O devices (memory mapped I/O) and 1 K byte of EERAM (electrically erasable RAM).
(a) Design a memory map (to reduce decoding logic) and show the decoding logic if the components available are:
Type Size Speed RAM 6 K × 8 140 n sec EPROM 256 K × 8 150 n sec EERAM 256 × 8 500 n sec-read 3µsec-write
(b) The micro processor is operating at 12.5 mHz and provides time equivalent to two clock cycles for memory read and write. Assuming control signals similar to 8085, design the extra logic required for interfacing EERAM.
Theory Explanation. |
Question 39 |
Consider the function F(n) for which the pseudo code is given below:
Function F(n) begin F1 ← 1 if(n=1) then F ← 3 else For i = 1 to n do begin C ← 0 For j = 1 to F(n – 1) do begin C ← C + 1 end F1 = F1 * C end F = F1 end [n is a positive integer greater than zero]
(a) Derive a recurrence relation for F(n)
(b) Solve the recurrence relation for a closed form solutions of F(n).
Theory Explanation. |
Question 40 |
Let T be a Depth First Tree of a undirected graph G. An array P indexed by vertices of G is given. P[V] is the parent of vertex V, in T. Parent of the root is the root itself.
Give a method for finding and printing the cycle formed if the edge (u,v) of G not in T (i.e., e ∈ G − T) is now added to T.
Time taken by your method must be proportional to the length of the cycle.
Describe the algorithm in a PASCAL – like language. Assume that the variables have been suitably declared.
Theory Explanation. |
Question 41 |
Suggest a data structure for representing a subnet S of integers from 1 to n. Following operations on the set S are to be performed in constant time (independent of cardinality of S).
(i) MEMBER(X): Check whether X is the set S or not (ii) FIND-ONE(S): If S is not empty, return one element of the set S (any arbitrary element will do) (iii) ADD(X): Add integer x to set S (iv) DELETE(X): Delete integer x from S.
Give pictorial examples of your data structure. Give routines for these operations in an English like language. You may assume that the data structure has been suitably initialized. Clearly state your assumptions regarding initialization.
Theory Explanation. |
Question 42 |
(a) What type of parameter passing mechanism (call-by-value, call-by-reference, call-by-name, or-by-value result) is the following sequence of actions truing to implement for a procedure call P(A[i]) where P(i:integer) is a procedure and A is an integer array?
1. Create a new local variable, say z. 2. Assign to z the value of A[i]. 3. Execute the body of P using z for A[i] 4. Set A[i] to z.
Is the implementation correct? Explain and correct it if necessary. You are supposed to make only small changes.
(b) Show the activation records and the display structure just after the procedures called at lines marked x and y have started their execution. Be sure to indicate which of the two procedures named A you are referring to.
Program Test; Procedure A; Procedure B; Procedure A; …… end a; begin y:A; end B; begin B; end A; begin x:A; end Test.
Theory Explanation. |
Question 43 |
(a) Write syntax directed definitions (semantic rules) for the following grammar to add the type of each identifier to its entry in the symbol table during semantic analysis. Rewriting the grammar is not permitted and semantic rules are to be added to the ends of productions only.
D → TL; T → int T → real L → L, id L → id
(b) Write 3-address intermediate code (quadruples) for the following boolean expression in the sequence as it would be generated by a compiler. Partial evaluation of Boolean expressions is not permitted. Assume the usual rules of precedence of the operators.
(a + b) > (c + d) or a > c and b < d
Theory Explanation. |
Question 44 |
(a) Draw the precedence graph for the concurrent program given below:
S1 parbegin begin S2:S4 end; begin S3; parbegin S5; begin S6:S8 End parend end; S7 parend; S9
(b) Let the page reference and the working set window be c c d b c e c e a d and 4, respectively. The initial working set at time t = 0 contains the pages {a, d, e}, where a was referenced at time t = 0, d was referenced at time t = -1, and e was referend at time t = -2. determine the total number of page faults and the average number of page frames used by computing the working set at each reference.
Theory Explanation. |
Question 45 |
(a) How is redundancy reduced in the following models?
(i) Hierarchical (ii) Network (iii) Relational
Write a one line answer in each case.
(b) Suppose we have a database consisting of the following three relations:
FREQUENTS (CUSTOMER, HOTEL) SERVES (HOTEL, SNACKS) LIKES (CUSTOMER, SNACKS)
The first indicates the hotels each customer visits, the second tells which snacks each hotel serves and the last indicates which snacks are liked by each customer. Express the following query in relational algebra: print the hotels that serve a snack that customer Rama likes.
Theory Explanation. |
Question 46 |
(a) If G is a group of even order, then show that there exists an element a ≠ e, the identity in g, such that a2 = e
(b) Consider the set of integers {1,2,3, 4,6,8,12,24} together with the two binary operations LCM (lowest common multiple) and GCD (greatest common divisor). Which of the following algebraic structures does this represent?
(i) group (ii) ring (iii) field (iv) lattice
Theory Explanation. |
Question 47 |
(a) Uses Modus ponens (A, A →|= B) or resolution to show that the following set is inconsistent:
(1) Q(x) → P(x)V ~ R(a) (2) R(a) ~ Q(a) (3) Q(a) (4) ~ P(y)
Where x and y are universally quantified variables, a is a constant and P, Q, R are monadic predicates.
(b) Let S be the set of all integers and let n > 1 be a fixed integer. Define for a, b ∈ S, a R biff a-b is a multiple of n. Show that R is an equivalence relation and finds its equivalence classes for n = 5.
Theory Explanation. |
Question 48 |
Which of the following three statements are true? Prove your answer.
- (i) The union of two recursive languages is recursive.
(ii) The language {O"|n is a prime} is not regular.
(iii) Regular languages are closed under infinite union.
Theory Explanation. |