logoalt Hacker News

bombcarlast Thursday at 5:36 PM4 repliesview on HN

Isn't this the instruction that apparently the NSA asked for?


Replies

kenslast Thursday at 6:58 PM

I did a lot of research on this [1]. I got confirmation from Robert Garner (architect of the SPARC processor) that the NSA did indeed ask for the population count instruction. His story of meeting with the NSA is pretty amusing [2].

[1] https://retrocomputing.stackexchange.com/a/8666/4158

[2] https://archive.computerhistory.org/resources/access/text/20...

pklauslerlast Thursday at 6:12 PM

It goes back to the CDC 6600 at least, and is most often seen as part of Hamming distance computation (pop(xor(x,y))). But it turns out to be really useful for other things (trailing zero count), and worth having in hardware since the software sequence is a ~dozen instructions for 64 bits.

adgjlsfhk1last Thursday at 6:03 PM

yeah. They understood how useful computing on bits can be before anyone else.