Self Studies

Computer Science Test - 3

Result Self Studies

Computer Science Test - 3
  • Score

    -

    out of -
  • Rank

    -

    out of -
TIME Taken - -
Self Studies

SHARING IS CARING

If our Website helped you a little, then kindly spread our voice using Social Networks. Spread our word to your readers, friends, teachers, students & all those close ones who deserve to know what you know now.

Self Studies Self Studies
Weekly Quiz Competition
  • Question 1
    2 / -0.66

    In a J-K flip flop, when J = 1 and K = 1 then it will be considered as:

    Solution

    Concept

    JK flip flop:

    The truth table of JK flipflop:

    T flip-flop is formed by combining both J and K inputs of the JK-flipflop

    In the above truth table when J = K = 1, its output is toggled.

    Characteristic Table of JK flip flop

    J

    K

    Qn

    Qn+1

    0

    0

    0

    0

    0

    0

    1

    1

    0

    1

    0

    0

    0

    1

    1

    0

    1

    0

    0

    1

    1

    0

    1

    1

    1

    1

    0

    1

    1

    1

    1

    0

  • Question 2
    2 / -0.66

    Consider 4 matrices Q, R, S and T with dimensions 13 × 12, 12 × 30, 30 × 15 and 15 × 18 respectively. What is the least number of scalar multiplications needed to find the product QRST using the basic matrix multiplication method?

    Solution

    Given matrices Q, R, S, and T with dimensions 13 × 12, 12 × 30, 30 × 15, and 15 × 18 respectively. From the given matrices sequence of dimensions can be seen as:

    <P0, P1, P2, P3, P4> = <13, 12, 30, 15, 18>

    Let c[i, j]  be the minimum number of scalar multiplications needed to compute the product QRST.

    Using Dynamic Programming recursive definition of c[i, j] is given as-


    Hence the minimum number of scalar multiplications needed to compute the product QRST is 11250 using (Q(RS))T).

  • Question 3
    2 / -0.66

    Directions For Questions

    Consider a Turing machine M given below that accepts the language.

    L = {bnan+1 |n ≥ 1}

    B in ‘M’ represents Blank symbol.

    ...view full instructions

    What will be the missing part/transition for P and Q respectively in the given Turing machine?

    Solution

    The above given Turing machine is accepting L={bnan+1} as for example

     "bbaaa" is accepted by the Turing machine.

    • (q0, b) → (q1, x, R)
    • (q1, b) → (q1, b, R)
    • (q1, a) → (q2, y, L)
    • (q2, b) → (q2, b, L)
    • (q2, x) → (q1, x, R)
    • (q1, y) → (q1, y, R)
    • (q1, a) → (q2, y, L)
    • (q2, y) → (q2, y, L)
    • (q2, x) → (q0, x, R)
    • (q0, y) → (q3, y, R)
    • (q3, y) → (q3, y, R)
    • (q3, a) → (q4, a, R)
    • (q4, B) → (q5, B, L)
  • Question 4
    2 / -0.66

    [A] is a square matrix which is neither symmetric nor skew-symmetric and [A]T is its transpose. The sum and difference of these matrices are defined as [S] = [A] + [A]T and [D] = [A] - [A]T, respectively. Which of the following statements is true?

    Solution

  • Question 5
    2 / -0.66

    To derive the string length 4, How many minimum productions are required for Chomsky normal form ?

    Solution

    The correct answer is 7.

    Concept:

    Chomsky's normal form:

    A Chomsky normal form follows the,

    V→VV (Exactly 2 non-terminals)

    V is Non-terminals

    V→T (Exactly one terminal)

    T is terminal

    Explanation:

    If length n=1, Number of productions = 1

    S→a

    If length n=2, Number of productions = 3

    S→AB

    A→a

    B→b

    If length n=3, Number of productions = 5

    S→AX

    X→BC

    A→a

    B→b

    C→c

    According to this, If length n, the number of productions = (2n-1) is required.

    n=4,

    then,

    (2(4)-1)= 7 productions

    Hence the correct answer is 7.

  • Question 6
    2 / -0.66

    A router uses the following routing table:

    Destination

    Mask

    Interface

    144.16.0.0

    255.255.0.0

    eth0

    144.16.64.0

    255.255.224.0

    eth1

    144.16.68.0

    255.255.255.0

    eth2

    144.16.68.64

    255.255.255.224

    eth3

    A packet bearing an estimation address 144.16.68.117 arrives at the router. On which interface will it be forwarded?

    Solution

    The correct answer is "option 3".

    CALCULATION:

    To calculate the interface, perform the following steps:

    1.Bitwise AND between IP address 144.16.68.117 & subnet mask.

    2.Match the output network address with the destination address given corresponding to the subnet mask.  

    DESTINATION

     

    ADDRESS (GIVEN)

    MASK

    BITWISE AND (ADDRESS & MASK)

    144.16.0.0

    144.16.68.117

    255.255.0.0

    144.16.0.0

    144.16.64.0

    144.16.68.117

    255.255.224.0

    144.16.64.0

    144.16.68.0

    144.16.68.117

    255.255.255.0

    144.16.68.0

    144.16.68.64

    144.16.68.117

    255.255.255.224

    144.16.68.96

    Option 3:

     

    1st Octet

    2nd Octet

    3rd Octet

    4th Octet

    144.16.68.117 

    10010000

    00010000 

    01000100

    1110101

    255.255.255.0 (&)

    11111111

    11111111

    11111111

    00000000

    Result

    10010000 

    00010000

    01000100

    00000000

      144 16 68 0

    Hence, the packet with IP address 144.16.68.117 will be forwarded to the interface eth2.

  • Question 7
    2 / -0.66

    Box A contains 2 black and 3 red balls while box B contains 3 black and 4 red balls. Out of these two boxes one is selected at random and the probability of choosing box A is double that of box B. If a red ball is drawn from the selected box, then the probability that it has come from box B is

    Solution

    Concept:

    Let A be the event of choosing box A, and B be the event of choosing box B, and R is the event of drawing a red ball.


  • Question 8
    2 / -0.66

    For the given IP address: 150.32.4.1/22, which of the following cannot be valid host IDs on the LAN interface attached to the router?

    Solution

    Concept:

    150.32.2.1/22

    Therefore 22 bits are in NID and only 10 bits for Host id.

    Explanation:

    Last two-byte of IP address is represented in binary

    Ethernet: 150.32.4.1/22

    Range of IP address: 150.32.0000 0100.0000000 to 150.32.0000111.11111111

    Range of IP address: 150.32.4.0 to 150.32.7.255

    First and last IP address is reserved

    Valid Host IP address: 150.32.4.1 to 150.32.7.254

    Option 2:150.32.3.28 

    It does not fall in 150.32.4.0 to 150.32.7.255

  • Question 9
    2 / -0.66

    Solution

  • Question 10
    2 / -0.66

    Find the decimal equivalent of the bit pattern 10111111110100000000000000000000 as per the IEEE 754 standard. In IEEE 754 a single bit precision binary floating point format is stored in 32 bits.

    S ( 1 bit )

    E ( 8 bits )

    M ( 23 bits )

    Exponent is biased with 127.

    Solution

    1

    01111111

    10100000000000000000000

       S          E                  M

    Sign bit: 1 (negative)

    Actual exponent : Biased exponent – Bias = 127 – 127  = 0

    Mantissa = 1010000000000000000000

    In IEEE-754 format, 32-bit (single precision)

    (-1)s × 1.M × 2E – 127

    -1)s × 1.101 × 2127 – 127

    Data: -( 20 × 1 + .2-1 × 1 + 2-3 × 1)

    Data: - (1 + 0.5 + 0.125

    Data: - 1.625

Self Studies
User
Question Analysis
  • Correct -

  • Wrong -

  • Skipped -

My Perfomance
  • Score

    -

    out of -
  • Rank

    -

    out of -
Re-Attempt Weekly Quiz Competition
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now