Member of the bitwise class.
d = bitshift(a, b)
d = bitshift(a, b, c)
Performs a bitwise shift on the input elements. For example, if a = 9 (1001), bitshift(a, 1) = 18 (10010) and bitshift(a, 1, 4) = 2 (0010).
| Name | Description |
| a | Specifies a scalar, vector, or matrix of positive integers. All elements of a must be less than bitmax. |
| b | Determines the shift sizes. Shifting a by b bits is equivalent to multiplying a by 2^b and then rounding to the nearest integer. b is a scalar, vector, or matrix of integers. b is the same size as a unless a or b is a scalar. |
| c | Specifies the number of valid bits for each of the shifted integers. If the shifted integers exceed c bits, LabVIEW ignores the overflow. c is a matrix of integers. The default is 53. |
| Name | Description |
| d | Returns the elements of a shifted to the left by b bits. d is a matrix of the same size as the larger of a and b. |
A = [134, 45, 232]
B = [1, 2, 3]
D = bitshift(A, B)