fn msb_mask(bit: usize) -> u8
Returns a bit mask for the selected bit with the most significant bit at index 0.