%% Truth Table
% Create a truth table for the logical AND operation.

A = uint8([0 1; 0 1]);
B = uint8([0 0; 1 1]);
TTable = bitand(A, B)

% bitand returns 1 only if both bit-wise inputs are 1.
% Copyright 2012 The MathWorks, Inc.