POPCNT instruction with the SSE4.2 instruction set extension, first available in a Nehalem-based Core i7 processor, released in November 2008. The ARM architecture introduced the VCNT instruction as part of the Advanced SIMD (NEON) extensions. The RISC-V architecture introduced the PCNT instruction as part of the Bit Manipulation (B) extension. See also Two's complement Fan out References Further reading (Item 169: Population count assembly code for the PDP/6-10.) External links Aggregate Magic Algorithms. Optimized population count and other algorithms explained with sample code. Bit Twiddling Hacks Several algorithms with code for counting bits set. Necessary and Sufficient - by Damien Wintour - Has code in C# for various Hamming Weight implementations. Best algorithm to count the number of set bits in a 32-bit integer? - Stackoverflow Coding theory Articles with example C code