GATE / CS ARCHIVE

SIMILAR QUESTIONS / DIGITAL LOGIC

Trace synchronous flip-flop state updates

19 questions solved the same way, newest first. Back to Digital Logic

How these are solved

Read D/JK/T input equations and the common clock, compute every next bit from the SAME old state using its characteristic equation, then enumerate states under the specified input/initialization to answer transition, sequence, cycle or reachability.

2 marks · NAT
Report issue

Finding the cycle length of a twisted-ring counter

Counters & Timing

Question 60, GATE 2025: Four D flip-flops share a clock. Their outputs feed the next inputs as Q0→D1, Q1→D2, Q2→D3, and complemented Q3→D0. Starting from any four-bit initial state, how many distinct states occur before it returns? The wording may count or exclude the initial state; the official interval is 7–8.
Tap to enlarge
Answer & solution

Official answer: 7 to 8

Our answer: 8

Approach: Derive the synchronous state update and show its period for every initial state, rather than checking only all-zero initialization.
Write the state as (q0,q1,q2,q3). The next-state map is T(q0,q1,q2,q3)=(¬q3,q0,q1,q2), because a D flip-flop copies its input at a clock edge. After four clocks every original bit has shifted through the complemented feedback once, so T^4(q)=¬q. After eight clocks it has been complemented twice, so T^8(q)=q.
The map is invertible, and each orbit’s period divides eight. Possible smaller divisors are 1,2,4, but any such period would make T^4(q)=q. That is impossible because no Boolean vector equals its bitwise complement. Hence every initial vector lies on an eight-state cycle.
For example, 0000→1000→1100→1110→1111→0111→0011→0001→0000. Counting the initial state gives eight distinct cycle states; counting only new states visited after leaving it and before return gives seven. Preserve the official 7–8 range while distinguishing the conventions. The feedback was visually confirmed to use complemented Q3, not Q3.

Original paper, page 60 · Answer key

2 marks · MCQ
Report issue

Finite-State Machine Design

Question 43, GATE 2023: A synchronous circuit starts at (Q1,Q2,Q3)=(0,1,1). Its first T flip-flop input is NOT Q3, its middle D flip-flop input is Q1, and its third T flip-flop input is Q2; all share one clock. Which state is unreachable? A 001; B 100; C 101; D 111.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

All three flip-flops share the clock. The inspected wiring gives Q1_next=Q1 XOR NOT Q3, Q2_next=Q1, and Q3_next=Q3 XOR Q2. Starting at 011, simultaneous updates give 000→100→010→101→111→110→011, a seven-state cycle. State001 never occurs, while the other offered states 100, 101, 111 do. Thus A. Each update uses old state values, not sequentially updated outputs.

Teaching detail. A D flip-flop copies its input at the active clock edge; a T flip-flop holds when T=0 and toggles when T=1, so its equation is Qnext=Q XOR T. Apply all three equations to the same old state. For initial 011, NOT Q3=0 keeps Q1 at 0, Q2 copies old Q1=0, and Q3 toggles because old Q2=1, giving 000. Continuing until the initial state repeats proves the whole reachable cycle is exhausted; a few sampled clock steps alone would not prove unreachability.

Original paper, page 45 · Answer key

2 marks · MCQ
Report issue

Flip-Flops, Registers & Sequential Circuits

Question 28, GATE 2021: A synchronous three-bit T-flip-flop counter has outputs P,Q,R and common clock. The circuit connects R to T_P, complemented P to T_Q, and complemented Q to T_R. Starting at PQR=000, what are its next three states? A 011,101,000; B 001,010,111; C 011,101,111; D 001,010,000.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

The inspected wiring gives T_P=R, T_Q=¬P, T_R=¬Q, with a shared clock. Since a T flip-flop updates by Q_next=Q XOR T, the simultaneous transition equations are P_next=P XOR R, Q_next=Q XOR ¬P, R_next=R XOR ¬Q. From000 they give 011, then 101, then 000. Thus A. Every right-hand side uses the old state.

The transition trace is: old 000 gives T=(0,1,1), new 011; old 011 gives T=(1,1,0), new 101; old 101 gives T=(1,0,1), new 000. A T input of 0 holds its flip-flop and 1 toggles it. Since all receive the same clock, updating P first and then using the new P to compute Q would incorrectly simulate a sequential program instead of a synchronous circuit.

Original paper, page 25 · Answer key

1 mark · NAT
Report issue

Self-loops of a two-bit shift register

Flip-Flops, Registers & Sequential Circuits

