"""simple docstring"""


a							={
    '0000': '0',
    '0001': '1',
    '0010': '2',
    '0011': '3',
    '0100': '4',
    '0101': '5',
    '0110': '6',
    '0111': '7',
    '1000': '8',
    '1001': '9',
    '1010': 'a',
    '1011': 'b',
    '1100': 'c',
    '1101': 'd',
    '1110': 'e',
    '1111': 'f',
}





def       lowerCamelCase_			( __lowerCAmelCase    )							-> str:




						'''simple docstring'''



						lowerCamelCase__ =str(__lowerCAmelCase    ).strip()

						# Exceptions
						if not binary_str:
												raise ValueError("Empty string was passed to the function"    )
						lowerCamelCase__ =binary_str[0] == "-"
						lowerCamelCase__ =binary_str[1:] if is_negative else binary_str
						if not all(char in "01" for char in binary_str    ):
												raise ValueError("Non-binary value was passed to the function"    )

						lowerCamelCase__ =(
						    "0" * (4 * (divmod(len(__lowerCAmelCase    )       ,   4    )[0] + 1) - len(__lowerCAmelCase    )) + binary_str
						)

						lowerCamelCase__ =[]
						for x in range(0       ,   len(__lowerCAmelCase    )       ,   4    ):
												hexadecimal.append(BITS_TO_HEX[binary_str[x : x + 4]]    )
						lowerCamelCase__ ="0x" + "".join(__lowerCAmelCase    )

						return "-" + hexadecimal_str if is_negative else hexadecimal_str


if __name__ == "__main__":
	from doctest import testmod

	testmod()



"""simple docstring"""


from __future__ import annotations

from enum import Enum






class        __UpperCAmelCase						(     __lowerCAmelCase     ):
				A__				:       List[Any]  							=	2_4
				A__				:       List[str]  							=	2_1
				A__				:       List[Any]  							=	1_8
				A__				:       Optional[Any]  							=	1_5
				A__				:       List[Any]  							=	1_2
				A__				:       Optional[int]  							=	9
				A__				:       List[Any]  							=	6
				A__				:       int  							=	3
				A__				:       Optional[int]  							=	2
				A__				:       int  							=	1
				A__				:       Optional[int]  							=	-1
				A__				:       Dict  							=	-2
				A__				:       Optional[Any]  							=	-3
				A__				:       str  							=	-6
				A__				:       Union[str, Any]  							=	-9
				A__				:       Optional[Any]  							=	-1_2
				A__				:       int  							=	-1_5
				A__				:       Union[str, Any]  							=	-1_8
				A__				:       Any  							=	-2_1
				A__				:       Union[str, Any]  							=	-2_4






class        __UpperCAmelCase						(     __lowerCAmelCase     ):
				A__				:       Optional[int]  							=	8
				A__				:       Any  							=	7
				A__				:       Any  							=	6
				A__				:       Tuple  							=	5
				A__				:       Optional[Any]  							=	4
				A__				:       str  							=	3
				A__				:       Dict  							=	2
				A__				:       Tuple  							=	1





def       lowerCamelCase_			( __lowerCAmelCase       ,   __lowerCAmelCase       ,   __lowerCAmelCase       ,   )							-> float:




						'''simple docstring'''



						if isinstance(__lowerCAmelCase       ,   __lowerCAmelCase    ):
												lowerCamelCase__ =SIUnit[known_prefix.lower()]
						if isinstance(__lowerCAmelCase       ,   __lowerCAmelCase    ):
												lowerCamelCase__ =SIUnit[unknown_prefix.lower()]
						lowerCamelCase__ =known_amount * (
						    10 ** (known_prefix.value - unknown_prefix.value)
						)
						return unknown_amount





def       lowerCamelCase_			( __lowerCAmelCase       ,   __lowerCAmelCase       ,   __lowerCAmelCase       ,   )							-> float:




						'''simple docstring'''



						if isinstance(__lowerCAmelCase       ,   __lowerCAmelCase    ):
												lowerCamelCase__ =BinaryUnit[known_prefix.lower()]
						if isinstance(__lowerCAmelCase       ,   __lowerCAmelCase    ):
												lowerCamelCase__ =BinaryUnit[unknown_prefix.lower()]
						lowerCamelCase__ =known_amount * (
						    2 ** ((known_prefix.value - unknown_prefix.value) * 10)
						)
						return unknown_amount


if __name__ == "__main__":
	import doctest

	doctest.testmod()


