FIELD: information technology.
SUBSTANCE: method includes steps for parallel counting of the number of units bi (i=1 m) in m n-bit binary vectors, shifting the binary number b1 one bit to the right, summing with a number b2, shifting the obtained sum bs 2 one bit to the right and summing with a number b3. Similarly, the obtained sums are shifted and summed with the next numbers until a sum bs m is obtained. The least significant bit of the number b1 is the first bit s1 of the sum and the least significant bit of each obtained sum bs i is the i-th bit si of the sum. The binary number bs m is shifted one bit to the right and if bs m=0, computation is stopped, otherwise the least significant bit is the sm+1-th bit of the sum; if bs m≠0, the binary number bs m is shifted and the obtained number is the value of most significant bit of the desired sum, starting from the m+1 bit.
EFFECT: faster computation.
1 dwg
Authors
Dates
2013-08-27—Published
2011-12-05—Filed