Platforms to show: All Mac Windows Linux Cross-Platform

BitCountMBS(value as UInt64) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Math MBS Util Plugin 6.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Counts the number of bits set.
Example
MsgBox str(BitCountMBS(&b101)) // 2
MsgBox str(BitCountMBS(&b10101)) // 5
MsgBox str(BitCountMBS(&b11111111111100001111)) // 16
MsgBox str(BitCountMBS(&hFFFFFFFF)) // 32

Does not work for 64 bit integers.

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...