Owning Class: bitwise
Requires: MathScript RT Module
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).
|a||Specifies a scalar, vector, or matrix of nonnegative integers. All elements of a must be less than maxfloatint.|
|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.|
|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.|
The following table lists the support characteristics of this function.
|Supported in the LabVIEW Run-Time Engine||Yes|
|Supported on RT targets||Yes|
|Suitable for bounded execution times on RT||Not characterized|
A = [134, 45, 232]
B = [1, 2, 3]
D = bitshift(A, B)