Odious Number Checker
Odious integer has odd count of1bits in unsigned binary, zero even/not odious; arithmetic uses full safe integer not32bit truncation.
Description
An odious integer has an odd number of one bits in its unsigned binary representation.
An odious integer has an odd number of one bits in its unsigned binary representation.1
This tool counts all bits of a nonnegative safe integer without truncating to a 32-bit bitwise value.
When to use Odious Number Checker
This tool counts all bits of a nonnegative safe integer without truncating to a 32-bit bitwise value.
How to use Odious Number Checker and how it works
- Prepare nonnegative safe integer, using the input definitions and matching units below.
- Enter the required fields and run Odious Number Checker.
- Read result.isOdious, result.binaryOneBitCount using the units, signs and ordering explained below.
- Correct any rejected inputs and rerun; interpret the result within the stated model and its assumptions.
| Input field | Meaning | Value type | Requirement |
|---|---|---|---|
| actualNonnegativeSafeInteger | Actual Nonnegative Safe Integer. Use the units and matching context stated in the calculation below. | number | Required; finite; other constraints below |
Require a nonnegative safe integer. Convert its full unsigned value to a binary string, count one bits and return the count and whether it is odd. Zero has no one bits and is not odious. No 32-bit bitwise truncation occurs.
oneBits=countOnes(binary(integer)); isOdious=(oneBits mod 2)==1 Apply the input ordering, units and branch conditions stated above.
| Output field | Meaning | Value type |
|---|---|---|
| result | Object containing the calculated or selected fields below. | object |
| result.isOdious | True when the full safe-integer binary representation has an odd one-bit count. | boolean |
| result.binaryOneBitCount | Number of one bits without 32-bit truncation. | number |
{
"input": {
"actualNonnegativeSafeInteger": 7
},
"output": {
"result": {
"isOdious": true,
"binaryOneBitCount": 3
}
}
} Limitations and assumptions
The calculation uses the supplied observations and model inputs. It does not collect measurements, select a reference population or coefficient, or establish that the model applies to the actual case. The stated branch conditions and output units remain part of the result.
All fields require explicit values. Unexpected fields, wrong types, nonfinite numbers and sparse arrays are rejected. Alignment, bounds and supported-token rules are explained above; extremely large inputs or nonfinite results can also fail. Input errors differ from successful false comparisons, unavailable-domain flags and empty match lists.
Alternative or Complementary methods
Use Perfect Digital Invariant Checker for a complementary operation: A perfect digital invariant equals the sum of its decimal digits raised to a specified fixed power.
Use Hyperfactorion Checker for a complementary operation: A hyperfactorion equals the sum of the hyperfactorials of its decimal digits, with the zero-digit empty product equal to one.
References
-
Odious Number Checker — tool.io
Similar or alternative tools
- Perfect Digital Invariant Checker
A perfect digital invariant equals the sum of its decimal digits raised to a specified fixed power.
- Hyperfactorion Checker
A hyperfactorion equals the sum of the hyperfactorials of its decimal digits, with the zero-digit empty product equal to one.