GATE / CS ARCHIVE

SUBJECT COLLECTION

Digital Logic · Finite-State Machine Design

17 questions, newest first

GATE CSE has asked 17 questions on Finite-State Machine Design (Digital Logic) from 1993 to 2025, in 13 of the 46 papers; the most recent is in GATE CSE 2025 Set 1. In the last five years it carried 0.5 marks per 100-mark paper on average, against 0.3 since 2003. Since 2014 the questions have been 2 MCQ and 1 NAT. 3 groups of questions here are solved the same way; “One per method” keeps the newest of each.

Browse topics
2 marks · NAT
Report issue

Minimizing a Mealy machine by partition refinement

Finite-State Machine Design

Question 59, GATE 2025: A Mealy FSM has input X∈{0,1}. Each row lists (next on 0,next on 1; output on 0,output on 1): A=(F,B;0,0), B=(D,C;0,0), C=(F,E;0,0), D=(G,A;1,0), E=(D,C;0,0), F=(F,B;1,1), G=(G,H;0,1), H=(G,A;1,0). Find the minimum number of equivalent states.
Tap to enlarge
Answer & solution

Official answer: 5

Step through it (3 steps)

Approach: Equivalent Mealy states must produce the same immediate output for each input and lead to equivalent states. Refine partitions until stable.
Group first by output pair: P0={{A,B,C,E},{D,H},{F},{G}}, corresponding to 00,10,11,01. States in different groups are already distinguishable by a single input.
Within the 00 group, A and C go on input 0 to F, while B and E go to the 10 group {D,H}. Those destination groups differ, so split 00 into {A,C} and {B,E}. On input 1 they all initially went to the 00 group, which did not prevent the split required by input 0.
Now check P1={{A,C},{B,E},{D,H},{F},{G}}. A,C both lead to {F} on 0 and {B,E} on 1. B,E both lead to {D,H} on 0 and {A,C} on 1. D,H both lead to {G} on 0 and {A,C} on 1. Thus every multi-state group has identical destination-group signatures and no further split is required.
The stable equivalence classes are AC, BE, DH, F and G: five states. Partition refinement both constructs a five-state realization and proves that the distinguishable classes cannot be merged.

Original paper, page 59 · 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

Finite-State Machine Design

Question 28, GATE 2021: Two-state Mealy circuit replaces the first 1 of each maximal run of 1s by 0. Input 00100011000011100 produces 00000001000001100. Current state s starts at 0; current bit b; next state t; output y. A t=s+b,y=sb; B t=b,y=sb; C t=b,y=s¬b; D t=s+b,y=s¬b. Here + means OR.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (4 options)

Use state s to remember the previous input bit, initialized 0. The next state is therefore t=b. Output1 is permitted only when both the previous and current bits are 1; the first 1 after 0 is suppressed. Thus y=s·b, giving B.

State/input table (s,b)→(t,y) is 00→00,01→10,10→00,11→11. A D flip-flop with D=b stores the preceding input and an AND gate computes y=Q∧b. The reset state Q=0 ensures a leading 1 is suppressed. No lookahead into future input is needed.

Original paper, page 69 · Answer key

2 marks · MCQ
Report issue

Shortest input to a specified FSM output

Finite-State Machine Design

Question 27, GATE 2009: A two-bit state AB starts 00. For input 0, states 00, 01, 10, 11 transition respectively to 00, 10, 01, 10 with outputs 1, 0, 0, 0. For input 1 they transition to 01, 00, 01, 00 with outputs 0, 1, 1, 1. Minimum input length that arrives in 01 while emitting 1? A 3; B 4; C 5; D 6.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

The only transition ending in state 01 with output 1 is from state 10 on input 1. From 00, reaching 10 requires at least two inputs:00 --1/0-->01 --0/0-->10. Appending 1 reaches 01 and emits 1. Thus input 101 achieves the target in 3 steps, and the predecessor argument rules out shorter inputs. Answer A.

