(x, n, p=1)
return a + d
Bitwise right 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 right rotation.
Bitwise right rotation .
def _ror(x, n, p=1):
  """Bitwise right 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.right_shift(x, p)
  b = np.left_shift(1, p) - 1
  c = np.bitwise_and(x, b)
  d = np.left_shift(c, n - p)

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