converter: Improve bit_position computation