https://github.com/stevenhalim/cpbook-code/blob/26fb7376417799f8b84b504d46ea7c8c0cf71c29/ch2/lineards/bit_manipulation.py#L9C1-L9C1 