Quiz Electronics Engineering
Exam: NIC
Topic: Miscellaneous
Date: 13/07/2020
Each Question carries 1 Mark
Negative Marking: 1/4
Time: 10 Minutes
Q1. The total number of page faults for the reference string 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 using FIFO page replacement policy for a process, if 3 frames are allocated to it are :
(a) 9
(b) 10
(c) 8
(d) 11
Q2. Which field is optional in UDP?
(a) Length
(b) Destination port
(c) Checksum
(d) None
Q3. The present output Q_n of an edge triggered JK flip-flop is logic 0. If J = 1, then Q_(n+1):
(a) cannot be determined
(b) will be logic 0
(c) will wave around
(d) will be logic 1
Q4. Which of the following statements are not correct?
S1: 3 NF decomposition is always lossless join and dependency preserving.
S2: 3 NF decomposition is always lossless join but may or may not be dependency preserving.
S3: BCNF decomposition is always lossless join and dependency preserving.
S4: BCNF decomposition is always lossless join but may or may not be dependency preserving.
(a) Only S1
(b) Only S4
(c) Both S1 and S4
(d) Both S2 and S3
Q5. A 1 kHz sinusoidal signal is ideally sampled at 1500 samples/sec and the sampled signal is passed through an ideal low-pass filter with cut-off frequency 800 Hz. The output signal has the frequency.
(a) 0.75 Hz
(b) 0.5 kHz
(c) 0 kHz
(d) 0.25 kHz
Q6. Consider the sequence of 8085 instructions given below :
LXI H, 9258
Mov A, M
CMA
Mov M, A
which one of the following is performed by this sequence?
(a) contents of location 9258 are moved to the accumulator
(b) contents of location 9258 are compared with the contents of the accumulator
(c) contents of location 8529 are complemented and stored in location
(d) contents of location 5892 are complemented and stored in location 5892.
Q7. Concatenation operation refers to which of the following set operations:
(a) Union
(b) Dot
(c) Kleene
(d) None of the above
Q8. The grammar S ⟶ aSb | bSa | SS | ε is :
(a) Unambiguous CFG
(b) Deterministic CFG
(c) Not a CFG
(d) Ambiguous CFG
Q9. Operating system maintains the page table for:
(a) each process
(b) each thread
(c) each instruction
(d) each address
Q10. Let n is the length of string to test for membership, then the number of table entry in CYK algorithm is:
(a) n(n + 1)
(b) n^2 + 1
(c) n^2 – 1
(d) (n(n+1))/2
SOLUTIONS
S1. Ans.(b)
Sol. Given:
Total number of frames = 3
As 3 frames are allocated in the page table so maximum 3 pages can be added. When the Page table is full then the first added page is out from the page table. Hence, total number of page faults for the reference string is 10.
S2. Ans.(c)
Sol. Checksum may or may not be calculated in UDP.
S3. Ans.(d)
Sol. Truth Table of JK Flip Flop is –
CLK J K Qn+1
0 x x Qn
1 0 0 Qn
1 0 1 0
1 1 0 1
1 1 1 (Q_n ) ̅
From Truth Table, we get that if J = 1 then Output will be either ‘Complemented’ or ‘Set’.
As the present output is 0 so in both the case we will get output as ‘1’.
Hence, Q_(n+1) will be logic 1.
S4. Ans.(c)
Sol. If any relation R is decomposed to 3NF, then it will satisfy both lossless and dependency preserving. Decomposition to 3NF guarantees to satisfy both the given properties. But for BCNF, the decomposition doesn’t guarantee to satisfy both the properties. Sometimes if lossless property is satisfied then dependency preserving may not be possible.
S5. Ans.(b)
Sol. Given:
signal frequency is (f_m) = 1 kHz = 1000 Hz
sampling frequency is (f_s) = 1500 samples/sec = 1500 Hz
cut off frequency (f_c) = 800 Hz
Frequency of sampled signal are f_s – f_m and f_s + f_m i.e. 2500 Hz and 500 Hz.
As cut-off frequency is 800 Hz so only sampled frequency with 500 Hz will pass and sampled frequency of 2500 Hz will be restricted.
Hence, The output has the frequency of 0.5 kHz.
S6. Ans.(a)
Sol.
Instruction 1: The location of the data is stored in the HL register pair.
Instruction 2: Move the data stored in the given location of the memory to the accumulator
Instruction 3: The data of the accumulator are complemented.
Instruction 4: The complemented data in the accumulator is again moved to the memory location.
S7. Ans.(b)
S8. Ans.(d)
Sol. An Ambiguous Grammar is a Context-Free Grammar(CFG) for which there exists a string that can have more than one leftmost derivation or parse tree. Here, Null can be generated by more than one parse tree so the grammar is Ambiguous CFG.
⇒ S ⟶ ε
⇒ S ⟶ SS ⟶ ε
S9. Ans.(a)
S10. Ans.(d)
Sol. The table entries in CYK algorithm is in the form of a triangular matrix. If the length of the string is ‘n’ then the number of table entry in CYK algorithm is (n(n+1))/2.