Package: comm
Convert vector of integers to vector of bits
The IntegerToBit
object maps each integer (or
fixedpoint value) in the input vector to a group of bits in the output
vector.
To map integers to bits:
Define and set up your integer to bit object. See Construction.
Call step
to map integers in the
input vector to groups of bits in the output vector according to the
properties of comm.IntegerToBit
. The behavior of step
is
specific to each object in the toolbox.
H = comm.IntegerToBit
creates an integertobit
converter System object™, H
. This object maps
a vector of integervalued or fixedpoint inputs to a vector of bits.
H = comm.IntegerToBit(
creates
an integertobit 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.IntegerToBit(NUMBITS,
creates
an integertobit converter 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 bits the System object uses to represent
each input integer. You must set this property to a scalar integer
between 

Output bit words with first bit as most significant bit Set this property to true to indicate that the first bit of
the output bit words is the most significant bit (MSB). The default
is 

Assume inputs are signed integers Set this property to true if the integer inputs are signed.
The default is 

Data type of output Specify output data type as one of 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 this property to When you set this property to 
clone  Create an integertobit 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 integers to vector of bits 
This object implements the algorithm, inputs, and outputs described on the Integer to Bit Converter block reference page. The object properties correspond to the block parameters.