Engee documentation

Bit Set

Sets the specified bit of the input signal to one.

blockType: Bit Set

Path in the library:

/Basic/Logic and Bit Operations/Bit Set

Description

Block Bit Set sets the specified bit of the input signal to one. Zooming is ignored.

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

Ports

Input

# IN_1 — Input signal
scalar | vector | the matrix

Details

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

Data types

Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed

Complex numbers support

Yes

Output

# OUT_1 — Output signal
scalar | vector | the matrix

Details

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

Data types

Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed

Complex numbers support

Yes

Parameters

Main

# Index of bit (0 is least significant) — bit index
Scalar / array of Int64

Details

The number of the bit to install. The least significant bit has a number 0.

Default value

0

Program usage name

iBit

Tunable

Yes

Evaluatable

Yes

Additional options

C code generation: Yes