Binary vector to integer vector converter block
That block converts words of bits in integer numbers. Binary word are vectors of 0,1 and the input can be composed by several word. Then the output can also be a vector of integer numbers.
Given N the number of bits per integer and outsz the size of the output vector, the input vector size of the regular input port is insz = outsz * N.
- Output size
The size of the regular output.
Properties : Type 'vec' of size 1.
- Number of bits per integer
Sets the number of bit per integer.
Properties : Type 'vec' of size 1.
- MSB first (0:No/1:Yes)
That parameter says if the first read bit is the Most Significant Bit or the Least Significant Bit. The default value is 1.
Properties : Type 'vec' of size 1.
- Signed number (0:No/1:Yes)
Details if input binary numbers are signed number or not.
Properties : Type 'vec' of size 1.
- Output data type (-1:automatic switch)
It gives the output data type. If -1 then the block will automatically find the better type according to the number of bit per integer paramater else it can be :
- 1
double
- 3/4/5
int32/int16/int8
- 6/7/8
uint32/uint16/uint8
- always active: no
- direct-feedthrough: yes
- zero-crossing: no
- mode: no
- regular inputs:
- port 1 : size [4,1] / type -1
- regular outputs:
- port 1 : size [1,1] / type 8
- number/sizes of activation inputs: 0
- number/sizes of activation outputs: 0
- continuous-time state: no
- discrete-time state: no
- object discrete-time state: no
- name of computational function: bin2dec
- MODNUMCOS/macros/scicos_blocks/Integer/BIN2DEC_c.sci [view code]
- MODNUMCOS/routines/integer/bin2dec.c (Type 4) [view code]
A.Layec INRIA