| MATLAB® | ![]() |
C = bitand(A, B)
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.
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:
C = bitand(uint8(13), uint8(27))
C =
9Create a truth table for a logical AND operation:
A = uint8([0 1; 0 1]);
B = uint8([0 0; 1 1]);
TT = bitand(A, B)
TT =
0 0
0 1bitcmp, bitget, bitmax, bitor, bitset, bitshift, bitxor
![]() | binary | bitcmp | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |