GATE 2024 (Session 1)
65 questions
MCQ 29 · MSQ 20 · NAT 161-mark 30 · 2-mark 35
Questions 26–30 of 65
Which of the following is/are Bottom-Up Parser(s)?
One or more options are correct.
Answer: (A), (D)
A bottom-up parser starts at the leaves and builds the parse tree up to the root. It does this by using reductions. Shift-reduce parsers, the operator precedence parser and the LR family (LR(0), SLR, LALR, CLR) are of this type.
The predictive parser and the LL(1) parser are top-down parsers.
Answer: Shift-reduce Parser, LR Parser
The predictive parser and the LL(1) parser are top-down parsers.
Answer: Shift-reduce Parser, LR Parser
Let and be two events in a probability space with , and . Which of the following statements is/are TRUE?
One or more options are correct.
Answer: (B), (C)
Test each statement:
- Independence: FALSE.
- TRUE.
- TRUE.
- FALSE.
Answer: and
- Independence: FALSE.
- TRUE.
- TRUE.
- FALSE.
Answer: and
Consider the circuit shown below where the gates may have propagation delays. Assume that all signal transitions occur instantaneously and that wires have no delays. Which of the following statements about the circuit is/are CORRECT?
One or more options are correct.
Answer: (A), (C)
From the figure, X goes straight into one input of the AND gate and through a NOT gate into the other, so .
- (A) TRUE, (B) FALSE. With no delays, for both values of X, so Y is always 0.
- (C) TRUE. When X changes from 0 to 1, the direct input of the AND gate becomes 1 at once. The NOT output is still 1 (the old value of ) until its delay is over. For this short time both inputs are 1, so Y shows a transient 1 (a glitch).
- (D) FALSE. When X changes from 1 to 0, the direct input becomes 0 at once, so the AND output stays 0 whatever the NOT output does. Y stays at 0 the whole time, so it has no transient 0 (it never leaves 0 at all).
Answer: (A), (C)
- (A) TRUE, (B) FALSE. With no delays, for both values of X, so Y is always 0.
- (C) TRUE. When X changes from 0 to 1, the direct input of the AND gate becomes 1 at once. The NOT output is still 1 (the old value of ) until its delay is over. For this short time both inputs are 1, so Y shows a transient 1 (a glitch).
- (D) FALSE. When X changes from 1 to 0, the direct input becomes 0 at once, so the AND output stays 0 whatever the NOT output does. Y stays at 0 the whole time, so it has no transient 0 (it never leaves 0 at all).
Answer: (A), (C)
TCP client P successfully establishes a connection to TCP server . Let denote the sequence number in the SYN sent from to . Let denote the acknowledgement number in the SYN ACK from Q to P. Which of the following statements is/are CORRECT?
One or more options are correct.
Answer: (A), (D)
Let us go through each statement:
- The initial sequence number (ISN) is picked at random (this avoids mix-ups with old segments and helps security) This is TRUE. It is not always 0.
- A SYN segment uses up one sequence number. So Q acknowledges with the next number it expects: This is TRUE (so is false).
Answer: is picked at random by P;
- The initial sequence number (ISN) is picked at random (this avoids mix-ups with old segments and helps security) This is TRUE. It is not always 0.
- A SYN segment uses up one sequence number. So Q acknowledges with the next number it expects: This is TRUE (so is false).
Answer: is picked at random by P;
Consider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback (WB) stages. Which of the following statements about forwarding is/are CORRECT?
One or more options are correct.
Answer: (A), (B), (C)
Let us check each statement one by one:
- Option 1: This is the exact meaning of forwarding (also called bypassing) TRUE.
- Option 2: A value ready at the MEM output (for example, a loaded value) can be sent to the EX input of a later instruction TRUE.
- Option 3: Forwarding cannot remove all stalls. For example, a load followed right away by an instruction that uses the loaded value still needs 1 stall (load-use hazard) TRUE.
- Option 4: Forwarding needs extra hardware (extra paths, multiplexers, hazard detection logic) FALSE.
Answer: Options 1, 2 and 3
- Option 1: This is the exact meaning of forwarding (also called bypassing) TRUE.
- Option 2: A value ready at the MEM output (for example, a loaded value) can be sent to the EX input of a later instruction TRUE.
- Option 3: Forwarding cannot remove all stalls. For example, a load followed right away by an instruction that uses the loaded value still needs 1 stall (load-use hazard) TRUE.
- Option 4: Forwarding needs extra hardware (extra paths, multiplexers, hazard detection logic) FALSE.
Answer: Options 1, 2 and 3