conversions.binary_to_hexadecimal ================================= .. py:module:: conversions.binary_to_hexadecimal Attributes ---------- .. autoapisummary:: conversions.binary_to_hexadecimal.BITS_TO_HEX Functions --------- .. autoapisummary:: conversions.binary_to_hexadecimal.bin_to_hexadecimal Module Contents --------------- .. py:function:: bin_to_hexadecimal(binary_str: str) -> str Converting a binary string into hexadecimal using Grouping Method >>> bin_to_hexadecimal('101011111') '0x15f' >>> bin_to_hexadecimal(' 1010 ') '0x0a' >>> bin_to_hexadecimal('-11101') '-0x1d' >>> bin_to_hexadecimal('a') Traceback (most recent call last): ... ValueError: Non-binary value was passed to the function >>> bin_to_hexadecimal('') Traceback (most recent call last): ... ValueError: Empty string was passed to the function .. py:data:: BITS_TO_HEX