Work backward from the desired transition: among rows ending in 01, output 1 occurs only from 10 on input 1. From initial 00, a single input reaches only 00 or 01, never 10, so at least two inputs are needed before the final 1. Input 1 reaches 01 with output 0, then 0 reaches 10 with output 0, then 1 reaches 01 with output 1. This witness 101 has length 3 and matches the lower bound.

Original paper, page 6

2 marks · MCQ
Report issue

Serial two’s-complement transducer

Finite-State Machine Design

Question 63, GATE 2005: A binary transducer reads least-significant bit first. Initial Q0 loops on 0/output 0 and changes to Q1 on 1/output 1; Q1 loops on 0/output 1 and 1/output 0. Does it compute A ones complement; B twos complement; C increment; D decrement?
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Read from the least significant end: Q0 copies all initial zeros and copies the first 1, then Q1 complements every remaining bit. Keeping the least-significant 1 and all lower zeros while complementing higher bits is exactly fixed-width two’s-complement negation. The all-zero input remains zero. Thus B.

Subtracting a fixed-width binary word from zero leaves its trailing zeros unchanged, leaves the first 1 unchanged, and complements all higher bits. The state change happens at precisely that first 1. For example input word 010100 read from the right yields output 101100, its negation modulo 64. Zero never leaves Q0 and stays zero. A ones-complement machine would flip the trailing zeros too, so A is not the same operation.

Original paper, page 8

2 marks · MCQ
Report issue

Minimal states for a latched count-difference detector

Finite-State Machine Design

Question 44, GATE 2003: A synchronous sequential circuit has one input and two output bits. Let zₖ,nₖ count zeros and ones in the first k input bits. Initially output is 00. When zₖ−nₖ first reaches 2, output becomes 10 forever. When nₖ−zₖ first reaches 2, output becomes 01 forever. What is the minimum number of states? A. 5; B. 6; C. 7; D. 8.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. Before absorption retain only d=zₖ−nₖ. On input 0 increment d and on input 1 decrement it. Values −1,0,+1 are nonabsorbing and still output 00; reaching +2 or −2 selects different permanent outputs. Distinguish 0 from +1 by suffix 0, 0 from −1 by suffix 1, and −1 from +1 by suffix 0, proving the three transient states cannot merge.

2. Before a threshold is reached, it suffices to track d=(zeros seen)−(ones seen) in {−1,0,1}. Reaching +2 or −2 enters a separate absorbing state with output 10 or 01. Thus five states suffice. They are all distinguishable: the absorbing states have different outputs, and appropriate one-bit continuations separate each pair of the three pre-threshold states. Hence five states are necessary, option A.

Original paper, page 6

2 marks · MCQ
Report issue

Meaning of the Mealy-machine output

Finite-State Machine Design

Question 2.5, GATE 2002: A finite-state machine starts in A. Transition labels are input/output, with a one-bit input and two-bit output. The diagram gives A --0/00--> A, A --1/01--> B, B --0/01--> A, B --1/10--> C, C --0/01--> A, and C --1/10--> C. What does it do?
(A) Output the sum of the current and preceding input bits.
(B) Output 01 whenever the input sequence contains 11.
(C) Output 00 whenever the input sequence contains 10.
(D) None of these.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Step 1: Verify all possible current/previous bit pairs.

Step 2: Previous0/current 0 produces 00; previous 0/current 1 produces 01; previous 1/current 0 produces 01; previous 1/current 1 produces 10. State A is the previous-zero class and B,C the previous-one class. On input 110, the output is 01,10,01, so claims of 01 for the final 11 pair or 00 for 10 are contradicted directly.

Conclusion: State A represents previous input 0 (also the initial assumed bit); states B and C both represent previous input 1. From A, input 0 outputs 00 and input 1 outputs 01. From B or C, input 0 outputs 01 and input 1 outputs 10. These are the two-bit encodings of previous bit plus current bit, A. The extra distinction between B and C does not change this behavior.

Original paper, page 4

Descriptive
Report issue

