GATE / CS ARCHIVE

GATE CSE 2005 / QUESTION 62

Clocked load-or-toggle circuit

Digital Logic · Flip-Flops, Registers & Sequential Circuits · Full GATE CSE 2005 paper

GATE 2005, Q62 2 marks · MCQ
Report issue

Flip-Flops, Registers & Sequential Circuits

Question 62, GATE 2005: Positive-edge D flip-flop has D=A·X+Q′·X′ and output Y=Q. Before successive rising edges X=1, 1, 0, 1, 1; A takes A0, A1, A2, A3, A4. The source draws X changes exactly at some edges. Output over periods 1–5: A A0, A1, A1′, A3, A4; B A0, A1, A2′, A3, A4; C A1, A2, A2′, A3, A4; D A1, A2, A3, A4, A5. Explain the ideal sampling assumption.
Tap to enlarge
Your answer
Answer & solution

Answer: A under pre-edge sampling convention (no official key was published)

The combinational input is D=AX+Q′X′. Thus X=1 loads A and X=0 toggles the previous output. Sampling the values just BEFORE each rising edge, X is 1, 1, 0, 1, 1 and the available A values are A0, A1, A2, A3, A4. The outputs for periods 1–5 are therefore A0, A1, A1′, A3, A4, option A. Both drawings put X transitions exactly on rising edges; an actual device would require setup/hold timing to determine the result reliably. The answer uses the conventional idealized pre-edge interpretation rather than claiming that coincident physical transitions are well-defined.

Evaluate the next-state equation before each clock edge. With X=1 the second product vanishes, so D=A and the register loads that sample. With X=0 the first product vanishes, so D=¬Q and it toggles its previously stored value. The third edge therefore stores ¬A1 rather than an independent A2. This produces option A under pre-edge sampling. A real setup/hold violation at a coincident transition cannot be resolved solely from an ideal Boolean drawing.

Original paper, page 8