Question 22, GATE 2018: Two positive-edge D flip-flops share a clock. External in feeds D1; Q1 feeds D2; output is Q2. How many states have a transition to themselves for at least one input?
Tap to enlarge
Answer & solution

Official answer: 2

Method

Both flip-flops sample their inputs at the same edge, so Q2 receives the old Q1, not the newly sampled input. With states written q1q2, input 0/1 transitions are: 00→00/10; 01→00/10; 10→01/11; 11→01/11. Only 00 and 11 appear among their own successors. This explicit table also shows why the mixed states cannot remain unchanged for either input.

Solution

Let the state be(q1, q2). On a positive clock edge the next state is(in, q1), because both flip-flops sample old values simultaneously. A self-loop requires in=q1=q2, possible only for 00 with input 0 and 11 with input 1. Exactly2 states have self-loops.

Original paper, page 9 · Answer key

2 marks · MCQ
Report issue

Flip-Flops, Registers & Sequential Circuits

Question 33, GATE 2017: Two flip-flops share a clock. T flip-flop output Q1 feeds the D input; D flip-flop output Q0 feeds the T input. Initial Q1Q0=11 before cycle 1. Select states after cycles 3 and 4: A (11,00); B (11,01); C (00,11); D (01,01).
Tap to enlarge
Your answer
Answer & solution

Official answer: B

1. A T flip-flop toggles when T=1 and holds when T=0, so Q1(next)=Q1 XOR Q0. A D flip-flop copies its input, so Q0(next)=Q1.

2. Both right-hand sides use the old state at the same clock edge. Starting 11, edge 1 gives 01, edge 2 gives 10, and edge 3 gives 11.

3. Edge 4 repeats the first transition and gives 01. Therefore the requested pair is (11,01), B. Updating one flip-flop before computing the other would incorrectly mix old and new states.

Original paper, page 15 · Answer key

1 mark · MCQ
Report issue

Counters & Timing

Question 21, GATE 2015: A 4-bit Johnson counter starts at 0000. Choose its decimal sequence. A 0,1,3,7,15,14,12,8,0; B 0,1,3,5,7,9,11,13,15,0; C 0,2,4,6,8,10,12,14,0; D 0,8,12,14,15,7,3,1,0.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Our answer: D for one shift orientation; A for the reverse

A Johnson counter feeds the complement of one end bit into the other end of a shift register. With the right-shift/MSB-insertion convention, bits fill with ones and then zeros, producing eight states before returning. Reversing the bit-weight convention reflects each four-bit word and converts D into A. Therefore the official D is consistent but not uniquely forced by the direction-free wording; B and C are not this eight-state twisted-ring cycle.

Solution: Complemented end-bit feedback with right shifts gives 0000→1000→1100→1110→1111→0111→0011→0001→0000, the official D. With left shifts and the opposite end-bit feedback, the equally valid Johnson counter gives 0, 1, 3, 7, 15, 14, 12, 8, 0, option A. The question does not specify shift direction or bit-weight orientation; D is conventional, not uniquely implied.

Original paper, page 9 · Answer key

2 marks · MCQ
Report issue

Flip-Flops, Registers & Sequential Circuits

Question 53, GATE 2015: Positive-edge D and JK flip-flops share a clock. D output drives both J,K; JK output drives D input. Initially D output=1, JK output=0. J=K=1 toggles JK; J=K=0 holds it. Both have nonzero propagation delay. Choose JK output including initial value: A 0110110…; B 0100100…; C 011101110…; D 011001100….
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Denote outputs by d,j to distinguish the JK output from its input terminal names. At an edge d′=j. The JK output toggles exactly when d=1, so j′=j XOR d. Apply both using pre-edge values: (1,0)→(0,1)→(1,1)→(1,0). The JK column is 0,1,1,0,1,1,… . Nonzero propagation delay prevents treating one edge-triggered output update as an input sampled by the other at that same edge.

Solution: Let the old outputs be(D, J), where J denotes the JK output. At a common positive edge, Dnext=J and Jnext=J XOR D. From initial(1, 0), the state sequence is(0, 1),(1, 1),(1, 0), repeating every three edges. The JK output including its initial value is 0110110..., A. Both devices sample old outputs at the edge; propagation delays do not make the updates sequential.

Original paper, page 20 · Answer key

2 marks · MCQ
Report issue

Flip-Flops, Registers & Sequential Circuits

