bit_andΒΆ

bit_and performs the logical AND operation.

m = bit_and(m1, m2)
m = bit_and(m1, m2, cast)

Return Value

m is an integer matrix.

Parameters

m1

m1 is an integer matrix.

m2

m2 is an integer matrix.

cast

cast is one of the following values:

CAST_INT8 (0)

CAST_UINT8 (1)

CAST_INT16 (2)

CAST_UINT16 (3)

CAST_INT32 (4)

CAST_UINT32 (5)

CAST_INT64 (6)

CAST_UINT64 (7)

default value.

Comment

UniScript uses double precision floating-point values. When casted to a CAST_INT64 or CAST_UINT64 only the lower 53 Bits (Bit 0 .. Bit 52) can be used.

Example

* bit_and(9,10)
    8.0000

\begin{matrix}
\begin{matrix}
  & 1 & 0 & 0 & 1 & =&9 \\
  \& & 1 & 0 & 1 & 0 & =&10 \\
  \hline
  & 1 & 0 & 0 & 0 & =&8
\end{matrix}
\end{matrix}

History

Version

Description

R2013.10

New.

id-2101961