(x, n, p=1)
return np.bitwise_or(c, d)
Bitwise left rotation.

  Args:
    x: np.array
    n: Bit count to represent each value of x
    p: Bit positions to shift

  Returns:
    np.array: x with all values shifted by p positions in n bits
Bitwise left rotation.
Bitwise left rotation .
def _rol(x, n, p=1):
  """Bitwise left rotation.

  Args:
    x: np.array
    n: Bit count to represent each value of x
    p: Bit positions to shift

  Returns:
    np.array: x with all values shifted by p positions in n bits
  """
  a = np.left_shift(x, p)
  b = np.left_shift(1, n) - 1
  c = np.bitwise_and(a, b)
  d = np.right_shift(x, n - p)

  return np.bitwise_or(c, d)
def _rol ( x , n , p = 1 ) : a = np . left_shift ( x , p ) b = np . left_shift ( 1 , n ) - 1 c = np . bitwise_and ( a , b ) d = np . right_shift ( x , n - p ) return np . bitwise_or ( c , d )