Bits to Word
R2026bLibraries:
HDL Coder /
Logic and Bit Operations
Description
The Bits to Word block converts a length-N input vector of bits to an N-bit integer. The output of the block is an unsigned integer that has word length N.
The block treats the first element of the input vector as the least significant bit (LSB)
of the output and treats subsequent bits as the next significant bits in ascending order. This
figure shows the conversion of the bit vector [1 0 1 1 0] to the integer
value 13.

Examples
Ports
Input
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"hdlsllib/Logic and Bit Operations/Bits to Word"
Example: add_block("hdlsllib/Logic and Bit Operations/Bits to Word","myModel/myBlock",MakeNameUnique="on")
