The following diagram represents a finite state machine which takes as input a…

2005

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

GATECS2005Q63

Which one of the following is TRUE?

  1. A.

    It computes 1\'s complement of the input number

  2. B.

    It computes 2\'s complement of the input number

  3. C.

    It increments the input number

  4. D.

    It decrements the input number

Attempted by 14 students.

Show answer & explanation

Correct answer: B

The finite state machine processes binary input from the least significant bit (LSB). The transitions are as follows: in state Q0, on input 0 it stays in Q0 (output 0), and on input 1 it moves to Q1 (output 1). In state Q1, on input 0 it stays in Q1 (output 1), and on input 1 it moves back to Q0 (output 0). This behavior corresponds to computing the 2's complement of a binary number. The machine effectively performs bit inversion and adds 1, which is the standard method for finding the 2's complement. Therefore, the machine computes the 2's complement of the input binary number.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir