Skip to content
Related Articles

Related Articles

GATE | GATE-CS-2002 | Question 30

Improve Article
Save Article
  • Last Updated : 28 Jun, 2021
Improve Article
Save Article

The Finite state machine described by the following state diagram with A as starting state, where an arc label is x / y and x stands for 1-bit input and y stands for 2- bit output
GATECS2002Q28
(A) Outputs the sum of the present and the previous bits of the input.
(B) Outputs 01 whenever the input sequence contains 11.
(C) Outputs 00 whenever the input sequence contains 10.
(D) None of these


Answer: (A)

Explanation:
We assume the input string to be 1101.

1. (A, 1) –> (B, 01)
Here, previous input bit + present input bit = 0 + 1 = 01 = output

2. (B, 1) –> (C, 10)
Here, previous input bit + present input bit = 1 + 1 = 10 = output

3. (C, 0) –> (A, 01)
Here, previous input bit + present input bit = 1 + 0 = 01 = output

4. (A, 1) –> (B, 01)
Here, previous input bit + present input bit = 0 + 1 = 01 = output

 
Thus, option (A) is correct.

 
Please comment below if you find anything wrong in the above post.


Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!