Bloc Scicos
fr - eng

##
EXTRACTBITS Extraction de bits

### Contenu

- EXTRACTBITS Extraction de bits
  - Palette
  - Description
  - Boîte de dialogue
  - Propriétés par défaut
  - Fonction d'interface
  - Fonction de calcul
  - Voir aussi
  - Auteurs

### Palette

- Integer - Palette Integer

### Description

This block outputs a contiguous selection of bits from the input integer number.The Bits to extract defines the method by which the user select the output bits.
1- When "Upper Half" is selected the block outputs the half of the input that contain the most significant bit. In this case the third parameter "number of bits or index of bit" is ignored.
2- When "Lower Half" is selected the block outputs the half of the input that contain the least significant bit. In this case the third parameter "number of bits or index of bit" is ignored.
3- When "Range starting with most significant bit" is selected the block outputs certain number of bits of the input that contain the most significant bit. In this case the third parameter "number of bits or index of bit" defines the number of bits to extract.
4- When "Range ending with least significant bit" is selected the block outputs certain number of bits of the input that contain the least significant bit. In this case the third parameter "number of bits or index of bit" defines the number of bits to extract.
5- When "Range of bits" is selected the block outputs a range of bits of the input. In this case the third parameter "number of bits or index of bit" defines the range of bits to extract, it must be a vector with the format [start,end].
The extracted value depends on the forth parameter "Treat bit field as an integer". When it is set to 0 the input scaling is used to determine the output scaling. When it is set to 1, only the extracted bits forms the output number.

### Boîte de dialogue

- Datatype(3=int32 4=int16 5=int8 ...)
  It indicates the type of the input/output data. It support all the integer datatype, number must be between 3 and 8.
  Propriétés : Type 'vec' de taille 1.

- Bits to extract(1=Upper Half 2=Lower Half 3=Range starting with most significant bit 4=Range ending with least significant bit 5=Range of bits)
  It indicates the mode used to extract bits from the input data.
  Propriétés : Type 'vec' de taille 1.

- number of bits or index of bit (case range of bits:[start,end],0 is leat significant bit)
  When the "Bits to extract" field is set to 3 or 4, this parameter is used to determine the number of bits to extract and it must be a number. When the "Bits to extract" field is set to 5 ,this parameter is used to determine range of bits to extract and it must have the [start,end] form vector. When the "Bits to extract" field is set to 1 or 2, this parameter is ignored.
  Propriétés : Type 'vec' de taille -1.

- Treat bit field as an integer(0=no 1=yes)
  It indicates the scaling mode to use on the output bits selection.
  Propriétés : Type 'vec' de taille 1.

### Propriétés par défaut

- toujours actif: non
- direct-feedthrough: oui
- détection de passage à zéro: non
- mode: non
- entrée régulières:
  - port 1 : taille [1,1] / type 3
- sorties régulières:
  - port 1 : taille [1,1] / type 3
- nombre des entrées évènementielles: 0
- nombre des sorties évènementielles: 0
- possède un état continu: non
- possède un état discret: non
- possède un état objet: non
- nom de la fonction de calcul: extract_bit_32_UH0

### Fonction d'interface

- SCI/macros/scicos_blocks/IntegerOp/EXTRACTBITS.sci [voir code]

### Fonction de calcul

- SCI/routines/scicos/extract_bit_32_UH0.c [voir code]
- SCI/routines/scicos/extract_bit_32_UH1.c [voir code]
- SCI/routines/scicos/extract_bit_u32_UH1.c [voir code]
- SCI/routines/scicos/extract_bit_32_LH.c [voir code]
- SCI/routines/scicos/extract_bit_32_MSB0.c [voir code]
- SCI/routines/scicos/extract_bit_32_MSB1.c [voir code]
- SCI/routines/scicos/extract_bit_u32_MSB1.c [voir code]
- SCI/routines/scicos/extract_bit_32_LSB.c [voir code]
- SCI/routines/scicos/extract_bit_32_RB0.c [voir code]
- SCI/routines/scicos/extract_bit_32_RB1.c [voir code]
- SCI/routines/scicos/extract_bit_u32_RB1.c [voir code]
- SCI/routines/scicos/extract_bit_16_UH0.c [voir code]
- SCI/routines/scicos/extract_bit_16_UH1.c [voir code]
- SCI/routines/scicos/extract_bit_u16_UH1.c [voir code]
- SCI/routines/scicos/extract_bit_16_LH.c [voir code]
- SCI/routines/scicos/extract_bit_16_MSB0.c [voir code]
- SCI/routines/scicos/extract_bit_16_MSB1.c [voir code]
- SCI/routines/scicos/extract_bit_u16_MSB1.c [voir code]
- SCI/routines/scicos/extract_bit_16_LSB.c [voir code]
- SCI/routines/scicos/extract_bit_16_RB0.c [voir code]
- SCI/routines/scicos/extract_bit_16_RB1.c [voir code]
- SCI/routines/scicos/extract_bit_u16_RB1.c [voir code]
- SCI/routines/scicos/extract_bit_8_UH0.c [voir code]
- SCI/routines/scicos/extract_bit_8_UH1.c [voir code]
- SCI/routines/scicos/extract_bit_u8_UH1.c [voir code]
- SCI/routines/scicos/extract_bit_8_LH.c [voir code]
- SCI/routines/scicos/extract_bit_8_MSB0.c [voir code]
- SCI/routines/scicos/extract_bit_8_MSB1.c [voir code]
- SCI/routines/scicos/extract_bit_u8_MSB1.c [voir code]
- SCI/routines/scicos/extract_bit_8_LSB.c [voir code]
- SCI/routines/scicos/extract_bit_8_RB0.c [voir code]
- SCI/routines/scicos/extract_bit_8_RB1.c [voir code]
- SCI/routines/scicos/extract_bit_u8_RB1.c [voir code]

### Voir aussi

- BITSET - BITSET Positionne un bit (Bloc Scicos)
- BITCLEAR - BITCLEAR Raz un bit (Bloc Scicos)

### Auteurs

Fady NASSIF INRIA