Counts the bits set in an integral or boolean value. Integral values are widened to longs first, so a negative value also counts its sign extension. True counts as 1 and false as 0.
式のカテゴリー: バイナリ
引数
Expression: The value whose set bits to count. Expression<Boolean | Byte | Integer | Long | Short>
出力タイプ:Integer
例
例1:基本ケース
説明: A negative integer counts the 32 extra bits of its sign extension to a long.