Communications Blockset | ![]() ![]() |
Map a vector of integers to a vector of bits
Library
Description
The Integer to Bit Converter block maps each integer in the input vector to a group of bits in the output vector. If M is the Number of bits per integer parameter, then the input integers must be between 0 and 2M-1. The block maps each integer to a group of M bits, using the first bit as the most significant bit. As a result, the output vector length is M times the input vector length.
The input can be either a scalar or a frame-based column vector.
Dialog Box
Examples
If the input is [7; 13] and the Number of bits per integer parameter is 4, then the output is [0; 1; 1; 1; 1; 1; 0; 1]. The first group of four bits (0, 1, 1, 1) represents 7 and the second group of four bits (1, 1, 0, 1) represents 13. Notice that the output length is four times the input length.
Pair Block
![]() | Integer-Output RS Decoder | Integrate and Dump | ![]() |