The Convert class can help you to convert binary numbers between the string and integer types.
Convert.ToInt32(input, 2)
helps you to take your binary number as a string and convert it into an integer
Convert.ToString(n, 2)
helps you to convert an integer into its binary representation as a string
The tricky part is that ToString prints all the binary digits in the number (32 bits) so if you only want to consider 3 digits you need to only take the last 3 from the string generated.
string BinaryNot(string input) // 110
{
var n = Convert.ToInt32(input, 2); // 6
var notN = Convert.ToString(~n, 2); // 11111111111111111111111111111001
return notN[^input.Length..]; // 001
}
In this case, however, using a simple string manipulation and invert 0s with 1s is easier and more compact.
string BinaryNot(string input) => string.Concat(input.Select(x => x == '0' ? '1' : '0'));