Take a look at my hatchet job!
One major pet peeve is people using string datatypes when other, more strongly typed type are available.
For example, using strings of 1s and 0s instead of byte arrays
Once you do that:
if ((inputOne == '1' && inputTwo == '0') || (inputOne == '0' && inputTwo == '1'))
inputOne = '1';
else
inputOne = '0';can be simplified to use the existing bitwise xor operator:
inputOne = inputOne ^ inputTwo;Also, return is a statement, not a function:
return x;, not
return(x);The latter may work but it looks odd