Counting packed Boolean fields by multiplication #
Multiplying packed zero-or-one fields by an all-ones radix word places their sum in the middle field. A radix larger than the number of fields prevents all carries. This is an arithmetic identity; a RAM client must separately justify product overflow.
Main results #
countPackedFlags: multiplication, division, and remainder recover the number of set fields.