State machine for alternating copy and complement

Finite-State Machine Design

Question 11(a), GATE 2001: Initially copy input bits. After two consecutive input zeros, complement following bits; after two consecutive input ones while complementing, return to copying. The triggering second bit still uses the old mode. Use J-K flip-flops.

Task: Give the state transition diagram (specified here by a complete labeled transition table).
Question 11(a), GATE 2001: Initially copy input bits. After two consecutive input zeros, complement following bits; after two consecutive input ones while complementing, return to copying. The triggering second bit still uses the old mode. Use J-K flip-flops.

Task: Give the state transition diagram (specified here by a complete labeled transition table).
Tap to enlarge
Shared context

Initially copy input bits. After two consecutive input zeros, complement following bits; after two consecutive input ones while complementing, return to copying. The triggering second bit still uses the old mode. Use J-K flip-flops.

Answer & solution

Answer: Four-state Mealy machine A,B,C,D with transitions A:0/0→B,1/1→A; B:0/0→C,1/1→A; C:0/1→C,1/0→D; D:0/1→C,1/0→A. (no official key was published)

1. Define A as copy mode with no pending zero, B as copy mode after one zero, C as complement mode with no pending one, and D as complement mode after one one. Start at A. Edge labels are input/output.

2. In copy mode output equals input. Thus A on 0 emits 0 and moves to B; A on 1 emits 1 and stays A. B on 1 emits 1 and resets to A; B on 0 emits 0 and moves to C because the second zero has just occurred.

3. In complement mode output is inverted. Thus C on 0 emits 1 and stays C; C on 1 emits 0 and moves to D. D on 0 emits 1 and resets to C; D on 1 emits 0 and returns to A after the second one.

4. The transition-triggering symbol is processed using the old mode, matching the printed example: input 101100|01001011|0|11 gives output 101100|10110100|0|11.

5. These four states record exactly the information needed: the current mode and whether the first symbol of its switching pair has been seen. Runs of the nontriggering symbol reset the pending-pair state.

Original paper, page 8

2 marks · Descriptive
Report issue

Equivalence partition of a Mealy machine

Finite-State Machine Design

Question 70(a), GATE 1997: The Mealy state table gives (next state,output) for inputs 0 and 1:
A: 0→(B,1), 1→(H,1)
B: 0→(F,1), 1→(D,1)
C: 0→(D,0), 1→(E,1)
D: 0→(C,0), 1→(F,1)
E: 0→(D,1), 1→(C,1)
F: 0→(C,1), 1→(C,1)
G: 0→(C,1), 1→(D,1)
H: 0→(C,0), 1→(A,1).
No initial state is specified. Find the equivalence partition of its states.
Question 70(a), GATE 1997: The Mealy state table gives (next state,output) for inputs 0 and 1:
A: 0→(B,1), 1→(H,1)
B: 0→(F,1), 1→(D,1)
C: 0→(D,0), 1→(E,1)
D: 0→(C,0), 1→(F,1)
E: 0→(D,1), 1→(C,1)
F: 0→(C,1), 1→(C,1)
G: 0→(C,1), 1→(D,1)
H: 0→(C,0), 1→(A,1).
No initial state is specified. Find the equivalence partition of its states.
Tap to enlarge
Answer & solution

Answer: {A}, {B}, {C,D}, {E,F,G}, {H}. (no official key was published)

Two Mealy states are equivalent if every finite input string produces the same output string from either state. In particular they must first agree on their immediate output for each input. The output pairs are (1,1) for A,B,E,F,G and (0,1) for C,D,H. This gives the initial partition P0={ABEFG,CDH}.

Refine each block according to the blocks reached on inputs 0 and 1, while retaining the output test. In P0, A and B lead respectively to blocks (ABEFG,CDH); E,F,G lead to (CDH,CDH); and C,D,H lead to (CDH,ABEFG). Hence P1={AB,EFG,CDH}.

