Package: comm
Convert vector of bits to vector of integers
The BitToInteger
object maps groups of bits
in the input vector to integers in the output vector.
To map bits to integers:
Define and set up your bit to integer object. See Construction.
Call step
to map groups of bits
in the input vector to integers in the output vector according to
the properties of comm.BitToInteger
. The behavior
of step
is specific to each object in the toolbox.
Note:
Starting in R2016b, instead of using the 
H = comm.BitToInteger
creates a bittointeger
converter System object, H
, that maps a vector
of bits to a corresponding vector of integer values.
H = comm.BitToInteger(
creates
a bittointeger converter object, Name
,Value
)H
, with each
specified property set to the specified value. You can specify additional
namevalue pair arguments in any order as (Name1
,Value1
,...,NameN
,ValueN
).
H = comm.BitToInteger(NUMBITS,
creates
a bittointeger converter System object, Name
,Value
)H
This
object has the BitsPerInteger
property
set to NUMBITS
and the other specified properties
set to the specified values.

Number of bits per integer Specify the number of input bits that the object maps to each
output integer. You can set this property to a scalar integer between 

Assume first bit of input bit words is most significant bit Set this property to true to indicate that the first bit of
the input bit words is the most significant bit (MSB). The default
is 

Output signed integers Set this property to true to generate signed integer outputs.
The default is When you set this property to When you set this property to 

Data type of output Specify the output data type. The default is When you set the When you set this property to When the input signal is an integer data type, you must have
a FixedPoint Designer™ user license to use this property in When you set the When you set this property to 
clone  Create bit to integer converter object with same property values 
getNumInputs  Number of expected inputs to step method 
getNumOutputs  Number of outputs from step method 
isLocked  Locked status for input attributes and nontunable properties 
release  Allow property value and input characteristics changes 
step  Convert vector of bits to vector of integers 
This object implements the algorithm, inputs, and outputs described on the Bit To Integer Converter block reference page. The object properties correspond to the block parameters.