Re: PDP-8: count number of set bits in a word

2019-04-05 Thread Phil Budne via cctalk
A general discussion of population count: https://stackoverflow.com/questions/8590432/when-to-use-parallel-counting-mit-hakmem-for-bitcount-when-memory-is-an-issue

Re: PDP-8: count number of set bits in a word

2019-04-05 Thread Guy Dunphy via cctalk
At 08:49 PM 5/04/2019 +, you wrote: >Hi Kyle, > >hat's a really interesting problem, and the government (NSA) wanted this badly >and done FAST. > >they asked Seymour Cray to create a specific instruction for this and they >called it 'population count' > >Anybody know the why and how it is

Re: PDP-8: count number of set bits in a word

2019-04-05 Thread Paul Koning via cctalk
> On Apr 5, 2019, at 4:49 PM, Randy Dawson via cctalk > wrote: > > Hi Kyle, > > hat's a really interesting problem, and the government (NSA) wanted this > badly and done FAST. > > they asked Seymour Cray to create a specific instruction for this and they > called it 'population count' >

Re: PDP-8: count number of set bits in a word

2019-04-05 Thread Randy Dawson via cctalk
and Off-Topic Posts Subject: Re: PDP-8: count number of set bits in a word From: Kyle Owen via cctalk: Friday, April 05, 2019 8:59 AM > 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

Re: PDP-8: count number of set bits in a word

2019-04-05 Thread Vincent Slyngstad via cctalk
From: Kyle Owen via cctalk: Friday, April 05, 2019 8:59 AM 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

Re: PDP-8: count number of set bits in a word

2019-04-05 Thread Anders Nelson via cctalk
I suppose you could test each nybble for zero, then equate a 16-element LUT on nybbles not zero? -- Anders Nelson +1 (517) 775-6129 www.erogear.com On Fri, Apr 5, 2019 at 11:59 AM Kyle Owen via cctalk wrote: > Just wondering if anyone has come up with a fast way to count the number of > 1s

PDP-8: count number of set bits in a word

2019-04-05 Thread Kyle Owen via cctalk
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