Main Content

Bit Clear

Set specified bit of stored integer to zero

  • 库:
  • Simulink / Logic and Bit Operations

    HDL Coder / Logic and Bit Operations

  • Bit Clear block

Description

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

您可以使用该位指定要设置为零的位Index of bitparameter, where bit zero is the least significant bit.

Ports

The Bit Clear block supports Simulink®强度ger, 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|固定点

Output

expand all

The output consists of the specified bit set to zero.

Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|Boolean|固定点|enumerated|bus

Parameters

expand all

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

Programmatic Use

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

Block Characteristics

Data Types

Boolean[a]|固定点|强度ger

Direct Feedthrough

yes

Multidimensional Signals

yes

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™.

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

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

See Also

||(HDL Coder)|(HDL Coder)

Introduced before R2006a