

"""simple docstring"""




def 	lowercase__		(    snake_case_					:int       ,						snake_case_					:int  ):


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

	__UpperCAmelCase							=      str(bin(UpperCamelCase__  )  )
	binary_number += "0" * shift_amount
	return binary_number





def 	lowercase__		(    snake_case_					:int       ,						snake_case_					:int  ):


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

	__UpperCAmelCase							=      str(bin(UpperCamelCase__  )  )[2:]
	if shift_amount >= len(UpperCamelCase__  ):
		return "0b0"
	__UpperCAmelCase							=      binary_number[: len(UpperCamelCase__  ) - shift_amount]
	return "0b" + shifted_binary_number





def 	lowercase__		(    snake_case_					:int       ,						snake_case_					:int  ):


	if number >= 0:  # Get binary representation of positive number
		__UpperCAmelCase							=      '''0''' + str(bin(UpperCamelCase__  )  ).strip('''-'''  )[2:]
	else:  # Get binary (2's complement) representation of negative number
		__UpperCAmelCase							=      len(bin(UpperCamelCase__  )[3:]  )  # Find 2's complement of number
		__UpperCAmelCase							=      bin(abs(UpperCamelCase__  ) - (1 << binary_number_length)  )[3:]
		__UpperCAmelCase							=      (
		    '''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()






class     __lowerCAmelCase :

			"""simple docstring"""







			def __init__(      self			,						lowerCamelCase__							)    ->      Any:



							'''simple docstring'''
							__lowerCamelCase		       =    n
							__lowerCamelCase		       =    [None] * self.n
							__lowerCamelCase		       =    0  # index of the first element
							__lowerCamelCase		       =    0
							__lowerCamelCase		       =    0


			def __len__(      self							)    ->      int:



							'''simple docstring'''
							return self.size


			def       lowercase_    (      self							)    ->      bool:



							'''simple docstring'''
							return self.size == 0


			def       lowercase_    (      self							)    ->      str:



							'''simple docstring'''
							return False if self.is_empty() else self.array[self.front]


			def       lowercase_    (      self			,						lowerCamelCase__							)    ->      Optional[Any]:



							'''simple docstring'''
							if self.size >= self.n:
											raise Exception('QUEUE IS FULL'							)

							__lowerCamelCase		       =    data
							__lowerCamelCase		       =    (self.rear + 1) % self.n
							self.size += 1
							return self






			def       lowercase_    (      self							)    ->      Tuple:



							'''simple docstring'''
							if self.size == 0:
											raise Exception('UNDERFLOW'							)

							__lowerCamelCase		       =    self.array[self.front]
							__lowerCamelCase		       =    None
							__lowerCamelCase		       =    (self.front + 1) % self.n
							self.size -= 1
							return temp