Now use P1 to distinguish formerly similar successor states. A reaches (AB,CDH), whereas B reaches (EFG,CDH), splitting A from B. C and D both reach (CDH,EFG), whereas H reaches (CDH,AB), splitting H from CD. The states E,F,G still both transition into CDH. Thus P2={A,B,CD,EFG,H}.

Check stability: C and D have equal outputs and both go into CD on 0 and EFG on 1. Each of E,F,G has output 1 on both inputs and goes into CD on both inputs. No further split is needed. The singleton blocks trivially satisfy stability, so P2 is the equivalence partition.

Refinement never separates equivalent states: a split witnesses a finite input on which outputs eventually differ. For example, A and B are distinguished by 000, producing 111 and 110 respectively; H and C are distinguished by 100, producing 111 and 110. Conversely, a stable equal-output partition guarantees equal output sequences by induction on input length. This proves both directions, rather than guessing equivalent states from one-step transitions alone.

Original paper, page 10

3 marks · Descriptive
Report issue

Five-state minimal Mealy quotient

Finite-State Machine Design

Question 70(b), GATE 1997: The Mealy state table gives (next state,output) for inputs 0 and 1:
A: 0→(B,1), 1→(H,1)
B: 0→(F,1), 1→(D,1)
C: 0→(D,0), 1→(E,1)
D: 0→(C,0), 1→(F,1)
E: 0→(D,1), 1→(C,1)
F: 0→(C,1), 1→(C,1)
G: 0→(C,1), 1→(D,1)
H: 0→(C,0), 1→(A,1).
No initial state is specified. Give the minimal equivalent state table, naming merged states by their members.
Question 70(b), GATE 1997: The Mealy state table gives (next state,output) for inputs 0 and 1:
A: 0→(B,1), 1→(H,1)
B: 0→(F,1), 1→(D,1)
C: 0→(D,0), 1→(E,1)
D: 0→(C,0), 1→(F,1)
E: 0→(D,1), 1→(C,1)
F: 0→(C,1), 1→(C,1)
G: 0→(C,1), 1→(D,1)
H: 0→(C,0), 1→(A,1).
No initial state is specified. Give the minimal equivalent state table, naming merged states by their members.
Tap to enlarge
Answer & solution

Answer: Five quotient states A,B,CD,EFG,H with the transition/output table below. (no official key was published)

The equivalence blocks are {A},{B},{C,D},{E,F,G},{H}. Replace every original destination by its block name, keeping the original output. The reduced table is:

Present state   input 0: next/output   input 1: next/output
A               B/1                    H/1
B               EFG/1                  CD/1
CD              CD/0                   EFG/1
EFG             CD/1                   CD/1
H               CD/0                   A/1

For example, C goes to D/0 and E/1, whereas D goes to C/0 and F/1. Once C,D are both named CD and E,F,G are all named EFG, those two rows become identical. Similarly, E,F,G all reduce to the row CD/1, CD/1. Therefore the choice of a representative inside a merged block does not affect the quotient table.

Why is this minimal rather than merely smaller? Output-based refinement begins with {ABEFG,CDH}, refines to {AB,EFG,CDH}, and then to the five displayed blocks, which are stable. Distinct resulting blocks have some finite distinguishing input, so no further merger preserves all output behavior. Five states are necessary to represent the behavior of all states in the given table.

No start state is printed, so the table does not justify inventing one or removing states as unreachable from it. This is minimization of the supplied machine's state behaviors. If a separate initial-state specification were supplied, one would additionally check reachability before reporting the size of a recognizer from that particular start. The table remains a Mealy table: outputs label transitions, not states, and a Moore-machine reinterpretation would be a different problem.

Original paper, page 10

2 marks · MCQ
Report issue

Minimizing a Mealy machine

Finite-State Machine Design

Question 2.23, GATE 1996: For inputs 0,1, the next-state/output pairs are A:(D,0),(B,1); B:(A,0),(C,1); C:(A,0),(B,1); D:(A,1),(C,1). How many states remain?
Question 2.23, GATE 1996: For inputs 0,1, the next-state/output pairs are A:(D,0),(B,1); B:(A,0),(C,1); C:(A,0),(B,1); D:(A,1),(C,1). How many states remain?
Tap to enlarge
Your answer
Answer & solution

