GATE 2021 (Session 2)
64 questions
MCQ 33 · MSQ 13 · NAT 181-mark 29 · 2-mark 35
Questions 61–64 of 64
Consider a Boolean function such that
The number of literals in the minimal sum-of-products expression of is ________
The number of literals in the minimal sum-of-products expression of is ________
Answer: 6
Fill the K-map of from the three conditions (minterm number is in binary).
- : , so minterms 0, 1, 8, 9 are 1.
- : . It is 1 for (minterms 6, 7, 14, 15) and for (minterm 13). Minterms 4, 5, 12 are 0.
- : . For this is , so minterm 11 is 1 and minterm 10 is 0.
- (minterms 2, 3) is not fixed, so these are don't-cares.
The 1s are 0, 1, 6, 7, 8, 9, 11, 13, 14, 15. Three groups of four cover them: (0, 1, 8, 9), (6, 7, 14, 15) and (9, 11, 13, 15). So , with 2 + 2 + 2 = 6 literals.
It cannot be shorter. A term with one literal covers 8 cells and always takes in a 0 of f (minterm 4, 5, 10 or 12), so every term needs at least 2 literals and covers at most 4 cells. Ten 1s need at least 3 terms, so at least 6 literals.
Answer: 6
- : , so minterms 0, 1, 8, 9 are 1.
- : . It is 1 for (minterms 6, 7, 14, 15) and for (minterm 13). Minterms 4, 5, 12 are 0.
- : . For this is , so minterm 11 is 1 and minterm 10 is 0.
- (minterms 2, 3) is not fixed, so these are don't-cares.
The 1s are 0, 1, 6, 7, 8, 9, 11, 13, 14, 15. Three groups of four cover them: (0, 1, 8, 9), (6, 7, 14, 15) and (9, 11, 13, 15). So , with 2 + 2 + 2 = 6 literals.
It cannot be shorter. A term with one literal covers 8 cells and always takes in a 0 of f (minterm 4, 5, 10 or 12), so every term needs at least 2 literals and covers at most 4 cells. Ten 1s need at least 3 terms, so at least 6 literals.
Answer: 6
Consider a pipelined processor with 5 stages, Instruction Fetch(IF), Instruction Decode(ID), Execute (EX), Memory Access (MEM), and Write Back (WB). Each stage of the pipeline, except the EX stage, takes one cycle. Assume that the ID stage merely decodes the instruction and the register read is performed in the EX stage. The EX stage takes one cycle for ADD instruction and two cycles for MUL instruction. Ignore pipeline register latencies.
Consider the following sequence of 8 instructions:
ADD, MUL, ADD, MUL, ADD, MUL, ADD, MUL
Assume that every MUL instruction is data-dependent on the ADD instruction just before it and every ADD instruction (except the first ADD) is data-dependent on the MUL instruction just before it. The speedup defined as follows.
The Speedup achieved in executing the given instruction sequence on the pipelined processor (rounded to 2 decimal places) is _____________
Consider the following sequence of 8 instructions:
ADD, MUL, ADD, MUL, ADD, MUL, ADD, MUL
Assume that every MUL instruction is data-dependent on the ADD instruction just before it and every ADD instruction (except the first ADD) is data-dependent on the MUL instruction just before it. The speedup defined as follows.
The Speedup achieved in executing the given instruction sequence on the pipelined processor (rounded to 2 decimal places) is _____________
Answer: 1.87 to 1.88
Each instruction depends on the one before it. ADD needs 1 cycle in EX and MUL needs 2. IF and ID are cycles 1 and 2, so the first EX is in cycle 3.
With forwarding: a result goes straight from one EX stage to the next, so the EX stages run back to back with no wait. EX takes 4 (1 + 2) = 12 cycles, from cycle 3 to cycle 14. The last MUL then does MEM in cycle 15 and WB in cycle 16. Time = 16 cycles.
Without forwarding: an instruction reads its registers in EX, so its EX can start only after the instruction it depends on has finished WB.
- ADD: EX 3, MEM 4, WB 5.
- Next MUL: EX 6 to 7, MEM 8, WB 9.
- Next ADD: EX 10, MEM 11, WB 12, and so on.
After the first two cycles (IF, ID), each ADD takes 3 cycles (EX, MEM, WB) and each MUL takes 4 cycles (2 EX, MEM, WB), one after the other. Time = 2 + 4 (3 + 4) = 30 cycles.
Speedup =
Answer: 1.88
With forwarding: a result goes straight from one EX stage to the next, so the EX stages run back to back with no wait. EX takes 4 (1 + 2) = 12 cycles, from cycle 3 to cycle 14. The last MUL then does MEM in cycle 15 and WB in cycle 16. Time = 16 cycles.
Without forwarding: an instruction reads its registers in EX, so its EX can start only after the instruction it depends on has finished WB.
- ADD: EX 3, MEM 4, WB 5.
- Next MUL: EX 6 to 7, MEM 8, WB 9.
- Next ADD: EX 10, MEM 11, WB 12, and so on.
After the first two cycles (IF, ID), each ADD takes 3 cycles (EX, MEM, WB) and each MUL takes 4 cycles (2 EX, MEM, WB), one after the other. Time = 2 + 4 (3 + 4) = 30 cycles.
Speedup =
Answer: 1.88
Consider a network using the pure ALOHA medium access control protocol, where each frame is of length 1,000 bits. The channel transmission rate is 1 Mbps (= bits per second). The aggregate number of transmissions across all the nodes (including new frame transmissions and retransmitted frames due to collisions) is modelled as a Poisson process with a rate of 1,000 frames per second. Throughput is defined as the average number of frames successfully transmitted per second. The throughput of the network (rounded to the nearest integer) is ______________
Answer: 130 to 140
Frame time T = 1000 / = 1 ms. Load G = 1000 frames per second 1 ms = 1.
The success probability in pure ALOHA is .
Throughput = 1000 0.135 135 frames per second.
Answer: 135
The success probability in pure ALOHA is .
Throughput = 1000 0.135 135 frames per second.
Answer: 135
In a directed acyclic graph with a source vertex s, the quality-score of a directed path is defined to be the product of the weights of the edges on the path. Further, for a vertex v other than s, the quality-score of v is defined to be the maximum among the quality-scores of all the paths from s to v. The quality-score of s is assumed to be 1.
The sum of the quality-scores of all vertices on the graph shown above is ______
The sum of the quality-scores of all vertices on the graph shown above is ______
Answer: 929
Process the vertices in topological order. For each vertex, keep the largest product of weights reaching it:
- s = 1, c = 1, a = 9
- f = c 9 = 9, and b = a 1 = 9
- d = max(c 1, a 1) = 9
- g = max(f 1, d 9) = 81
- e = max(d 9, b 1) = 81
- t = max(g 1, e 9) = 729
Add all the scores: 1 + 1 + 9 + 9 + 9 + 9 + 81 + 81 + 729 = 929
Answer: 929
- s = 1, c = 1, a = 9
- f = c 9 = 9, and b = a 1 = 9
- d = max(c 1, a 1) = 9
- g = max(f 1, d 9) = 81
- e = max(d 9, b 1) = 81
- t = max(g 1, e 9) = 729
Add all the scores: 1 + 1 + 9 + 9 + 9 + 9 + 81 + 81 + 729 = 929
Answer: 929