FreeMat: BITAND Bitwise Boolean And Operation

FreeMat

- Main Page
- Related Pages

BITAND Bitwise Boolean And Operation

Section: Bitwise Operations

# Usage

Performs a bitwise binary and operation on the two arguments and returns the result. The syntax for its use is

       y = bitand(a,b)

where `a` and `b` are multi-dimensional unsigned integer arrays. The and operation is performed using 32 bit unsigned intermediates. Note that if a or b is a scalar, then each element of the other array is and'ed with that scalar. Otherwise the two arrays must match in size.

# Example

    --> bitand(uint16([1,16,255]),uint16([3,17,128]))

    ans =
       1  16 128

    --> bitand(uint16([1,16,255]),uint16(3))

    ans =
     1 0 3