• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE CS 1996

Question 51

A logic network has two data inputs A and B, and two control inputs C0 and C1. It implements the function F according to the following table. logiic         . Implement the circuit using one 4 to 1 Multiplexer, one 2-input Exclusive OR gate, one 2-input AND gate, one 2-input OR gate and one Inverter.

    Question 52

    An 8052 based system has an output port with address 00H. Consider the following assembly language program.
    ORG    0100H
    MVI    A, 00H
    LXI    H, 0105H
    OUT    00H
    INR    A
    PCHL
    HLT
    a) What does the program do with respect to the output port 00H?
    b) Show the wave forms at the three least significant bits of the port 00H.
    

      Question 53

      A demand paged virtual memory system uses 16 bit virtual address, page size of 256 bytes, and has 1 Kbyte of main memory. LRU page replacement is implemented using a list whose current status (page number in decimal) is pagetab       . For each hexadecimal address in the address sequence given below
       00FF, 010D, 10FF, 11B0
      
      indicate i) the new status of the list ii) page faults, if any, and iii) page replacements, if any

        Question 54

        The Fibonacci sequence {f1, f2, f3,....., fn} is defined by the following recurrence: fn+2 = fn+1 + fn, n ≥ 1; f= 1 : f= 1 Prove by induction that every third element of the sequence is even.

          Question 55

          Let mat1 be two matrices such that mat2 Express the elements of D in terms of the elements of B.

            Question 56

            Let G be a context-free grammar where G = ( { S, A, B, C}, { a,b, d}, P, S ) with the productions in P given below.
            S → ABAC
            A → aA ∣ ε
            B → bB ∣ ε
            C → d
            
            (ε denotes null string). Transform the grammar G to an equivalent context-free grammar G\' that has no ε productions and no unit productions. (A unit production is of the form x → y, and x and y are non terminals.)

              Question 57

              Given below are the transition diagrams for two finite state machine M1 and M2 recognizing languages L1 and L2 respectively. fa1               . a) Display the transition diagram for a machine that recognizes L. L2, obtained from transition diagrams for M1 and M2 by adding only ε transitions and no new states. b) Modify the transition diagram obtained in part(a) obtain a transition diagram for a machine that recognizes (L1.L2) by adding only ε transitions and no new states. (Final states are enclosed in double circles).

                Question 58

                Let Q = ( {q1,q2}, {a,b}, {a,b,Z}, δ, Z, ϕ) be a pushdown automaton accepting by empty stack for the language which is the set of all non empty even palindromes over the set {a,b}. Below is an incomplete specification of the transitions δ. Complete the specification. The top of the stack is assumed to be at the right end of the string representing stack contents.
                δ(q1, a, Z)={(q1, Za)}
                δ(q1, b, Z)={(q1, Zb)}
                δ(q1, a, a)={(..... , .....)}
                δ(q1, b, b)={(..... , .....)}
                δ(q2, a, a)={(q2, ϵ)}
                δ(q2, b, b)={(q2, ϵ)}
                δ(q2, ϵ, Z)={(q2, ϵ)}

                  Question 59

                  A two dimensional array A[1...n][1...n] of integers is partially sorted if
                  i, j ∈ [1...n−1], A[i][j] < A[i][j+1] and A[i][j] < A[i+1][j]
                  
                  Fill in the blanks: a) The smallest item in the array is at A[i][j] where i=..................and j=...................... b) The smallest item is deleted. Complete the following O(n) procedure to insert item x (which is guaranteed to be smaller than any item in the last row or column) still keeping A partially sorted.
                  procedure insert (x: integer);
                  var i,j: integer;
                  begin
                      i:=1; j:=1, A[i][j]:=x;
                      while (x > ...... or x > ......) do
                          if A[i+1][j] < A[i][j] ......... then begin
                              A[i][j]:=A[i+1][j]; i:=i+1;
                          end
                          else begin
                              ............
                          end
                      A[i][j]:= .............
                  end
                  .
                  
                  

                    Question 60

                    Insert the characters of the string K R P C S N Y T J M into a hash table of size 10. Use the hash function

                    h(x) = ( ord(x) – ord("A") + 1 ) mod10
                    

                    If linear probing is used to resolve collisions, then the following insertion causes collision

                    • Y

                    • C

                    • M

                    • P

                    There are 75 questions to complete.

                    Last Updated :
                    Take a part in the ongoing discussion