The finite state machine described by the following state diagram with $A$ as starting state, where an arc label is and $x$ stands for $1$-bit input and $y$ stands for $2$-bit output

- outputs the sum of the present and the previous bits of the input
- outputs $01$ whenever the input sequence contains $11$
- outputs $00$ whenever the input sequence contains $10$
- none of the above

### 2 Comments

## 3 Answers

Answer should be option (**A**).

**Option (B)** and **(C)** are clearly wrong . it says input $11$ then $o/p$ $01$ and $i/p \ 10$ then $o/p \ 00$ but here at single bit $o/p$ is $2$ bit sequence

Now, for option (A) we can trace out. Suppose string is $0111$.

at $A$---$0$---> $A$----$1$---> $B$--$1$-->$C$---$1$-->$C$

$O/P$ $00$ $01$ $10$ $10$

We can see here at $(A,0)$---> $(A,00)$ which sum of $0+0=00$, (previous $i/p$ bit $+$ present $i/p$ bit)

$(A,1)$--->$(B,01)$ which is sum of $0+1= 1=01$,

$(B.1)$--->$(C,10)$ which is sum of $1+1=$ (previous $i/p$ bit $+$ present $i/p$ bit)$=10$,

$(C,1)$---> $(C,10)$ which is sum of $1+1=10$

So, answer should be (**A**).

### 7 Comments

Question should be modified as it says bits not bit...and @Ravi Kaushik no where its mentioned previous 2 bits in the question.

Let us consider a string 100111

(A,1) = (B, 01)

Previous input + Present input = 0+1 = 01

(B,0) = (A, 01)

Previous input + Present input = 1+0 = 01

(A,0) = (A, 00)

Previous input + Present input = 0+0 = 00

(A,1) = (B, 01)

Previous input + Present input = 0+1 = 01

(B,1) = (C, 10)

Previous input + Present input = 1+1 = 10

(C,1) = (C, 10)

Previous input + Present input = 1+1 = 10

option A is correct

option B and C are wrong where they don't produce a correct pattern.