edited by
8,638 views
40 votes
40 votes

The following diagram represents a finite state machine which takes as input a binary number from the least significant bit.

     

Which of the following is TRUE?

  1. It computes $1$’s complement of the input number

  2. It computes $2$’s complement of the input number

  3. It increments the input number

  4. it decrements the input number

edited by

2 Answers

Best answer
34 votes
34 votes

Answer is option B.

For any binary no, FSM read input from LSB and remain unchanged till first $1$, and it complement after that 

$\mathbf{100} \rightarrow \mathbf{100}$     $[1$'s complement of $100 + 1 = 011+ 1 = 100 = 2$'s complement of $100]$

$0\mathbf{10} \rightarrow 1\mathbf{10}$     $[1$'s complement of $010 + 1 = 101 + 1 = 110 = 2$'s complement of $010]$

$1010\mathbf{100} \rightarrow 0101\mathbf{100}$    $[1$'s complement of $1010100 + 1 = 0101011+ 1 = 0101100]$

Note : Underline part is unchanged (till first $1$ from lsb) then $0$'s changed to $1$'s and $1$'s changed to $0$'s 

edited by
10 votes
10 votes
B.

the given above is a mealy machine for finding 2's complement.
Answer:

Related questions

50 votes
50 votes
6 answers
4