Binary Operations

Element-wise bit operations

dpnp.bitwise_and

Computes the bitwise AND of the underlying binary representation of each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

dpnp.bitwise_not

Inverts (flips) each bit for each element x_i of the input array x.

dpnp.bitwise_or

Computes the bitwise OR of the underlying binary representation of each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

dpnp.bitwise_xor

Computes the bitwise XOR of the underlying binary representation of each element x1_i of the input array x1 with the respective element x2_i of the input array x2.

dpnp.invert

Inverts (flips) each bit for each element x_i of the input array x.

dpnp.left_shift

Shifts the bits of each element x1_i of the input array x1 to the left by appending x2_i (i.e., the respective element in the input array x2) zeros to the right of x1_i.

dpnp.right_shift

Shifts the bits of each element x1_i of the input array x1 to the right according to the respective element x2_i of the input array x2.

Bit packing

Output formatting