Skip to main content
1 of 4
Tom Carpenter
  • 4.3k
  • 13
  • 21

#MATLAB, 16 bytes#

a=@(x)char(97-x)

After running the above, simply call the function with your input string to get the inverted string. For example running:

a('10101110101010010100010001010110101001010')

prints:

01010001010101101011101110101001010110101
Tom Carpenter
  • 4.3k
  • 13
  • 21