I took a look in the EDSAC manual ("The Preparation of Programs for an Electronic Digital Computer", 1951) at
<a href="https://archive.org/details/programsforelect00wilk/page/154/mode/2up?q=sideways" rel="nofollow">https://archive.org/details/programsforelect00wilk/page/154/...</a> - linking to the earliest popcount description, Gillies-Miller.<p>I didn't see anything.<p>Then again, that hardware doesn't seem to support xor. Nor does the manual mention "Boolean" or "Booleian" (the latter was used in the older literature, see <a href="https://scholar.google.se/scholar?hl=sv&as_sdt=0%2C5&q=Booleian&btnG=" rel="nofollow">https://scholar.google.se/scholar?hl=sv&as_sdt=0%2C5&q=Boole...</a> for examples ).<p>I looked for, but didn't find, a description of it in HAKMEM (1972).<p>Those two exhaust my knowledge of reference materials for that era.
Try the Retrocomputing StackExchange, by the way.<p>Here is smoething useful. I just randomly picked the IBM 704 (famous for early Lisp work) and researched the architecture. I found this site:<p><a href="https://sky-visions.com/ibm/" rel="nofollow">https://sky-visions.com/ibm/</a><p>It has info the 704 and other higher model numbers after that. Whereas no exclusive OR instruction is listed for the 704, it looks like 709 got one: opcode ERA, exclusive OR to accumulator. The 709 was introduced in 1957.<p>OK, we have identified a machine. Next we head to the Software Preservation Group for any code for the 709.<p>E.g. here is some code that uses ERA, but not for swapping:<p><a href="http://www.softwarepreservation.org/projects/FORTRAN/source/ibsys/FORTRAN/9F06.fap/?searchterm=709" rel="nofollow">http://www.softwarepreservation.org/projects/FORTRAN/source/...</a><p>Looks like ERA was popular in 709 systems sources as a comparison operator: load a value into A, then XOR with some constant, and if it's zero, there is a match. I've spotted quite a few uses like that.
The XOR swapping trick is possible since the earliest machine languages with memory to memory XOR operations (or, less simply, any XOR operation), so it's unlikely to be seriously documented until someone began teaching it.
Seems like an old interest.<p>I will ask an older friend when he first learned of it.<p>He said it was in college in the 70's. It was taught as a method for having a doubly linked list, but only use the space for one link. He thinks it was in an data structures book by hororwitz (not sure of spelling obviously)