GATE / CS ARCHIVE

SIMILAR QUESTIONS / DIGITAL LOGIC

Infer transducer behavior from state transitions

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

How these are solved

Interpret each state as a summary of the consumed input prefix, trace transitions/output labels, and match the resulting streaming function to the choices. Behavior recognition from a complete supplied transducer, not building a machine or minimizing equivalent states.

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

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