We will design mealy machine for 1's complement.
So we can see that every '0' will be replaced by '1' and vice-versa.
We will understand it more using one example.
Suppose string is 10001 and we will start parsing from left to right.
Every 0 will be replaced by 1 and vice versa.
So we will get the output as = 01110