2 added 88 characters in body
source | link

Ruby — 4242 39

Same algorithm, different language:

[*0...2**n](2**n).maptimes{|b|puts"%0#{n}b"%(b>>1^b)}

Switching from #map to #times as @voidpigeon suggests saves 3 characters.

Ruby — 42

Same algorithm, different language:

[*0...2**n].map{|b|puts"%0#{n}b"%(b>>1^b)}

Ruby — 42 39

Same algorithm, different language:

(2**n).times{|b|puts"%0#{n}b"%(b>>1^b)}

Switching from #map to #times as @voidpigeon suggests saves 3 characters.

1
source | link

Ruby — 42

Same algorithm, different language:

[*0...2**n].map{|b|puts"%0#{n}b"%(b>>1^b)}