Table Of Contents

MT UnPack Bits (G Dataflow)

Last Modified: January 9, 2017

Unpacks data to an unsigned or signed integer array.

This node unpacks MN-sized binary data of the form b i = {0,1}, to an unsigned or signed integer array a_n,

where;

i = 0…MN-1, and M denotes the number of bits per integer.

n = 0…N-1, and N denotes the size of the array.

connector_pane_image
datatype_icon

input integers

The signed or unsigned integer data a n , n = 0…N-1, to be converted into binary data.

Default: empty

datatype_icon

bits per integer

Number of binary data values that are packed into an integer.

If you set the integer format parameter to Unsigned, the maximum value is 31. If you set the integer format parameter to Signed, the maximum value is 32.

Default: 1

datatype_icon

packed bit order

The order in which the binary data stream is packed into integers.

Name Description
MSB first

Data is packed with the most significant bit (MSB) first.

LSB first

Data is packed with the least significant bit (LSB) first.

Default: MSB first

datatype_icon

integer format

Input integer format.

Name Description
Unsigned

The entire number is packed as a positive integer.

Signed

The most significant bit (MSB) determines the sign of the input integer.

Default: Unsigned

datatype_icon

error in

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

Default: no error

datatype_icon

output bit stream

The output binary data stream b i = {0,1}, i = 0…MN-1, that corresponds to the packed representation of the input binary data.

Where,

i = 0…MN-1, and M denotes the number of bits per integer.

n = 0…N-1, and N denotes the size of the array.

datatype_icon

error out

Error information. The node produces this output according to standard error behavior.

Relationship between Input Integers and Output Bit Stream

The relationship between the input integers and the output bit stream is given by the following equations:

b i×M+j = (a i »(M-1-j)) &1, j = 0…M-1, i = 0…N - 1 (packed bit order set to MSB first)

b i×M+j = (a i »j) &1, j = 0…M - 1, i = 0…N - 1 (packed bit order set to LSB first)

Where » denotes the operation of right shifting, and the operator & stands for the logical AND operation.

For example, assume the input integers array is the element [4], the bits per integer value is specified as 3, and integer format is set to Unsigned. If packed bit order is set to MSB first, the output bit stream is [1 0 0]. If the packed bit order is set to LSB first, the output bit stream is [0 0 1]. The signed negative numbers are stored as the 2's complement. Thus, if integer format is set to Signed and the bits per integer is set to 3, the input integer array is the element [-3], and the packed bit order is set to MSB First the output bit stream is [1 0 1].

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported


Recently Viewed Topics