Question 45, GATE 2014: Three synchronous JK flip-flops have state Q2Q1Q0 initially 000 and a common clock. The drawing's wiring is J2=Q̅1,K2=Q0; J1=Q2,K1=Q̅2; J0=Q1,K0=Q̅0. The crossing before the first flip-flop is a wire jump, not a junction. Which are the next three states? A 001,010,011; B 111,110,101; C 100,110,111; D 100,011,001.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Step 1: Use the JK characteristic equation Q⁺=J Q̅+K̅ Q, evaluating every input from the same pre-edge state. Do not update flip-flops sequentially. Step 2: At 000, the three (J,K) pairs are (1,0),(0,1),(0,1), so Q2 sets and the other two remain reset: next state 100. Step 3: At 100 the pairs are (1,0),(1,0),(0,1), giving 110. At 110 they are (0,0),(1,0),(1,1), so Q2 holds, Q1 stays set and Q0 toggles to 1, giving 111. Step 4: The sequence is 100,110,111, C. Correctly interpreting the drawn wire jump is essential to these input equations.

Original paper, page 64 · Answer key

2 marks · MCQ
Report issue

Next state of a three-flip-flop counter

Flip-Flops, Registers & Sequential Circuits

Question 50, GATE 2011: Three synchronous D flip-flops have outputs P,Q,R. The source circuit connects R directly to D_P, a NOR of P and R to D_Q, and an AND of Q and the complemented R output to D_R. All sample simultaneously at a clock edge. If PQR=010 immediately before the edge, what is PQR afterward?

(A) 000
(B) 001
(C) 010
(D) 011
Question 50, GATE 2011: Three synchronous D flip-flops have outputs P,Q,R. The source circuit connects R directly to D_P, a NOR of P and R to D_Q, and an AND of Q and the complemented R output to D_R. All sample simultaneously at a clock edge. If PQR=010 immediately before the edge, what is PQR afterward?

(A) 000
(B) 001
(C) 010
(D) 011
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Tracing the wires, including the bridge crossings, gives next-state equations P_next=R, Q_next=NOT(P OR R), and R_next=Q AND NOT R. The upper two gate inputs are P and R; the lower AND gate uses Q and the complemented output of R. All D flip-flops update simultaneously from the pre-edge values. For PQR=010 this gives P_next=0, Q_next=1, R_next=1, so the next state is 011, option D.

For a D flip-flop, the output after the edge equals its D input just before the edge. Substitute the old values P=0,Q=1,R=0 into all three equations: D_P=0; D_Q=NOT(0 OR 0)=1; D_R=1 AND NOT 0=1. Assemble the new values in P,Q,R order as 011. Do not feed the newly computed R back into P in this same step; that would model sequential assignments rather than simultaneous hardware sampling.

Original paper, page 14 · Answer key

2 marks · MCQ
Report issue

Reachable cycle of a three-flip-flop counter

Counters & Timing

Question 51, GATE 2011: Three synchronous D flip-flops have outputs P,Q,R and connections D_P=R, D_Q=NOR(P,R), D_R=AND(Q,NOT R). All sample simultaneously. Starting with all flip-flops reset to zero, how many distinct output states occur?

(A) 3
(B) 4
(C) 5
(D) 6
Question 51, GATE 2011: Three synchronous D flip-flops have outputs P,Q,R and connections D_P=R, D_Q=NOR(P,R), D_R=AND(Q,NOT R). All sample simultaneously. Starting with all flip-flops reset to zero, how many distinct output states occur?

(A) 3
(B) 4
(C) 5
(D) 6
Tap to enlarge
Your answer
Answer & solution

Official answer: B

From the figure the synchronous next-state equations are P_next=R, Q_next=NOT(P OR R), and R_next=Q AND NOT R. Starting from the power-on reset 000 gives 000→010→011→100→000. These four states are distinct, and the return to 000 repeats the same deterministic cycle. Thus the number of reachable states from reset is 4, option B; the question does not ask for all eight possible register patterns.

Evaluate every transition with the same pre-edge rule. At 000 the next bits are 0,1,0. At 010 they are 0,1,1. At 011 they are 1,0,0. At 100 they are 0,0,0. The reset state is included in the count, so there are four distinct states before repetition, not three transitions away from reset. A three-bit register can represent eight states, but its next-state logic and initialization restrict the reachable sequence.

Original paper, page 14 · Answer key

2 marks · MCQ
Report issue

XOR feedback register trace

Flip-Flops, Registers & Sequential Circuits

