Embed Function

Embed checks if a certain bit is set


Function

The function Embed checks if a certain bit is set in the first argument. The number of the bit to be checked is specified in the second argument. Please note that here no operation of the bit pattern is carried out, but only one bit is checked. The result is 1 if the bit is set and 0 if the bit is not set.

The first argument can be a natural number, a list, or a table. For arrays, the number of each element is checked and the results are returned in an array of the same size.


Syntax

Embed (Zahl, Bit-Nummer)

Embed (Liste, Bit-Nummer)

Embed (Tabelle, Bit-Nummer)

Example

Embed (12, 3) = 1

Embed (12, 1) = 0

Embed ([10, 12, 15], 3) = 0 1 1