(snip, someone wrote)
>>  And POPCNT is another one. Why do I need to 
>> know the number of 1 bits in each individual byte in a GPR? 
  
On 2015-03-11, at 08:49, John McKown wrote:
> Because CDC had it first?  I suspect that it became a built-in
> function in Pascal, CARD(), because Pascal was developed on a
> CDC which had the hardware.  

As I understand it, it is used in cryptography. 

Also, it can be done fast in hardware and isn't that hard
if you want to do it.

> Is POPCNT an inexpensive extension of the Wallace Tree?

The ones I know of use a carry save adder tree.
I think that is related to the Wallace tree, but I forget the
exact way they work.

> And I suspect FORTRAN's transfer-of-sign, SIGNF() happened 
> because it was a hardware instruction on the 704.

I suppose. But now that IEEE cares about negative zero, it
has an extra use. 

Even without the special instruction, it is easy to do with 
bitwise AND and OR and most hardware.  (Though you have to be
able to get floating point values in a place where you can do
bitwise operations.)

-- glen

Reply via email to