



"""simple docstring"""





def 	__lowerCAmelCase						(		__UpperCamelCase      :			int					, __UpperCamelCase      :			int    ):


						'''simple docstring'''






						if number < 0 or shift_amount < 0:
												raise ValueError("""both inputs must be positive integers"""    )

						snake_case_   : Union[str, Any]						=			str(bin(__UpperCamelCase    )    )
						binary_number += "0" * shift_amount
						return binary_number
def 	__lowerCAmelCase						(		__UpperCamelCase      :			int					, __UpperCamelCase      :			int    ):


						'''simple docstring'''






						if number < 0 or shift_amount < 0:
												raise ValueError("""both inputs must be positive integers"""    )

						snake_case_   : List[Any]						=			str(bin(__UpperCamelCase    )    )[2:]
						if shift_amount >= len(__UpperCamelCase    ):
												return "0b0"
						snake_case_   : Dict						=			binary_number[: len(__UpperCamelCase    ) - shift_amount]
						return "0b" + shifted_binary_number
def 	__lowerCAmelCase						(		__UpperCamelCase      :			int					, __UpperCamelCase      :			int    ):


						'''simple docstring'''






						if number >= 0:  # Get binary representation of positive number
												snake_case_   : List[str]						=			"""0""" + str(bin(__UpperCamelCase    )    ).strip("""-"""    )[2:]
						else:  # Get binary (2's complement) representation of negative number
												snake_case_   : Optional[Any]						=			len(bin(__UpperCamelCase    )[3:]    )  # Find 2's complement of number
												snake_case_   : List[str]						=			bin(abs(__UpperCamelCase    ) - (1 << binary_number_length)    )[3:]
												snake_case_   : str						=			(
												    """1""" + """0""" * (binary_number_length - len(__UpperCamelCase    )) + binary_number
												)

						if shift_amount >= len(__UpperCamelCase    ):
												return "0b" + binary_number[0] * len(__UpperCamelCase    )
						return (
						    "0b"
						    + binary_number[0] * shift_amount
						    + binary_number[: len(__UpperCamelCase    ) - shift_amount]
						)


if __name__ == "__main__":
					import doctest

					doctest.testmod()






"""simple docstring"""





def 	__lowerCAmelCase						(		__UpperCamelCase      :			int					, __UpperCamelCase      :			int    ):


						'''simple docstring'''






						if a < 0 or b < 0:
												raise ValueError("""the value of both inputs must be positive"""    )

						snake_case_   : List[str]						=			str(bin(__UpperCamelCase    )    )[2:]  # remove the leading "0b"
						snake_case_   : Union[str, Any]						=			str(bin(__UpperCamelCase    )    )[2:]  # remove the leading "0b"

						snake_case_   : int						=			max(len(__UpperCamelCase    )					, len(__UpperCamelCase    )    )

						return "0b" + "".join(
						    str(int(char_a != char_b    )    )
						    for char_a, char_b in zip(a_binary.zfill(__UpperCamelCase    )					, b_binary.zfill(__UpperCamelCase    )    )    )


if __name__ == "__main__":
					import doctest

					doctest.testmod()

