Contenido principal

Logic and Bit Operations

R2026b
Bloques de lógica booleana, comparación de señales, detección de flancos y manipulación de bits, como Logical Operator y Relational Operator

Utilice bloques de la biblioteca Logic and Bit Operations para implementar lógica de decisiones y monitorización de señales en el modelo. Puede realizar operaciones booleanas, comparar señales, detectar flancos ascendentes y descendentes, y llevar a cabo conversiones entre campos de bits y enteros.

Para añadir bloques de esta biblioteca al modelo, consulte Add Blocks to Models.

Bloques

Bit Clear blockBit ClearSet specified bit of stored integer to zero
Bit Set blockBit SetSet specified bit of stored integer to one
Bit to Integer Converter blockBit to Integer ConverterMap vector of bits to corresponding vector of integers
Bitwise Operator blockBitwise OperatorSpecified bitwise operation on inputs
Combinatorial Logic blockCombinatorial LogicImplement truth table
Compare To Constant blockCompare To ConstantDeterminar cómo se compara la señal con una constante especificada
Compare To Zero blockCompare To ZeroDeterminar cómo se compara la señal con cero
Detect Change blockDetect ChangeDetectar cambios en el valor de una señal
Detect Decrease blockDetect DecreaseDetect decrease in signal value
Detect Fall Negative blockDetect Fall NegativeDetect falling edge when signal value decreases to strictly negative value, and its previous value was nonnegative
Detect Fall Nonpositive blockDetect Fall NonpositiveDetect falling edge when signal value decreases to nonpositive value, and its previous value was strictly positive
Detect Increase blockDetect IncreaseDetect increase in signal value
Detect Rise Nonnegative blockDetect Rise NonnegativeDetect rising edge when signal value increases to nonnegative value, and its previous value was strictly negative
Detect Rise Positive blockDetect Rise PositiveDetectar el flanco ascendente cuando el valor de una señal aumenta a un valor estrictamente positivo y su valor anterior era no positivo
Extract Bits blockExtract BitsOutput selection of contiguous bits from input signal
Extract Bits blockFloat Extract BitsExtract bits from floating-point input samples (Desde R2023a)
Integer to Bit Converter blockInteger to Bit ConverterMap vector of integers to vector of bits
Interval Test blockInterval TestDetermine if signal is in specified interval
Interval Test Dynamic blockInterval Test DynamicDetermine if signal is in specified interval
Logical Operator blockLogical OperatorPerform specified logical operation on input
Relational Operator blockRelational OperatorPerform specified relational operation on inputs
Shift Arithmetic blockShift ArithmeticShift bits or binary point of signal

Herramientas

Library BrowserFind and add blocks to model

Temas