This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Bit Clear

Set specified bit of stored integer to zero

  • Library:
  • Simulink / Logic and Bit Operations

    HDL Coder / Logic and Bit Operations

Description

The Bit Clear block sets the specified bit, given by its index, of the stored integer to zero. Scaling is ignored.

You can specify the bit to be set to zero with the Index of bit parameter, where bit zero is the least significant bit.

Ports

The Bit Clear block supports Simulink® integer, fixed-point, and Boolean data types. The block does not support true floating-point data types or enumerated data types.

Input

expand all

The input signal is the specified bit of the stored integer.

Data Types: single | double | Boolean | fixed point

Output

expand all

The output consists of the specified bit set to zero.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated | bus

Parameters

expand all

Index of bit where bit 0 is the least significant bit.

Programmatic Use

Block Parameter: iBit
Type: scalar or vector
Values: {'0'}
Default: '0'

Block Characteristics

Data Types

Boolean[a] | fixed point | integer

Direct Feedthrough

no

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

[a] Bit operations are not recommended for use with Boolean signals.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

HDL Code Generation
Generate Verilog and VHDL code for FPGA and ASIC designs using HDL Coder™.

PLC Code Generation
Generate Structured Text code using Simulink® PLC Coder™.

Fixed-Point Conversion
Convert floating-point algorithms to fixed point using Fixed-Point Designer™.

Introduced before R2006a