| MATLAB Function Reference | ![]() |
Syntax
Description
C = bitand(A, B)
returns the bitwise AND of arguments A and B, where A and B are unsigned integers or arrays of unsigned integers.
Example 1
The five-bit binary representations of the integers 13 and 27 are 01101 and 11011, respectively. Performing a bitwise AND on these numbers yields 01001, or 9:
Example 2
Create a truth table for a logical AND operation:
See Also
bitcmp, bitget, bitmax, bitor, bitset, bitshift, bitxor
| binary (ftp) | bitcmp | ![]() |
© 1994-2005 The MathWorks, Inc.