Answer: B: 3 (no official key was published)

First group states by their immediate output pairs. A,B,C output (0,1), while D outputs (1,1), so D is separate. On input 0, A moves to D but B and C move to A, which belongs to the other initial group; therefore A must split from B,C. Now B and C both move to A on 0 and to the block {B,C} on 1, with identical outputs. They remain equivalent and no further split occurs. The stable partition is {A},{B,C},{D}, giving three states.

Original paper, page 6

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

2 marks · MCQ
Report issue

Synchronizing an unknown machine state

Finite-State Machine Design

Question 2.23, GATE 1995: A four-state machine has next states under input 1 of A→D, B→B, C→B, D→B, and under input 0 of A→B, B→C, C→D, D→C. Starting from an unknown state, find the shortest input sequence that guarantees state C. Options: (A) 01, (B) 10, (C) 101, (D) 110.
Tap to enlarge
Your answer
Answer & solution

Answer: B: 10 (no official key was published)

Initially the possible states are {A,B,C,D}. Applying input 1 reduces this set to {B,D}: A goes to D, while B,C,D go to B. Applying input 0 then sends both B and D to C, so 10 guarantees C. The four paths are A→D→C, B→B→C, C→B→C and D→B→C. No shorter word works: the empty word leaves the initial state unknown, input 0 yields {B,C,D}, and input 1 yields {B,D}. Therefore length two is minimal and option B, 10, is correct. The output labels z do not affect the target-state requirement.

Original paper, page 5

Report issue

Finite-state addition of arbitrarily long integers

Finite-State Machine Design

Question 3.3, GATE 1994: True or false: a finite-state machine can add two integers of arbitrary digit length. State the input/output convention.
Tap to enlarge
Answer & solution

Answer: True for an LSB-first synchronous serial adder (no official key was published)

Feed the two numbers one bit pair at a time from least significant to most significant, padding the shorter with zeros. The machine needs only the carry bit c, hence two states. For input bits a,b it emits (a+b+c) mod 2 and changes state to floor((a+b+c)/2). After the final pair, emit the remaining carry. This works for any finite length with constant internal state. The convention matters: it is a transducer with paired LSB-first input, not a DFA expected to store both complete unbounded integers or emit an MSB-first sum before future carries are known.

Original paper, page 4

2 marks · MSQ
Report issue

Stable states of a state diagram

Finite-State Machine Design

Question 6.2, GATE 1993: Recovered diagram: S1 loops for a=1 and goes to S2 for a=0; S2 loops for b=1 and goes to S1 for b=0. Which input restriction makes the machine have a stable state? A ab=1; B a+b=1; C ¬a+¬b=0; D ¬(ab)=1; E ¬(a+b)=1. Here + means Boolean OR. The section permits multiple correct alternatives.
Tap to enlarge
Select all that apply
Answer & solution

Answer: B is the exact condition; A, B and C are sufficient restrictions if read as select-all-that-apply (no official key was published)

The arrows give S1→S1 when a=1 and S1→S2 when a=0; S2→S2 when b=1 and S2→S1 when b=0. Hold the inputs constant and test each pair. At (a,b)=(0,0), both states leave themselves, so there is no fixed point. At (0,1), S2 is stable and S1 reaches it. At (1,0), S1 is stable and S2 reaches it. At (1,1), both states are stable. Thus at least one stable state exists exactly when a∨b=1, giving B as the necessary-and-sufficient, least restrictive condition. A and C both force a=b=1 and hence are also sufficient restrictions, though not necessary. Because the original section allows multiple correct alternatives and the wording does not explicitly ask for the least restrictive condition, A,B,C is defensible under a merely sufficient-condition reading. D permits (0,0), while E requires (0,0), so neither guarantees stability.

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