





import doctest
from collections import deque

import numpy as np




class 			__UpperCamelCase    :





     def __init__(     self					):
        _UpperCAmelCase           =   [2, 1, 2, -1]
        _UpperCAmelCase           =   [1, 2, 3, 4]





     def 		UpperCamelCase(     self					):
        _UpperCAmelCase           =   len(self.first_signal					)
        _UpperCAmelCase           =   len(self.second_signal					)

        _UpperCAmelCase           =   max(_UpperCamelCase				,							_UpperCamelCase					)

        # create a zero matrix of max_length x max_length
        _UpperCAmelCase           =   [[0] * max_length for i in range(_UpperCamelCase					)]

        # fills the smaller signal with zeros to make both signals of same length
        if length_first_signal < length_second_signal:
           self.first_signal += [0] * (max_length - length_first_signal)
        elif length_first_signal > length_second_signal:
           self.second_signal += [0] * (max_length - length_second_signal)
        for i in range(_UpperCamelCase					):
           _UpperCAmelCase           =   deque(self.second_signal					)
           rotated_signal.rotate(_UpperCamelCase					)
           for j, item in enumerate(_UpperCamelCase					):
              matrix[i][j] += item

        # multiply the matrix with the first signal
        _UpperCAmelCase           =   np.matmul(np.transpose(_UpperCamelCase					)				,							np.transpose(self.first_signal					)					)

        # rounding-off to two decimal places
        return [round(_UpperCamelCase				,							2					) for i in final_signal]


if __name__ == "__main__":
   doctest.testmod()






def      A__       (    SCREAMING_SNAKE_CASE_   :      int				,	SCREAMING_SNAKE_CASE_   :      int						)  ->  str:






   """simple docstring"""







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

   _UpperCAmelCase           =   str(bin(SCREAMING_SNAKE_CASE_						)						)[2:]  # remove the leading "0b"
   _UpperCAmelCase           =   str(bin(SCREAMING_SNAKE_CASE_						)						)[2:]  # remove the leading "0b"

   _UpperCAmelCase           =   max(len(SCREAMING_SNAKE_CASE_						)				,	len(SCREAMING_SNAKE_CASE_						)						)

   return "0b" + "".join(
       str(int(char_a == '''1''' and char_b == '''1'''						)						)
       for char_a, char_b in zip(a_binary.zfill(SCREAMING_SNAKE_CASE_						)				,	b_binary.zfill(SCREAMING_SNAKE_CASE_						)						)						)


if __name__ == "__main__":
   import doctest

   doctest.testmod()