IAE Academy

GATE 2023 IN Q.42: solution and answer

GATE 2023 · INQ.42 · 2 marks · MCQ

In the circuit shown, the initial binary content of shift register A is 1101 and that of shift register B is 1010. The shift registers are positive-edge triggered, and the gates have no delay.

When the shift control is high, what will be the binary content of the shift registers A and B after four clock pulses?

GATE 2023 IN question 42: Two 4-bit shift registers in cascade, both shifting to the right.Tap to open full size
Figure from the GATE 2023 IN paper. It is part of the question.
Figure description

Two 4-bit shift registers in cascade, both shifting to the right. Shift Register A holds, left to right, 1 1 0 1 (call the cells A1 A2 A3 A4). Shift Register B holds, left to right, 1 0 1 0 (B1 B2 B3 B4). The serial output of A (the rightmost cell A4) feeds the serial input of B (its leftmost cell). The serial input of A (leftmost cell A1) comes from a 2-input XOR gate. XOR input 1: a wire from the top of the second cell of A (A2) goes up and into a NOT gate (triangle pointing left with the bubble on its left-hand output); the inverter output runs left and down into the upper XOR input, so that input is A2 complemented. XOR input 2: a wire from the top of the rightmost cell of A (A4) goes up, runs left across the top of the figure, down the left side and right into the lower XOR input. Clocking: a 2-input AND gate takes 'Clock' and 'Shift Control'; its output is the common clock of both registers (drawn as arrows into the bottom of Shift Register A and Shift Register B). The registers are positive-edge triggered.

  1. (A)

    A = 1101, B = 1101

  2. (B)

    A = 1110, B = 1001

  3. (C)

    A = 0101, B = 1101

  4. (D)

    A = 1010, B = 1111

Answer and solution

ANSWER

After four clock pulses, A = 0101 and B = 1101. The answer is option (C).

Official answer: CSource: Official answer key, GATE 2023 IN (IIT Kanpur)

  1. Clock gating. The AND gate passes the clock only when Shift Control is 1. Shift Control is high here, so both registers shift on every rising edge of the clock.

  2. Label the cells and read the connections. Call A's cells and B's cells , left to right. Both registers shift right, and feeds . The inverter complements , and the long top wire brings back , so the serial input of A is where means the complement of .

  3. Next-state rule on each rising edge. The gates have no delay, so is always worked out from the contents present just before the edge.

  4. Clock 1. , so , and . After the edge, and .

  5. Clock 2. , so , and . After the edge, and .

  6. Clock 3. , so , and . After the edge, and .

  7. Clock 4. , so , and . After the edge, and .

  8. Check. After four shifts, every one of A's original four bits has moved into B, in the same order. So B must be , which rules out (B) and (D). Only the XOR feedback separates (A) from (C), and the clock-by-clock working gives . The answer is option (C): , .

KEY IDEA

A 4-bit shift register fully empties in four shifts. So B ends up holding A's original contents (1101), and A ends up holding the four feedback bits it produced, the newest on the left. Each feedback bit is worked out from the register contents just before its clock edge.

WATCH OUT FOR

Treating A as a plain ring counter, with fed straight back to . That brings A back to 1101 after four shifts and gives option (A), but it ignores the XOR and the inverter. Other slips are dropping the inverter on , taking the tap from the wrong cell, and working out from contents that have already shifted instead of the contents just before the edge.

From the GATE 2023 IN paper. Every question of this paper · Download the full paper · All 30 Sequential questions, with notes

More Sequential questions