Question 37, GATE 2006: Three D flip-flops q₂,q₁,q₀ start at 000 and share a clock. Wiring: D₂=q₁, D₁=q₀⊕q₂, D₀=data. Feed the bits 100110000, left to right, one per clock. What is the final q₂q₁q₀?
Options:
(A) 000
(B) 001
(C) 010
(D) 101
Question 37, GATE 2006: Three D flip-flops q₂,q₁,q₀ start at 000 and share a clock. Wiring: D₂=q₁, D₁=q₀⊕q₂, D₀=data. Feed the bits 100110000, left to right, one per clock. What is the final q₂q₁q₀?
Options:
(A) 000
(B) 001
(C) 010
(D) 101
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

1. On each clock, update simultaneously(q2,q1,q0)←(q1,q0⊕q2,data). Starting000 and feeding 100110000 left to right gives 001,010,100,011,111,100,010,100,010.

2. The final state is 010, C. All right-hand-side register values are from before the clock edge.

3. Teaching check: Simultaneous updates mean q₂ receives the old q₁, not a value just calculated in the same cycle. Keep two state triples, old and new, when tracing. The supplied nine-bit string includes four trailing zero inputs; those clocks still shift and feed back state.

Original paper, page 5

2 marks · MCQ
Report issue

Two flip-flop state sequence

Flip-Flops, Registers & Sequential Circuits

Question 64, GATE 2005: Two positive-edge D flip-flops start at Q0Q1=00. Wiring gives D0=¬Q0 and D1=Q0 XOR ¬Q1. Which repeating cycle? A00→11→01→00; B00→11→00; C00→10→01→11→00; D00→11→01→10→00.
Question 64, GATE 2005: Two positive-edge D flip-flops start at Q0Q1=00. Wiring gives D0=¬Q0 and D1=Q0 XOR ¬Q1. Which repeating cycle? A00→11→01→00; B00→11→00; C00→10→01→11→00; D00→11→01→10→00.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Read the wires as Q0(next)=Q0′ and Q1(next)=Q0 XOR Q1′. Simultaneous updates from 00 give 11; from 11 give 01; from 01 give 10; and from 10 return to 00. Thus the cycle is 00→11→01→10→00, D. Both source diagrams agree.

Both registers sample old values simultaneously. At 00, D0=1 and D1=0 XOR 1=1, producing 11. At 11, D0=0 and D1=1 XOR 0=1, producing 01. At 01, D0=1 and D1=0 XOR 0=0, producing 10. At 10, D0=0 and D1=1 XOR 1=0, returning 00. Do not update Q0 first and reuse its new value in the Q1 equation; that would describe different asynchronous behavior.

Original paper, page 8

2 marks · MCQ
Report issue

Three-bit feedback shift-register sequence

Flip-Flops, Registers & Sequential Circuits

Question 2.12, GATE 2001: A synchronous three-bit register starts Q0=1,Q1=Q2=0. Wiring gives D0=Q1 XOR Q2,D1=Q0,D2=Q1. State number is 4Q2+2Q1+Q0. Choose cycle A 1,3,4,6,7,5,2; B 1,2,5,3,7,6,4; C 1,2,7,3,5,6,4; D 1,6,5,7,2,3,4.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step 1: Read the wiring as Q0_next=Q1 XOR Q2, Q1_next=Q0, Q2_next=Q1, all using the old state. The displayed numeric state is 4Q2+2Q1+Q0.

Step 2: Starting 001, successive triples are 010,101,011,111,110,100, then 001 again. For example 010 gives new Q0=1 XOR 0=1,new Q1=0,new Q2=1, hence 101.

Thus the decimal cycle is 1,2,5,3,7,6,4, option B. Computing updates in place rather than simultaneously would produce a different, incorrect sequence.

Original paper, page 5

2 marks · MCQ
Report issue

Master-slave flip-flop updates

Flip-Flops, Registers & Sequential Circuits

Question 2.12, GATE 2000: A JK master-slave flip-flop P has J=K=1; its output feeds a D master-slave flip-flop Q with the shared clock. Starting(P,Q)=(0,1), find the state after three cycles from choices(1,0),(1,1),(0,0),(0,1).
Question 2.12, GATE 2000: A JK master-slave flip-flop P has J=K=1; its output feeds a D master-slave flip-flop Q with the shared clock. Starting(P,Q)=(0,1), find the state after three cycles from choices(1,0),(1,1),(0,0),(0,1).
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Step 1: J=K=1 makes P toggle each cycle. Q captures the previous P through its D input; the master-slave arrangement prevents using the newly changed P as the same-cycle input.

