GATE 2025 (Session 2)
65 questions
MCQ 32 · MSQ 18 · NAT 151-mark 30 · 2-mark 35
Questions 31–35 of 65
Consider the following logic circuit diagram.
Which is/are the CORRECT option(s) for the output function ?
Which is/are the CORRECT option(s) for the output function ?
One or more options are correct.
Answer: (A), (B), (C)
Reading the circuit: a NAND gate takes directly and gives . A separate inverter works on the line only and gives . A third branch inverts and then ANDs it with , which gives . All three signals go into a last OR gate:
By De Morgan's law, . So the output becomes . The term is already covered by alone (when is true, is also true). So by the absorption law, exactly. This is the same function as .
So , and are only different (redundant) ways to write the same function. Only is a different function.
Answer: ; ; and (all equivalent, all correct).
By De Morgan's law, . So the output becomes . The term is already covered by alone (when is true, is also true). So by the absorption law, exactly. This is the same function as .
So , and are only different (redundant) ways to write the same function. Only is a different function.
Answer: ; ; and (all equivalent, all correct).
The following two signed 2's complement numbers (multiplicand and multiplier ) are being multiplied using Booth's algorithm:
The total number of addition and subtraction operations to be performed is ________. (Answer in integer)
The total number of addition and subtraction operations to be performed is ________. (Answer in integer)
Answer: 13
In Booth's algorithm each bit of the multiplier is paired with the bit to its right, , where . The pair means subtract , the pair means add , and the pairs and need only a shift.
, with added on the right. The pairs , from up to , are:
00, 10, 01, 10, 01, 10, 01, 10, 01, 00, 10, 01, 00, 10, 01, 10
Three pairs are (at ) and need no add or subtract. The other pairs are or : 7 subtractions and 6 additions, which is 13 operations.
Answer: 13
, with added on the right. The pairs , from up to , are:
00, 10, 01, 10, 01, 10, 01, 10, 01, 00, 10, 01, 00, 10, 01, 10
Three pairs are (at ) and need no add or subtract. The other pairs are or : 7 subtractions and 6 additions, which is 13 operations.
Answer: 13
int x=126,y=105;
do {
if(x>y) x=x-y;
else y=y-x;
} while(x!=y);
printf("%d",x); The output of the given C code segment is ________. (Answer in integer)Answer: 21
The loop works like the subtraction-based Euclidean algorithm. It finds . At each step, the smaller number is taken away from the larger one. This goes on until both numbers are the same, and that happens at their GCD.
Start with : first ; next ; next ; next ; then — now , so the loop stops.
Answer: 21
Start with : first ; next ; next ; next ; then — now , so the loop stops.
Answer: 21
In a 4-bit ripple counter, if the period of the waveform at the last flip-flop is 64 microseconds, then the frequency of the ripple counter in kHz is ________. (Answer in integer)
Answer: 250
In an -bit ripple counter, every flip-flop output has half the frequency of the one before it (the period doubles), because each stage divides the input clock frequency by . So the period at the last (4th) flip-flop is times the period of the input clock.
Period of the input clock: . Frequency of the input clock: Hz, which kHz.
Answer: 250
Period of the input clock: . Frequency of the input clock: Hz, which kHz.
Answer: 250
Suppose the values 10, -4, 15, 30, 20, 5, 60, 19 are inserted in that order into an initially empty binary search tree. Let be the resulting binary search tree. The number of edges in the path from the node containing 19 to the root node of is ___________. (Answer in integer)
Answer: 4
Put each value into the BST one by one. Go left if the value is smaller than the current node, and go right if it is larger:
(root), then (left of ), then (right of ), then (right of ), then (left of ), then (right of ), then (right of ), then (left of ).
Path from up to the root: . This has edges.
Answer: 4
(root), then (left of ), then (right of ), then (right of ), then (left of ), then (right of ), then (right of ), then (left of ).
Path from up to the root: . This has edges.
Answer: 4