{"id":"all-ones-check-idiom","text":"`(m & (m + 1)) == 0` tests whether `m` is zero or all-ones up to the MSB — the complement of the `n & (n-1) == 0` power-of-two check, reusable across bit-manipulation problems.","truth_value":"IN","source":"entries/2026/06/06/binary-number-with-alternating-bits-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"all-ones-check-idiom","truth_value":"IN","reason":"premise"}]}}