文档

钻头操作员

输入的指定位操作

  • 图书馆:
  • 万博1manbetxSimulink /逻辑和位操作

描述

钻头操作员块执行您在一个或多个操作数上指定的位操作。与逻辑操作不同逻辑操作员块,位操作将操作数视为位的矢量,而不是单个值。

Restrictions on Block Operations

钻头操作员块不支持轮班操作。万博1manbetx对于轮班操作,请使用移动算术堵塞。

当配置为多输入XOR门时,此块会根据IEEE执行Modulo-2添加®标准逻辑元素。

Ports

Input

展开全部

输入信号,指定为标量或向量。

  • 这不是operator accepts only one input, which can be a scalar or a vector. If the input is a vector, the output is a vector of the same size containing the bitwise logical complements of the input vector elements.

  • For a single vector input, the block applies the operation (except the NOT operator) to all elements of the vector.

  • For two or more inputs, the block performs the operation between all of the inputs. If the inputs are vectors, the block performs the operation between corresponding elements of the vectors to produce a vector output.

数据类型:单身的|双倍的|int8|int16|int32|UINT8|UINT16|UINT32|布尔|fixed point

输出

展开全部

这output signal specified as the output data type, which the block inherits from the driving block, must represent zero exactly. Data types that satisfy this condition include signed and unsigned integer data types.

块输出的大小取决于您选择的输入数量,向量大小和操作员。如果您没有指定一点掩码,则输出是标量。如果确实指定了一些掩码,则输出是向量。

数据类型:单身的|双倍的|int8|int16|int32|UINT8|UINT16|UINT32|布尔|fixed point|enumerated|公共汽车

参数

展开全部

Specify the bitwise logical operator for the block operands.

您可以选择以下位操作之一:

钻头操作 描述

AND

如果相应的位都是真实的

OR

TRUE if at least one of the corresponding bits is TRUE

NAND

如果至少一个相应的位为false,则为是真的

也不

TRUE if no corresponding bits are TRUE

XOR

如果奇数相应的位为true,则为true

不是

如果输入为false(仅适用于单个输入),则为true)

程序化使用

块参数logicop
Type:角色向量
'AND'|'或者'|'nand'|'也不'|'XOR'|'不是'
Default'AND'

选择使用位掩码。清除此复选框启用Number of input ports并禁用位面具一种nd将面具视为

程序化使用

块参数USEBITMASK
Type:角色向量
'off'|'在'
Default'在'

指定输入数。您可以拥有多个输入端口。

依赖性

清理使用位掩码复选框启用Number of input ports并禁用位面具一种nd将面具视为

程序化使用

块参数numinputports
Type:角色向量
:positive integer
Default'1'

指定要与单个输入相关联的掩码。

您可以使用位掩码设置或清除输入。

To perform a... 将操作员参数设置为... 并用...
位设置 OR A 1 for each corresponding input bit that you want to set to 1
有点清晰 AND 您要设置为0的每个相应输入位的0

假设您要设置8位输入向量的第四位。位面膜将是00010000,您可以指定为2^4for the位面具范围。要清除位,位面膜将是11101111,您可以指定为2^7+2^6+2^5+2^3+2^2+2^1+2^0for the位面具范围。

提示

不要使用大于53位的口罩。否则,在模拟过程中会出现错误消息。

依赖性

This parameter is available only when you select使用位掩码

程序化使用

块参数bitmask
Type:角色向量
:positive integer
Default'bin2dec('11011001')'

指定将掩码视为现实世界值还是存储的整数。

编码方案是v=平方英尺+b, as described in缩放(定点设计器)在定点Designer™文档中。现实世界的价值treats the mask asv存储的整数treats the mask as

依赖性

This parameter is available only when you select使用位掩码

程序化使用

块参数bitmaskRealWorld
Type:角色向量
“现实世界价值”|“存储整数”
Default“存储整数”

block Characteristics

数据类型

布尔[[一种这是给予的|base integer|fixed point

多维信号

是的

可变大小信号

No

[[一种这是给予的

Introduced before R2006a

Was this topic helpful?