R, 138114 114 bytes
x=function(){rev(rawToBits(rev(charToRaw(sprintf("x=%s;x()",gsub("\\s","",paste(deparse(x),collapse="")))))))};x()
Uses R’s ability to deparse functions to their character representation. The revs are needed because rawToBits puts the least significant bit first. as.integer is needed because otherwise the bits are displayed with a leading zero.
Edited once I realised that any convenient output was allowed. Also was out by one on original byte count.