Latest Posts

A lexical analyzer uses the following patterns to recognize three tokens T1, T2, and T3 over the alphabet {a,b,c}.

Q. A lexical analyzer uses the following patterns to recognize three tokens T1, T2, and T3 over the alphabet {a,b,c}. ๐‘‡1:   ๐‘Ž? (๐‘|๐‘)โˆ—๐‘Ž ๐‘‡2:   ๐‘? (๐‘Ž|๐‘)โˆ—๐‘ ๐‘‡3:ย  ย ๐‘? (๐‘|๐‘Ž)โˆ—๐‘ Note that โ€˜x?โ€™ means 0 or 1 occurrence of the symbol x. Note also that the analyzer outputs the ...

READ MORE +
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 ...

READ MORE +
The size of the physical address space of a processor is 2๐‘ƒ bytes

Q. The size of the physical address space of a processor is 2๐‘ƒ bytes. The word length is 2๐‘Š bytes. The capacity of cache memory is 2๐‘ bytes. The size of each cache block is 2๐‘€ words. For a ๐พ-way set-associative cache memory, the length (in number of bits) of the tag field is (A) ๐‘ƒ โˆ’ ๐‘ โˆ’ log2 ...

READ MORE +
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 ...

READ MORE +
Gkseries.com
Logo
Register New Account