GolfScript, 13 chars
~2\?,{.2/^}%`
For example, the input 3
produces the output [0 1 3 2 6 7 5 4]
.
Here's a de-golfed version with comments:
~ # evaluate the input, turning it from a string into a number
2 \ ? # raise 2 to the power given by the input...
, # ...and turn it into a list containing the numbers from 0 to 2^n-1
{ . 2 / ^ } % # xor each number in the list with itself divided by 2
`` # un-eval the list into a string for output
It's perhaps interesting to note that there are no particular "golfing tricks" involved — this is basically the most obvious and straightforward way to solve this task in GolfScript.