Gate 1992
Gate 1992
(i) The Boolean function in sum of products form where K-map is given below
(figure) is: _ _ _ __
~ 0 1
0 1 0
-
1 A A
(ii) 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
(iii) Many microprocessors have a specified lower limit on clock frequency (apart
from the maximum clock frequency limit) because _ __
(iv) Many of the advanced microprocessors prefetch instructions and store it in
an instruction buffer to speed up processing. This speed up is achieved
because _ _ __
(v) 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 _ _ _ __
(vi) 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 _ _ __
(vii) Macro expansion is done in pass one instead of pass two in a pass macro
assembler because _ _ _ __
(viii) The purpose of instruction location counter in an assembler is _ __
(ix) 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 _ _ _ __
(x) Maximum number of edges in a planar graph with n vertices is _ _ __
2. Choose the correct alternatives (more than one may be correct) and write the
corresponding letters only:
(i) The operation which is commutative but not associative is:
(a) AND (b) OR (c) EX-OR (d) NAND
(ii) All digital circuits can be realized using only
(a) Ex-OR gates (b) Multiplexers
(c) Half adders (d) OR gates
www.examrace.com
(iii) Bit-slice processors
(a) Can be cascaded to get any desired word length processor
(b) speed of operation is independent of the word length configured
(c) don't contain anything equivalent of program counter in a 'normal'
microprocessor
(d) contain only the data path of a 'normal' CPU
(iv) 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.
(a) if ....... then ..... else ..... construct (b) while ...... construct
(c) case ...... construct (d) call ...... construct
(v) Start and stop bits do not contain an 'information' but are used in serial
communication for
(a) Error detection (b) Error correction
(c) Synchronization
(d) Slowing down the communications
www.examrace.com
(x) 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:
(a) 42 (b) 2 (c) 7 (d) 12
(xi) A computer system has 6 tape drives, with n process completing for them.
Each process may need 3 tape drives. The maximu m value of n for which the
system is guaranteed to be deadlock free is:
(a) 2 (b) 3 (c) 4 (d) 1
(xiii) For a context-free grammar, FOLLOW(A) is the set of te rminals 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?
(a) FOLLOW(A) and FOLLOW (A) may be different.
(b) FOLLOW(A) and FOLLOW (A) are always the sa me.
(c) All the three sets are identical.
(d) All the three sets are different.
(xiv) Consider the SLR(1) and LALR (1) parsing tables for a context free
grammar. Which of the following statements is/are true?
(a) The go to part of both tables may be different.
(b) The shift entries are identical in both the tables.
(c) The reduce entries in the tables may be different.
(d) The error entries in the tables may be different.
www.examrace.com
(xvi) Which of the following is/are tautology
(a) avb---?bAC (b) aAb---?bvc
(c) a v b ____, (b ---7 c) (d) a ---7 b ---7 (b ____,c)
(ii) Mention the pass number for each of the following activities that occur in a
two pass assembler
www.examrace.com
(a) object code generation (b) literals added literal table
(c) listing printed
(d) address resolution of local symbols
(iii) How many edges are there in a forest with p components having n vertices in
all?
(iv) Assume that the last element of the set is used as partition element in
Quicksort. If n distinct elements from the set [l.. ... n] are to be sorted, give
an input for which Quicksort takes maximum time.
(v) Which page replacement policy sometimes leads to more page faults when
size of memory is increased?
SECTION- B
4. (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 , X 0 ) 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.
5. (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.
www.examrace.com
(a) Design a memory map (to reduce decoding logic) and show the decoding
logic if the components available are:
Type Size Speed
RAM 6 Kx8 140 n sec
EPROM 256 K X 8 150 n sec
EERAM 256 X 8 500 n sec-read 31JSec-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.
7. Consider the function F(n) for which the pseudo code is given below:
Function F(n)
begin
F1 f- 1
if(n=1) then F f- 3
else For i = 1 to n do
begin
Cf-0
For j = 1 to F( n - 1) do
begin C f- 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).
www.examrace.com
(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 setS
(iv) DELETE(X): De lete 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 regard ing initialization.
Program Test;
Procedure A;
Procedure B;
Procedure A;
end a;
begin
y:A;
end B;
begin
B;
end A;
begin
x:A;
end Test.
www.examrace.com
11. (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
12. (a) Draw the precedence graph for the concurrent program given below:
51
parbeg in
begin
52:54
end;
begin
53;
parbegin
5s;
begin
56:5s
End
parend
end;
57
Parend;
5g
(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 timet = 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.
www.examrace.com
13. (a) How is redu ndancy 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 relat ions:
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 t hat serve a
snack that customer Rama likes.
14. (a) If G is a group of even order, then show that t here exists an element a* e,
2
the identity in g, such that a = 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 algebra ic structures does this rep resent?
(i) group (ii) ring
(iii) field (iv) lattice
15. (a) Uses Modus ponens (A, A -71= B)or resolution to show that the following set
is inconsistent:
(1) Q(x) -7 P(x)V "'R(a)
(2) R(a) "'Q(a)
(3) Q(a)
(4) NP(y)
Where x and y are universally quantified variables, a is a constant and P, Q, R
are monadic pred icates.
(b) LetS be the set of all integers and let n > 1 be a fixed integer. Define for a,
b E 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.
16. Which of the following three statements are true? Prove your answer.
(i) The union of two recursive languages is recursive.
(ii) The language {O"In is a prime} is not reg ular.
(iii) Regular languages are closed under infinite union.
www.examrace.com