In the figure shown, the positive edge triggered D flip-flops are initially reset to Q = 0. The logic gates and the multiplexers have no propagation delay. After reset, a train of clock pulses (CLK) are applied. The logic-states of the inputs DIN, S and the clock pulses are also shown in the figure. Assuming no timing violations, the sequence of output Y from the 3rd clock to the 5th clock, is
Tap to open full sizeFigure description
Circuit: three identical stages, each a 2:1 MUX (inputs labelled 0 on top and 1 below, select line S common to all three) whose output drives the D input of a positive-edge-triggered D flip-flop; all three clock inputs are tied to the common CLK line. Stage 1: MUX input 0 = Q1 (fed back from its own Q), MUX input 1 = DIN. Stage 2: MUX input 0 = Q2 (own feedback), MUX input 1 = Q1. Stage 3: MUX input 0 = Q3 (own feedback), MUX input 1 = Q2. So S = 1 shifts right (DIN -> Q1 -> Q2 -> Q3) and S = 0 holds. Output logic: left 2-input AND gate has inputs Q̄1 (complement output of FF1) and Q2; right 2-input AND gate has inputs Q2 and Q3; both AND outputs go to a 2-input NAND gate whose output is Y. Q̄2 and Q̄3 are unconnected. Timing diagram: CLK shows 8 pulses numbered 1 to 8, dashed vertical lines at each rising edge. S: high from the start through rising edge 3, goes low between edges 3 and 4, back high between edges 4 and 5, low between edges 5 and 6, high between edges 6 and 7 and stays high through edge 8 (S at edges 1-8 = 1,1,1,0,1,0,1,1). DIN: high through edge 2, goes low between edges 2 and 3, goes high between edges 3 and 4, stays high through edge 7, goes low between edges 7 and 8 (DIN at edges 1-8 = 1,1,0,1,1,1,1,0).
- (A)
001
- (B)
010
- (C)
000
- (D)
011