Skip to main content
2 of 3
much better thanks

Groovy - 31 28 chars

edit thanks to cfrick's insightful comment:

print args[0].tr("01","10") 

previous:

args[0].each{print it=="1"?0:1}