Recent questions tagged goclasses2024-mockgate-13

723
views
1 answers
4 votes
A university's mathematics department has $10$ professors and will offer $20$ different courses next semester. Each professor will be assigned to teach exactly $2$ of the...
557
views
1 answers
3 votes
The order of a leaf node in a $\text{B tree}$ is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is $1 \mathrm{~K}$ bytes,...
321
views
1 answers
3 votes
Consider the following two schedules consisting to two transaction $\mathrm{T}_1$ and $\mathrm{T}_2$ :Which of the following is/are true about these schedules?Both $\math...
521
views
1 answers
2 votes
In typical RISC ISA, delayed branch executes which instruction irrespective of whether the branch condition is true or false?Instruction immediately following the branch ...
753
views
1 answers
7 votes
Consider a processor with an in-order five-stage pipeline (IF, ID, EX, MEM, and WB) with clock cycle time $10 \mathrm{~ns}$. This processor is executing a program in whic...
463
views
1 answers
3 votes
Let $\mathrm{T}$ be the smallest AVL tree of height $h$. How many nodes does it have, if the smallest AVL tree of height $h-2$ has $m$ nodes and the smallest AVL tree of ...
526
views
2 answers
4 votes
Consider the null-terminated linked list of four integers $\textsf{1->2->3->4->NULL},$ and the variable 'list' points to the head of the linked list. Upon running the pro...
623
views
1 answers
3 votes
Consider the syntax-directed translation given by the following grammar and semantic rules. Here, $S$ is the only non-terminal and $\Sigma=\{0,1,2\}$ is a set of terminal...
429
views
1 answers
4 votes
Consider the following grammar$$\begin{aligned}& A \rightarrow B B \\& B \rightarrow b\end{aligned}$$Suppose we draw an $\operatorname{LR}(0)$ automatan for the given gra...
912
views
3 answers
7 votes
You are given a complete binary tree (each level must be full except the last) on $n$ vertices. Each vertex $v$ is labeled by an integer value $x_v$. Say that a vertex is...
410
views
1 answers
5 votes
Consider the following weighted graph, where the weight of every edge is written on the edge itself.What is the number of possible minimum spanning trees for the above gr...
783
views
1 answers
11 votes
Consider the following statements related to Huffman's algorithm:$\text{S1:}$ If there is exactly one symbol with a frequency of $1 / 3$, and all other symbols have frequ...
585
views
2 answers
9 votes
Let $A$ be a $2 \times 2$ matrix for which there is a constant $k$ such that the sum of the entries in each row and each column is $k$. Which of the following must be an ...
522
views
1 answers
5 votes
Football teams $T_1$ and $T_2$ play two games against each other in the Premier League. It is assumed that the outcomes of the two games are independent of each other. Th...
960
views
2 answers
7 votes
Imagine a computer with a $32$-bit virtual address space and $\text{1 KB}$ pages. It uses a two-level page table system, with page-sized chunks at the inner level(not at ...
554
views
1 answers
7 votes
Assume that for a given system, virtual addresses are $40$ bits long and physical addresses are $30$ bits long. The page size is $8$ KB. The Translation Look-aside Buffer...
382
views
1 answers
3 votes
#include<stdio.h #include<string.h char upstr[50]; void putStar (int n,char str[]){ upstr[n] = str[n]; if(n == strlen(str)) return; else upstr[n+1] = '*'; putStar(n+1,str...
636
views
2 answers
8 votes
#include <stdio.h int main() { int i= 255; short int *s= (short int *)&i; printf("%d\n", *s); }What will be the output of the above program in little-endian and big-endia...
585
views
1 answers
5 votes
We want to use semaphores to implement a shared critical section (CS) among three threads $\mathrm{T} 1$, $\mathrm{T} 2$, and $\mathrm{T} 3$.We want to enforce the execut...
403
views
1 answers
2 votes
Consider a laptop trying to access a file via HTTP from a server. The laptop knows its own IP address and the server's IP address.Below list the following messages that a...
981
views
2 answers
8 votes
A TCP connection has been established between hosts $\text{A}$ and $\text{B. A}$ receives a packet from $\text{B}$ with the following field values shown below:Sequence: $...
1.0k
views
1 answers
8 votes
Consider a sliding window protocol with a window size of $5$ using cumulative ACKs (and ACK is being sent for each segment).Retransmissions: retransmissions occur under t...
995
views
2 answers
9 votes
Suppose we use $\textsf{IEEE-754}$ single precision floating point format to represent the numbers in binary. What will be the hexadecimal representation of $-2^{-146}?$$...
844
views
1 answers
6 votes
Assume a cache memory with the following properties:The cache size $\text{(C)}$ is 512 bytes (contains $512$ data bytes)The cache uses an LRU (least recently used) policy...
596
views
1 answers
5 votes
Recall that a Turing machine $\text{T}$ can be represented or 'coded' by an integer $m$. Let us write 'the $m$ th Turing machine' to mean the Turing machine coded by $m$....
519
views
1 answers
7 votes
For a string $x=x_1 \cdots x_n \in \Sigma^*$, where $\Sigma$ is any alphabet and $x_1, \ldots, x_n \in \Sigma$, we write $x^{\uparrow m}=x^m$ (that is, the usual power of...
678
views
1 answers
8 votes
Consider a pushdown automaton (PDA) with two control states $Q=\{q 1, q 2\}$, start state $q 1$, input alphabet $\Sigma=\{a, b\}$, stack alphabet $\Gamma=\{\perp, a\}$ (w...
503
views
1 answers
5 votes
Your code is required to perform the function $(\text{M}\%16) \ast 3.$ What should you do to eliminate multiplication ($\ast$) and mod($\%$), assuming $\mathrm{M}$ is $32...
627
views
3 answers
2 votes
For the circuit in the figure below, if the current state $\text{Q}_3\text{Q}_2\text{Q}_1\text{Q}_0$ is $6$ (in decimal) i.e. $\text{Q}_3\text{Q}_2\text{Q}_1\text{Q}_0=01...
588
views
2 answers
4 votes
You are asked to implement the following four functions with half-adders:$$\begin{aligned}& \mathrm{f}_1=A \oplus B \oplus C \\& \mathrm{f}_2=A^{\prime} B C+A B^{\prime} ...