Counts the number of bits set to
1 in a machine word.
popcount(00100110) == 3
popcount(01100000) == 2
It was almost a tradition that one of the first of any new faster CDC machine was delivered to a “good customer” - picked up at the factory by an anonymous truck, and never heard from again.
The number of symbols that are different from the zero-symbol of the alphabet.
popcountdisappears from CPUs: a conspiracy???
The number of differing positions between two strings of identical length.
For binary strings:
popcount(x ^ y)
00100110 01100000 -------- 01000110 popcount(01000110) = 3
Send some data over the wire and compare it at both ends to get an estimate of the error rate.
Based on your error correction requirements, choose sufficiently distant symbols to assemble your message out of!
Uses +1 and -1 (coded as 0) instead of 32-bit floating point numbers.
Simpler and smaller, suitable for less powerful devices like mobile phones
a = xnor(x, y)
b = popcount(a)
c = len(a)
dot(x, y) = 2 × b − c