Step 2: Apply(P_next,Q_next)=(¬P,P_old): (0,1)→(1,0)→(0,1)→(1,0).

After three cycles the state is(1,0), A. Sequentially updating Q from the new P would incorrectly erase the intended synchronous delay.

Original paper, page 4

Descriptive
Report issue

State diagram of an XOR-feedback register

Finite-State Machine Design

Question 24(a), GATE 1996: A synchronous circuit has three D flip-flops with common clock. Q1 feeds D2, Q2 feeds D3, and Q2 XOR Q3 feeds D1 through the feedback gate. State Si denotes the binary value i of Q1Q2Q3, so S0=000,...,S7=111. Draw its state-transition diagram.
Question 24(a), GATE 1996: A synchronous circuit has three D flip-flops with common clock. Q1 feeds D2, Q2 feeds D3, and Q2 XOR Q3 feeds D1 through the feedback gate. State Si denotes the binary value i of Q1Q2Q3, so S0=000,...,S7=111. Draw its state-transition diagram.
Question 24(a), GATE 1996: A synchronous circuit has three D flip-flops with common clock. Q1 feeds D2, Q2 feeds D3, and Q2 XOR Q3 feeds D1 through the feedback gate. State Si denotes the binary value i of Q1Q2Q3, so S0=000,...,S7=111. Draw its state-transition diagram.
Tap to enlarge
Answer & solution

Answer: S0 self-loop; S1→S4→S2→S5→S6→S7→S3→S1. (no official key was published)

A D flip-flop takes its next output from its D input on the common active clock edge. All three updates use the old outputs simultaneously. Reading the circuit wires gives Q1(next)=Q2 XOR Q3, Q2(next)=Q1, and Q3(next)=Q2. In particular, do not feed the newly computed Q1 into Q2 during the same clock edge.

Evaluate the equations for every state:
S0: 000→000, hence S0→S0.
S1: 001→100, hence S1→S4.
S2: 010→101, hence S2→S5.
S3: 011→001, hence S3→S1.
S4: 100→010, hence S4→S2.
S5: 101→110, hence S5→S6.
S6: 110→111, hence S6→S7.
S7: 111→011, hence S7→S3.

To draw the diagram, put a self-loop on S0 and draw the separate seven-state directed cycle S1→S4→S2→S5→S6→S7→S3→S1. There is no external input, so each state has exactly one outgoing edge and there are no input labels to choose. The zero state is a fixed point because shifting zeros and XORing zeros still gives zeros. As a consistency check, the listed targets contain all eight states once; the transition function is invertible, since the old Q1 and Q2 are read from the new Q2 and Q3 and old Q3 is recovered by XORing new Q1 with new Q3.

Original paper, page 10

Descriptive
Report issue

States unreachable from the initial register state

Finite-State Machine Design

Question 24(b), GATE 1996: A synchronous circuit has three D flip-flops with common clock. Q1 feeds D2, Q2 feeds D3, and Q2 XOR Q3 feeds D1 through the feedback gate. State Si denotes the binary value i of Q1Q2Q3, so S0=000,...,S7=111. Starting at S4, identify all unreachable states.
Question 24(b), GATE 1996: A synchronous circuit has three D flip-flops with common clock. Q1 feeds D2, Q2 feeds D3, and Q2 XOR Q3 feeds D1 through the feedback gate. State Si denotes the binary value i of Q1Q2Q3, so S0=000,...,S7=111. Starting at S4, identify all unreachable states.
Question 24(b), GATE 1996: A synchronous circuit has three D flip-flops with common clock. Q1 feeds D2, Q2 feeds D3, and Q2 XOR Q3 feeds D1 through the feedback gate. State Si denotes the binary value i of Q1Q2Q3, so S0=000,...,S7=111. Starting at S4, identify all unreachable states.
Question 24(b), GATE 1996: A synchronous circuit has three D flip-flops with common clock. Q1 feeds D2, Q2 feeds D3, and Q2 XOR Q3 feeds D1 through the feedback gate. State Si denotes the binary value i of Q1Q2Q3, so S0=000,...,S7=111. Starting at S4, identify all unreachable states.
Tap to enlarge
Answer & solution

Answer: Only S0 is unreachable; the seven nonzero states form the cycle containing S4. (no official key was published)

The next-state equations are (Q1,Q2,Q3)→(Q2 XOR Q3,Q1,Q2). Begin with S4=100 and repeatedly apply them. The successive states are S4=100, S2=010, S5=101, S6=110, S7=111, S3=011, S1=001, and then S4=100 again.

