Engee documentation

Bit Set

Sets the specified bit of the input signal to one.

bit set

Description

The Bit Set block sets the specified bit of the input signal to one. Scaling is ignored.

The bit number to be set to one is specified by the Index of bit (0 is least significant) parameter, where zero is the least significant bit.

Ports

Input

Port_1 - input signal
scalar | vector | matrix

Input signal (integer), which will have a bit set.

Data types: Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed.

*Support for complex numbers: Yes

Output

Port_1 - output signal
scalar | vector | matrix

An output signal (integer) with the specified bit set to one. The size and type of the output is always the same as the input.

Data types: Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed.

*Support for complex numbers: Yes

Parameters

Index of bit (0 is least significant) - bit index
0 (by default) | scalar or vector

Bit number to be set. The least significant bit has the number 0.

Usage in program code

Block parameter

iBit

Values

positive integer

By default

0

Additional options

C code generation: Yes