Just wondering if anyone has come up with a fast way to count the number of
1s in a word on a PDP-8. The obvious way is looping 12 times, rotating the
word through the link or sign bit, incrementing a count based on the value
of the link or sign.

With a small lookup table, you can reduce the total number of loops by
counting multiple groups of bits at a time, but this of course comes with
the cost of using more memory. Any other suggestions?

Much appreciated,

Kyle

Reply via email to