For designing 2’s complement of a binary number we assume that input is read from LSB to MSB. We will keep the binary number as it is until we read first 1. Keep that 1 as it is then change remaining 1’s by 0’s and 0’s by 1’s.
Let the binary number be
Read from LSB
Keep the first from LSB as it is and toggle the remaining bits we will get
Thus 2’s complement of 1011 is 0101. The required Mealy machine will be-