Recent questions tagged gatecse-2004

90 90 votes
5 answers 5 answers
44.5k
44.5k views
Consider the following program segment for a hypothetical CPU having three user registers $R_1, R_2$ and $R_3.$ $$\begin{array}{|l|l|c|} \hline \text {Instruction} & \t...
123 123 votes
23 answers 23 answers
57.2k
57.2k views
A 4-bit carry look ahead adder, which adds two 4-bit numbers, is designed using AND, OR, NOT, NAND, NOR gates only. Assuming that all the inputs are available in both com...
55 55 votes
5 answers 5 answers
27.7k
27.7k views
Consider the partial implementation of a $2-bit$ counter using $T$ flip-flops following the sequence $0-2-3-1-0,$ as shown below.To complete the circuit, the input $X$ sh...
39 39 votes
4 answers 4 answers
12.4k
12.4k views
Consider a multiplexer with $X$ and $Y$ as data inputs and $Z$ the as the control input. $Z=0$ selects input $X$, and $Z=1$ selects input $Y$. What are the connections re...
44 44 votes
2 answers 2 answers
16.7k
16.7k views
Which are the essential prime implicants of the following Boolean function?$f(a, b, c)= a' c+ ac'+b' c$$a' c$ and $ac'$$a' c$ and $b' c$$a' c$ only.$ac'$ and $bc'$
46 46 votes
5 answers 5 answers
20.1k
20.1k views
A circuit outputs a digit in the form of $4$ bits. $0$ is represented by $0000, 1$ by $0001, \ldots, 9$ by $1001$. A combinational circuit is to be designed which takes t...
102 102 votes
9 answers 9 answers
38.9k
38.9k views
Consider three IP networks $A, B$ and $C$. Host $H_A$ in network $A$ sends messages each containing $180$ bytes of application data to a host $H_C$ in network $C$. The $\...
79 79 votes
9 answers 9 answers
30.3k
30.3k views
The routing table of a router is shown below:$$\begin{array}{|l|l|l|} \hline \textbf {Destination} & \textbf {Subnet Mask} & \textbf{Interface} \\\hline \text {128.75.4...
62 62 votes
6 answers 6 answers
29.7k
29.7k views
$A$ and $B$ are the only two stations on an Ethernet. Each has a steady queue of frames to send. Both $A$ and $B$ attempt to transmit a frame, collide, and $A$ wins the f...
57 57 votes
4 answers 4 answers
18.3k
18.3k views
The employee information in a company is stored in the relationEmployee (name, sex, salary, deptName)Consider the following SQL querySelect deptName From Employee Where s...
39 39 votes
4 answers 4 answers
17.9k
17.9k views
The order of an internal node in a $B+$ tree index is the maximum number of children it can have. Suppose that a child pointer takes $6$ bytes, the search field value tak...
94 94 votes
9 answers 9 answers
29.3k
29.3k views
Consider the relation Student (name, sex, marks), where the primary key is shown underlined, pertaining to students in a class that has at least one boy and one girl. Wha...
67 67 votes
9 answers 9 answers
30.6k
30.6k views
The relation scheme $\text{Student Performance (name, courseNo, rollNo, grade)}$ has the following functional dependencies:name, courseNo, $\rightarrow$ graderollNo, cour...
57 57 votes
8 answers 8 answers
40.4k
40.4k views
A unix-style I-nodes has $10$ direct pointers and one single, one double and one triple indirect pointers. Disk block size is $1$ Kbyte, disk block address is $32$ bits, ...
50 50 votes
6 answers 6 answers
19.6k
19.6k views
Consider two processes $P_1$ and $P_2$ accessing the shared variables $X$ and $Y$ protected by two binary semaphores $S_X$ and $S_Y$ respectively, both initialized to 1. ...
34 34 votes
4 answers 4 answers
20.7k
20.7k views
Consider the following set of processes, with the arrival times and the CPU-burst times gives in milliseconds.$$\small \begin{array}{|c|c|c|} \hline \textbf{Process} & \t...
42 42 votes
2 answers 2 answers
17.1k
17.1k views
Consider the grammar with the following translation rules and $E$ as the start symbol$$\begin{array}{lll}E \rightarrow E_ 1\# \: T & \qquad\left\{E.value = E_1.value * ...
54 54 votes
4 answers 4 answers
24.8k
24.8k views
Suppose we run Dijkstra’s single source shortest path algorithm on the following edge-weighted directed graph with vertex $P$ as the source.In what order do the nodes get...
56 56 votes
3 answers 3 answers
14.1k
14.1k views
Consider the following C program segmentstruct CellNode{ struct CellNode *leftChild int element; struct CellNode *rightChild; }; int Dosomething (struct CellNode *ptr) { ...
53 53 votes
8 answers 8 answers
22.1k
22.1k views
What does the following algorithm approximate? (Assume $m 1, \epsilon >0$).x = m; y = 1; While (x-y ϵ) { x = (x+y)/2; y = m/x; } print(x);$\log \, m$$m^2$$m^{\frac{1}{2...
22 22 votes
3 answers 3 answers
11.4k
11.4k views
Consider the following C programmain() { int x, y, m, n; scanf("%d %d", &x, &y); /* Assume x>0 and y>0*/ m = x; n = y; while(m != n) { if (m n) m = m-n; else n = n-m; } ...
96 96 votes
6 answers 6 answers
30.0k
30.0k views
Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among $\text{union, intersection, membership, cardinality}$ wil...
60 60 votes
7 answers 7 answers
20.9k
20.9k views
Two matrices $M_1$ and $M_2$ are to be stored in arrays $A$ and $B$ respectively. Each array can be stored either in row-major or column-major order in contiguous memory ...
42 42 votes
5 answers 5 answers
19.7k
19.7k views
Assume that the operators $+, -, \times$ are left associative and $\;\hat{}\; $ is right associative. The order of precedence (from highest to lowest) is $ \ \;\hat{}\;, ...
38 38 votes
3 answers 3 answers
9.8k
9.8k views
The elements $32, 15, 20, 30, 12, 25, 16,$ are inserted one by one in the given order into a maxHeap. The resultant maxHeap is
82 82 votes
13 answers 13 answers
48.4k
48.4k views
A circularly linked list is used to represent a Queue. A single variable $p$ is used to access the Queue. To which node should $p$ point such that both the operations $\t...
42 42 votes
3 answers 3 answers
14.0k
14.0k views
Consider the label sequences obtained by the following pairs of traversals on a labeled binary tree. Which of these pairs identify a tree uniquely?preorder and postorderi...
15 15 votes
4 answers 4 answers
34.6k
34.6k views
It is desired to design an object-oriented employee record system for a company. Each employee has a name, unique id, and salary. Employees belong to different categories...
60 60 votes
4 answers 4 answers
22.5k
22.5k views
Consider the following C program segment:char p[20]; int i; char* s = "string"; int length = strlen(s); for(i = 0; i < length; i++) p[i] = s[length-i]; printf("%s", p);Th...
44 44 votes
6 answers 6 answers
22.6k
22.6k views
Consider the following program fragment for reversing the digits in a given integer to obtain a new integer.Let $n = d_1\, d_2\, \ldots\, d_m$.int n, rev; rev = 0; while(...