A 2-to-1 multiplexer has data inputs D0 and D1, and a select input S. If S = A, D0 = B, and D1 = B', what logic function is implemented at the output Y?
Digital Logic
Question · Easy
Minimize the Boolean function F(A, B, C, D) = Σm(0, 2, 5, 7, 8, 10, 13, 15) using a Karnaugh map.
Question · Medium
For a JK flip-flop, if the current state is Q = 0 and the desired next state is Q+ = 1, what should the input values of J and K be?
Engineering Exam Prep Podcast
Listen on Spotify
Podcast
A 4-bit ripple counter uses flip-flops with a propagation delay of 15 ns each. What is the maximum frequency of the clock signal at which the counter can operate reliably without any decoding spikes?
Question · Hard
What is the minimum number of 2-input NOR gates required to implement a 2-input XOR gate?
Convert the decimal fraction -0.4375 into the IEEE 754 single-precision floating-point format. What is its representation in hexadecimal?
In 2's complement representation, when adding two n-bit signed integers, which Boolean condition detects an arithmetic overflow?
If a number system with base R satisfies the equation (312)_R = (82)_10, what is the value of the base R?
A main memory has a capacity of 16 MB and is word-addressable (1 word = 4 bytes). A direct-mapped cache has a size of 64 KB with a block size of 64 bytes. What are the sizes of the Tag, Index, and Block Offset fields in bits, respectively?
Computer Organization
An instruction pipeline consists of 5 stages with delays of 2.0 ns, 1.5 ns, 2.5 ns, 1.8 ns, and 2.2 ns. The pipeline registers add an overhead delay of 0.2 ns. What is the speedup of this pipeline compared to a non-pipelined processor for a very large number of instructions, assuming no pipeline hazards?
A Program Counter (PC) relative addressing mode instruction is stored at memory address 0x1000. The instruction size is 2 bytes. The address field of the instruction contains the signed 2's complement offset value 0xE0 (-32 in decimal). What is the target branch address calculated by the CPU?
A CPU has a 16-bit instruction format. It supports 32 registers and has a single-operand instruction set. If 40 instructions are 2-address instructions (using two register fields), how many 1-address instructions (using one register field and one opcode field) can be supported using the expanding-opcode technique?
Which of the following statements is TRUE regarding DMA (Direct Memory Access) transfer?
A computer system needs to construct a 512 KB RAM memory using 128 KB x 8-bit RAM chips. How many such chips are required, and what size decoder is needed to select the correct chip?
A processor has a cache memory using the Least Recently Used (LRU) replacement policy. Consider a page reference string: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3. If the cache can hold 3 blocks and is initially empty, how many cache misses (page faults) occur?
Which of the following statements is TRUE regarding horizontal and vertical microprogrammed control units?
What is the output of the following C program? #include <stdio.h> int main() { int arr[] = {10, 20, 30, 40, 50}; int *ptr = arr; printf("%d ", *(ptr++)); printf("%d", *ptr); return 0; }
Programming And Data Structures
Evaluate the following postfix expression using a stack: 5 3 + 6 2 / * 3 5 * +
In a circular queue implemented using an array of size N, with front pointing to the first element and rear pointing to the last element inserted, what is the condition to check if the queue is full?
The preorder traversal of a binary tree is: A, B, D, E, C, F. The inorder traversal is: D, B, E, A, C, F. What is the postorder traversal of this binary tree?
Suppose the numbers 7, 5, 1, 8, 3, 6, 0, 9 are inserted in that order into an initially empty Binary Search Tree (BST). What is the height of the resulting tree? (Assume height of a tree with a single node is 0)
Which of the following statements is TRUE regarding adjacency list and adjacency matrix representations of a graph with V vertices and E edges?
Which of the following arrays represents a valid binary min-heap?
In an AVL tree, after inserting a node, which sequence of rotations is required to balance the tree if the imbalance is caused by a node inserted into the left subtree of the right child of the unbalanced node?
What is the output of the following C function when called twice? #include <stdio.h> void func() { static int x = 5; int y = 5; x += 2; y += 2; printf("%d %d ", x, y); }
Which of the following statements is TRUE regarding hash collision resolution techniques?
If f(n) = O(g(n)) and g(n) = O(h(n)), which of the following asymptotic relations must be true?
Algorithms
Which of the following sorting algorithms is inherently stable, meaning it preserves the relative order of equal keys?
We are multiplying four matrices A1, A2, A3, A4 of dimensions 10x20, 20x30, 30x40, and 40x30, respectively. What is the minimum number of scalar multiplications required to compute their product using dynamic programming?
A set of five characters A, B, C, D, E have probabilities 0.35, 0.25, 0.20, 0.15, 0.05, respectively. What is the average length of the Huffman code for this alphabet?
What is the time complexity of Dijkstra's single-source shortest path algorithm on a graph with V vertices and E edges when implemented using a binary heap?
Which of the following statements is TRUE regarding Prim's and Kruskal's algorithms for finding the Minimum Spanning Tree (MST)?
Solve the recurrence relation T(n) = 8T(n/2) + n^2 using the Master Theorem. What is the asymptotic tight bound of T(n)?
Which of the following statements correctly defines the relation between NP-Hard and NP-Complete problems?
In Breadth-First Search (BFS) of a graph, which data structure is used to keep track of vertices to be visited?
In the Floyd-Warshall all-pairs shortest path algorithm, what is the correct state transition recurrence for the distance matrix element d^(k)[i][j] representing the shortest path from vertex i to vertex j using intermediate vertices from the set {1, 2, ..., k}?
What is the minimum number of states in the minimal Deterministic Finite Automaton (DFA) that accepts the language L = { w ∈ {0, 1}* | w contains an even number of 0s and an even number of 1s }?
Theory Of Computation
Which of the following classes of languages is NOT closed under the intersection operation?
Which of the following languages is context-free but NOT regular?
Which of the following problems is decidable?
According to the Chomsky hierarchy, which type of grammar corresponds to a Pushdown Automaton?
Which of the following statements is TRUE regarding the comparison between Non-Deterministic Finite Automata (NFA) and Deterministic Finite Automata (DFA)?
Consider the Context-Free Grammar G: S -> aS | Sb | a | b Which of the following strings has more than one leftmost derivation, proving that the grammar is ambiguous?
Let L be a regular language. The pumping lemma states that there exists a constant p such that any string w ∈ L with |w| >= p can be split into w = xyz satisfying three conditions: (1) |xy| <= p, (2) |y| >= 1, and (3) xy^i z ∈ L for all i >= 0. Which of the following languages is proven non-regular using this lemma?
In a compiler, which phase is responsible for grouping characters of the source program into meaningful sequences called lexemes, and producing tokens?
Compiler Design
Consider the grammar G: S -> a A b A -> c | ε What are the sets FIRST(S) and FOLLOW(A) for this grammar?
Which of the following parsing conflicts is resolved by rewriting the grammar to be non-ambiguous, or by using operator precedence rules in LR parsing?
Loading more…