Rob van der Heij wrote:
I am well aware of how bit maps are used. However, most legitimate
cases I could come up with (like others, apparently) were situations
where I would also want to know *which* bit was the first one set
(where TRT would be appropriate). Or cases where I'd just want to know
that not all bits are on or off. But to have the hardware actually
bother to count the bits seems to me pure luxury.


Suppose you are an operating system that must maintain a CPU
online/offline mask for all 80 processors on the z196. That's a 10-byte
bit string. It might be helpful to be able to quickly count the bits to
know how many processors are currently online rather than maintaining a
separate field to hold this value. By eliminating this second field, you
reduce the possibility to zero that these two different representations
of the same information can get out of sync.

--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
310-338-0400 x318
[email protected]
http://www.phoenixsoftware.com/

Reply via email to