Once a deterministic state repeats, its subsequent trajectory repeats too; there is no input capable of taking a different branch. Therefore the reachable set is exactly {S1,S2,S3,S4,S5,S6,S7}, including the initial state itself at time zero. The only member of the eight-state space not visited is S0=000. It is unreachable from S4, although it is a perfectly valid state and would remain at zero forever if chosen as an initial state.

One can verify the exclusion algebraically. If the next state were 000, then new Q2=old Q1=0 and new Q3=old Q2=0. New Q1=old Q2 XOR old Q3=0 then forces old Q3=0. Thus only 000 can transition to 000; no nonzero state can enter it. The enumerated seven-state cycle proves that no additional state is excluded. The paper labels this subpart separately as question 73, but it is part (b) of original question 24 and shares that question's circuit and five-mark group allocation.

Original paper, page 10

5 marks · Descriptive
Report issue

Synchronous sequential circuit

Flip-Flops, Registers & Sequential Circuits

Question 11, GATE 1994: For the shown common-clock circuit, initial Q2Q1Q0=000. Find the state after four clock pulses. The Q2 flip-flop is JK with J=Q̅0,K=1; Q1 is D with D=Q2; Q0 is T with T=Q1.
Tap to enlarge
Answer & solution

Answer: 011 (no official key was published)

1. All flip-flops sample their inputs from the same pre-edge state. JK gives Q2(next)=J·Q̅2+K̅·Q2=Q̅0·Q̅2. D gives Q1(next)=Q2. T gives Q0(next)=Q0 XOR Q1.

2. Starting at 000, the first pulse gives 100. The second gives 010. The third gives 101. The fourth gives 011.

3. Do not propagate a freshly changed Q2 into Q1 during the same edge; that would model a different asynchronous circuit.

Diagram / structural description

Common clock to JK(Q2), D(Q1), T(Q0). Q2→D; Q1→T; inverted Q0 feedback→J; K tied to logic 1.

Original paper, page 5

2 marks · MSQ
Report issue

Three-stage complemented-feedback counter

Counters & Timing

Question 6.3, GATE 1993: Three common-clock JK stages use J/K as a signal and its complement; stages shift Q1→Q2→Q3, and the first receives ¬Q3. Starting at 000, what function is performed?
Tap to enlarge
Select all that apply
Answer & solution

Answer: C: modulo-6 counter (no official key was published)

With complementary J and K inputs, each JK stage copies the signal on J at the next edge. The transition is therefore (Q1,Q2,Q3)→(¬Q3,Q1,Q2). Starting at 000 gives 100,110,111,011,001,then 000. The six distinct states form the cycle, so it is a three-stage Johnson counter with modulus six. It uses shift-register structure, but its specified closed-loop function from the given initial state is the modulo-6 count; the unused states are not part of that cycle.

Original paper, page 4

5 marks · Descriptive
Report issue

NAND controller transition table

Finite-State Machine Design

Question 19, GATE 1993: Two common-clock D flip-flops hold A,B. The two NAND inputs to the final NAND for D_A are NAND(¬A,B), NAND(¬A,¬P); those for D_B are NAND(P,¬B), NAND(¬P,A). Derive the state transition table.
Tap to enlarge
Answer & solution

Answer: AB,P → A⁺B⁺: 00,0→10; 00,1→01; 01,0→10; 01,1→10; 10,0→01; 10,1→01; 11,0→01; 11,1→00. (no official key was published)

Read the feedback labels and output inversion bubbles before simplifying: the upper two first-stage gates share ¬A, and the bottom gate uses A and ¬P. A NAND of two NAND outputs implements an OR of their underlying products. Therefore D_A=¬A·B+¬A·¬P=¬A(B+¬P), and D_B=P·¬B+¬P·A. On a clock edge the new states are these D values evaluated from the old A,B and sampled P, not from a newly updated flip-flop.

For P=0 the equations become A⁺=¬A and B⁺=A, so old states with A=0 go to 10 and those with A=1 go to 01. For P=1 they become A⁺=¬A·B and B⁺=¬B. Evaluating 00,01,10,11 gives 01,10,01,00 respectively.

Complete table (old AB: next for P=0 / next for P=1):
00: 10 / 01
01: 10 / 10
10: 01 / 01
11: 01 / 00.
This table includes all eight state/input combinations. Crossing wires without junction dots are not additional connections. Both source diagrams agree on the labelled feedback paths.

Original paper, page 12