Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.0 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> Xcos > palettes > Integer palette > BITCLEAR

BITCLEAR

Clear a Bit

Block Screenshot

Description

This block sets to 0 the specified bit of its input. The user gives the bit index in the field Index of Bit with index 0, as that of the least significant bit.The operation can be summarized by this expression:

i.e. a bitwise AND between Input and Mask, an integer of the same length as the input with a value 0 for the bit to clear and a value 1 for the other bits.

Data types

The block supports the following types :

  • Input : scalar. All Scilab's integer type (Data type parameter).

  • Output : same type and dimensions than input.

Dialog box

  • Data Type (3=int32 4=int16 5=int8 ...)

    It indicates the integer type of the input (output) data : between 3 and 8.

    Properties : Type 'vec' of size 1.

  • Index of Bit (0 is least significant)

    It indicate the index of the bit to clear. The index must be, when the type is:

    • int32 or uint32: positive and less than 32.

    • int16 or uint16: positive and less than 16.

    • int8 or uint8: positive and less than 8.

    Properties : Type 'vec' of size 1.

Default properties

  • always active: no

  • direct-feedthrough: yes

  • zero-crossing: no

  • mode: no

  • regular inputs:

    - port 1 : size [1,1] / type 3

  • regular outputs:

    - port 1 : size [1,1] / type 3

  • 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: bit_clear_32

Example

Below a simple use case of the block.

Interfacing function

  • SCI/modules/scicos_blocks/macros/IntegerOp/BITCLEAR.sci

Computational function

  • SCI/modules/scicos_blocks/src/c/bit_clear_32.c

  • SCI/modules/scicos_blocks/src/c/bit_clear_16.c

  • SCI/modules/scicos_blocks/src/c/bit_clear_8.c

See also

Report an issue
<< Integer_pal Integer palette BITSET >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Fri Apr 11 14:19:45 CEST 2014