Bit to Integer Converter
Maps a vector of bits to the corresponding vector of integers.
blockType: BitToIntegerConverter
Path in the library:
|
Description
Block Bit to Integer Converter maps groups of bits in the input vector to integers in the output vector.
Number is set by the parameter Number of bits per integer (M) :
-
For unsigned integers, the block matches each group of an integer bit in the range . As a result, the length of the output vector in times less than the length of the input vector.
-
For signed integers, the block matches each group of an integer bit in the range .
Ports
Input
#
IN_1
—
Input signal
bit scalar | A vector is a column of bits
Details
The input signal, in the form of a scalar or a column vector of bits with a length multiple of the value specified in the parameter Number of bits per integer (M). The input data must be bits with values 0 or 1.
| Data types |
|
| Complex numbers support |
Yes |
Output
#
OUT_1
—
Output signal
an integer | A vector is a column of integers
Details
The output signal returned as an integer or a column vector of integers. Parameter After bit packing, treat resulting integer values as determines whether the output integers are interpreted as unsigned or signed.
-
When the input bits are treated as unsigned, each integer in the output is in the range .
-
When the input bits are treated as signed, each integer in the output is in the range .
| Data types |
|
| Complex numbers support |
Yes |
Parameters
Main
#
Number of bits per integer (M) —
number of bits per integer (M)
Int64 integer
Details
The number of input bits mapped to each integer in the input as an integer in the range of values [1, 32].
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
Yes |
#
Input bit order —
the order of the bits in the input
MSB first | LSB first
Details
Determine if the first bit of the input signal is the highest bit (MSB first) or the low - order bit (LSB first).
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
After bit packing, treat resulting integer values as —
treat output values as signed or unsigned numbers
Unsigned | Signed
Details
Specify whether the output values should be treated as signed numbers (Signed) or unsigned (Unsigned).
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Output data type —
type of unsigned output data
Same as input | Float64 | Float32 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32
Details
If the output integers are unsigned, then you can choose one of the following output data type options:
-
Same as input -
Float64 -
Float32 -
Int8 -
UInt8 -
Int16 -
UInt16 -
Int32 -
UInt32
Dependencies
To use this parameter, set for the parameter After bit packing, treat resulting integer values as meaning Unsigned.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Output data type —
the type of signed output data
Float64 | Float32 | Int8 | Int16 | Int32
Details
If the output is signed integers, then you can choose one of the following output data type options:
-
Float64 -
Float32 -
Int8 -
Int16 -
Int8
Dependencies
To use this parameter, set for the parameter After bit packing, treat resulting integer values as meaning Signed.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |