Evil Number Checker
Check whether a nonnegative integer has an even count of one bits in binary.
Description
Check whether a nonnegative integer's binary expansion contains an even number of one bits.
Evil Number Checker check whether a nonnegative integer's binary expansion contains an even number of one bits.
Use this for parity-bit examples, integer-sequence exploration, bit-manipulation exercises, and test-vector classification.
When to use Evil Number Checker
Use this for parity-bit examples, integer-sequence exploration, bit-manipulation exercises, and test-vector classification.
How it works
The value is written in base two, the one bits are counted, and an even count—including zero—returns true.1
Interpreting the result
Keep the input units, direction conventions, encoding, and ordering rules visible when reusing the result. Preserve the full returned value for downstream calculations and round only for presentation.
Assumptions and limitations
The mathematical name is unrelated to security or data quality. This classifies the numeric value, not a fixed-width signed machine representation.
References
-
The On-Line Encyclopedia of Integer Sequences — OEIS Foundation