GATE

Consider the following problems. 𝐿(𝐺) denotes the language generated by a grammar 𝐺

Consider the following problems. 𝐿(𝐺) denotes the language generated by a grammar 𝐺

Q. Consider the following problems. 𝐿(𝐺) denotes the language generated by a grammar 𝐺. 𝐿(𝑀) denotes the language accepted by a machine 𝑀. I. For an unrestricted grammar 𝐺 and a string 𝑤, whether 𝑤 ∈ 𝐿(𝐺) II. Given a Turing machine M, whether L(M) is regular III. Given two grammars 𝐺1 and 𝐺2, whether […]

Consider the following problems. 𝐿(𝐺) denotes the language generated by a grammar 𝐺 Read More »

Consider the unsigned 8-bit fixed point binary number representation below

Consider the unsigned 8-bit fixed point binary number representation below

Q. Consider the unsigned 8-bit fixed point binary number representation below, b7 b6 b5 b4 b3 .  b2 b1 b0 Where the position of the binary point is between b3 and b2. Assume b7 is the most significant bit. Some of the decimal numbers listed below cannot be represented exactly in the above representation: (i)       31.500      (ii)    0.875    

Consider the unsigned 8-bit fixed point binary number representation below Read More »

Consider the following C code. Assume that unsigned long int type length is 64 bits

Consider the following C code. Assume that unsigned long int type length is 64 bits

Q. Consider the following C code. Assume that unsigned long int type length is 64 bits. The value returned when we call fun with the input 240 is (A) 4                           (B) 5                           (C) 6                           (D) 40 Ans: 5 Sol: // n takes 2^40unsigned long int fun(unsigned long int n) { }

Consider the following C code. Assume that unsigned long int type length is 64 bits Read More »

Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits-per- second)

Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits-per- second)

Q. Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits-per- second). The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closest integer) before this sequence number can be used again is     Ans: 34 Sol: As sequence number field of TCP is

Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits-per- second) Read More »

Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops

Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops

Q. Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops. The number of states in the state transition diagram of this circuit that have a transition back to the same state on some value of “in” is                . Ans: 2

Consider the sequential circuit shown in the figure, where both flip-flops used are positive edge-triggered D flip-flops Read More »

Scroll to Top