## Perl, <s>39</s> 33 bytes

    /$/,say map$`==$_|0,@%for@%=1..<>

Thanks to [Ton Hospel][1] for saving 6 bytes

Running with the `-E` perlrun:

    $ echo 3 | perl -E'@%=1..<>;$a=$_,say map{$a==$_|0}@%for@%'
    100
    010
    001


  [1]: https://codegolf.stackexchange.com/users/51507/ton-hospel