Communications Blockset    
Bit to Integer Converter

Map a vector of bits to a corresponding vector of integers

Library

Utility Functions

Description

The Bit to Integer Converter block maps groups of bits in the input vector to integers in the output vector. If M is the Number of bits per integer parameter, then the block maps each group of M bits to an integer between 0 and 2M-1. As a result, the output vector length is 1/M times the input vector length.

If the input is sample-based input, then it must be a vector whose length equals the Number of bits per integer parameter. If the input is frame-based, then it must be a column vector whose length is an integer multiple of Number of bits per integer.

The block interprets the first bit in each group as the most significant bit.

Dialog Box

Number of bits per integer
The number of input bits that the block maps to each integer of the output. This parameter must be an integer between 1 and 31.

Examples

If the input is [0; 1; 1; 1; 1; 1; 0; 1] and the Number of bits per integer parameter is 4, then the output is [7; 13]. The block maps the first group of four bits (0, 1, 1, 1) to 7 and the second group of four bits (1, 1, 0, 1) to 13. Notice that the output length is one-fourth of the output length.

Pair Block

Integer to Bit Converter


  Bipolar to Unipolar Converter BPSK Demodulator Baseband